function RefreshOpener(bcloseSelf) { //v2.0
	if (window.opener && !window.opener.closed)
	{
		var opener_href = window.opener.location.href;
		var href_test = opener_href.substring(opener_href.length-1);
		if (href_test=='#')
		{
			opener_href = opener_href.substring(0,opener_href.length-1);
		}
		window.opener.location.href = opener_href;
	}
	if (bcloseSelf==true) window.close();
}
function SelectCheckBox(bCheck)
{ 
	var cInput=document.all.tags('INPUT');
	for(var i in cInput)
		if((cInput[i].type=='checkbox') && (cInput[i].disabled==false)) cInput[i].checked=bCheck;
}
function SetWindowSize(width,height)
{
	window.resizeTo(width,height);
	if ((parseInt(navigator.appVersion) >= 4))
	{ 
		window.moveTo((screen.width-width)/2,(screen.height-height)/2);
	}
	else {
		window.moveTo(0,0);
	}
}
function PopupWindow(url,winName,xpos,ypos,width,height) 
{
	xposition=0; yposition=0;
	if ((xpos<0) || (ypos<0))
	{
		if ((parseInt(navigator.appVersion) >= 4 ))
		{
			xposition = (screen.width - width) / 2;
			yposition = (screen.height - height) / 2;
		}
	}
	else
	{
		xposition=xpos;
		yposition=ypos;
	}
	theproperty= "width=" + width + "," 
		+ "height=" + height + "," 
		+ "location=no," 
		+ "menubar=no,"
		+ "resizable=yes,"
		+ "scrollbars=yes,"
		+ "status=no," 
		+ "titlebar=no,"
		+ "toolbar=no,"
		+ "left=" + xposition + ","
		+ "top=" + yposition;
	window.open( url,winName,theproperty );
}
function AutoClose(millisecond) 
{
	setTimeout("self.close()",millisecond);
}
function IFrameAutoSize(bHeight,bWidth)
{                          
	if  (self.location!=top.location)  
	{
		if (bHeight==true)
		{
			parent.document.all(self.name).height=document.body.scrollHeight  +  30;
		}
		if (bWidth==true)
		{
			parent.document.all(self.name).width=document.body.scrollWidth  +  30;
		}
	}  
}  
