window.onerror = function () { return true; }
var PopWin=null;
function PW(page,w,h,pos,params) {
	var u=""; var pX=0; var pY=0; var Hoffset=15; var Voffset=60;
	if (page.substring(0,4)=="http") {
		u=page+((params.length>0)?'?'+params:'');
	} else {
		u=page+((params.length>0)?'?'+params:'');
	}
	if (pos=="T") { pX=parseInt((screen.width-w)/2); }
	else if (pos=="TR") { pX=parseInt(screen.width-w-Hoffset); }
	else if (pos=="TL") { ; }
	else if (pos=="L") { pY=parseInt((screen.height-h)/2); }
	else if (pos=="C") {
		pX=parseInt((screen.width-w)/2);
		pY=parseInt((screen.height-h)/2);
	} else if (pos=="R") {
		pX=parseInt(screen.width-w-Hoffset);
		pY=parseInt((screen.height-h)/2);
	} else if (pos=="BL") {
		pY=parseInt(screen.height-h-Voffset);
	} else if (pos=="B") {
		pX=parseInt((screen.width-w)/2);
		pY=parseInt(screen.height-h-Voffset);
	} else if (pos=="BR") {
		pX=parseInt(screen.width-w-Hoffset);
		pY=parseInt(screen.height-h-Voffset);
	}
	if (document.layers) {var o='resizable=yes,toolbar=0,location=0,status=0,menubar=0,scrollbars=1,width='+w+',height='+h+',screenX='+pX+',screenY='+pY;}				
	else {var o='resizable=yes,toolbar=0,location=0,status=0,menubar=0,scrollbars=1,width='+w+',height='+h+',left='+pX+',top='+pY;}
	if ((PopWin==null) || PopWin.closed) { PopWin=window.open(u,'POPUP',o); }
	else {PopWin.location=u; PopWin.focus();}
}
