	
	function Redirect(url)
	{
		document.location = url;
	}
	
	function ConfirmDelete(modelName)
	{
		return confirm('Are you sure that you want to delete this ' + modelName + "?");
	}
	
	function ConfirmLogout()
	{
		return confirm('Are you sure that you want to logout?');
	}

	win = null;
	
	function OpenWidnow(url, attributes)
	{
		if(win)
		{
			win.close();
		}
		
		win = window.open(url,"",attributes);
	}
	
	function FreeResource()
	{
		if(win)
		{
			win.close();
		}
	}
	
	
	
/**
 * this script taken from website http://www.quirksmode.org/
 */
 
 	function getObj(name)
	{
	  	if (document.getElementById)
	  	{
			this.obj = document.getElementById(name);
			this.style = document.getElementById(name).style;
	  	}
	  	else if (document.all)
	  	{
			this.obj = document.all[name];
			this.style = document.all[name].style;
	  	}
	  	else if (document.layers)
	  	{
			this.obj = document.layers[name];
			this.style = document.layers[name];
		}
	}


	function findPosX(obj)
	{
		var curleft = 0;
		if (obj.offsetParent)
		{
			while (obj.offsetParent)
			{
				curleft += obj.offsetLeft
				obj = obj.offsetParent;
			}
		}
		else if (obj.x)
		{
			curleft += obj.x;
		}
		return curleft;
	}


	function findPosY(obj)
	{
		var curtop = 0;
		if (obj.offsetParent)
		{
			while (obj.offsetParent)
			{
				curtop += obj.offsetTop
				obj = obj.offsetParent;
			}
		}
		else if (obj.y)
			curtop += obj.y;
		return curtop;
	}