function PopupBlockerWarning()
{
	alert("Please disable the popup blocker for this website!");
}

function ReloadPage()
{
	try
	{
		__doPostBack("btnRefresh", "");
	}
	catch(e)
	{
	}
}

function ReloadOpenerPage()
{
	if(window.opener != null && typeof(window.opener.ReloadPage) != "udefined")
		window.opener.ReloadPage();
}

function OpenWin(url, width, height, name)
{
	height = height || 700;
	width = width || 600;
	var str = "height=" + height + ",innerHeight=" + height ;
	str += ",width=" + width + ",innerWidth=" + width;
	str += ",toolbar=no,resizable=yes,scrollbars=yes,titlebar=no";
	if(window.screen) 
	{
		var ah = screen.availHeight - 30;
		var aw = screen.availWidth - 10;
		
		var xc = (aw - width) / 2;
		var yc = (ah - height) / 2;

		str += ",left=" + xc + ",screenX=" + xc;
		str += ",top=" + yc + ",screenY=" + yc;
	}
	var win = window.open(url, name || "blank_", str);
	if(win == null)
	{
		PopupBlockerWarning();
		return;
	}
}

function SelectAll(form, blnSelect)
{
	var nLength = form.elements.length;
	if(typeof(nLength) !=" undefined")
		for(var i=0; i<nLength; i++)
			if(form.elements[i].type == "checkbox")
				form.elements[i].checked = blnSelect;
}

