var refWin=null;
var browserName = navigator.appName;
var browserVersion = parseInt (navigator.appVersion);
var bMac = (window.navigator.userAgent.indexOf("Mac")>=0);
var bNetscape4Mac = (browserName == "Netscape" && browserVersion == 4 && bMac);
var bIE5 = (navigator.appVersion.indexOf ("MSIE 5.0") > 0)
var bIE5Mac = (browserName == "Microsoft Internet Explorer" && bIE5 && bMac);


function init()
{

	loaded=1;
	// Remove focus links
	var i;
	for(i=0; i<document.links.length;i++)
	{
		document.links[i].onfocus = new Function('if (this.blur) this.blur()');
	}

}

function leavePage()
{
	
if (refWin)
	refWin.close();

}

function openWindow (strURL,w,h,top,left)
{
 	var strFeatures = "width=460,height=373";

 	if (openWindow.arguments.length >= 3)
 		strFeatures = "width="+w+",height="+h;

 	if (openWindow.arguments.length >= 5)
 		strFeatures += ",screenX=0,screenY=0,top="+top+",left="+left;

	if (!bNetscape4Mac && !bIE5Mac)
	{
		if (refWin && !refWin.closed)
			refWin.close();
	}

	refWin = window.open(strURL, null, strFeatures);

	if (!bIE5Mac)
		refWin.focus();

	
}


function Is()
{
	var agent = navigator.userAgent.toLowerCase();
	this.major = parseInt(navigator.appVersion);
	this.minor = parseFloat(navigator.appVersion);
	this.ns  = ((agent.indexOf('mozilla')!=-1) && ((agent.indexOf('spoofer')==-1) && (agent.indexOf('compatible') == -1)));
	this.ns4 = (this.ns && (this.major >= 4));
	this.ie   = (agent.indexOf("msie") != -1);
	this.ie4  = (this.ie && (this.major >= 4));
	this.win   = (agent.indexOf("win")!=-1);
	this.mac   = (agent.indexOf("mac")!=-1);
}
