browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
var version = "n2";
var timerid = null;
var timerid2 = null;
macNS3 = 0;

if ((navigator.appCodeName == 'Mozilla') && (navigator.appVersion.substring(0,1) == 3)) { macNS3 = 1; }
if ((navigator.appCodeName == 'Mozilla') && (navigator.appVersion.substring(0,1) > 3)) { version = "n3+"; }
if ((navigator.appCodeName == 'MSIE') && (navigator.appVersion.substring(0,1) > 3)) { version = "n3+"; }



function trim(pstrString)
{
	var intLoop=0;

	for(intLoop=0; intLoop<pstrString.length; )
	{
		if(pstrString.charAt(intLoop)==" ")
			pstrString=pstrString.substring(intLoop+1, pstrString.length);
		else
			break;
	}

	for(intLoop=pstrString.length-1; intLoop>=0; intLoop=pstrString.length-1)
	{
		if(pstrString.charAt(intLoop)==" ")
			pstrString=pstrString.substring(0,intLoop);
		else
			break;
	}
	return pstrString;
}



function OpenPageInNewWindow( page ) {
OpenWin = this.open(page, "CtrlWindow", "toolbar=yes,menubar=yes,location=yes,scrollbars=yes,resizable=yes");
}



function openANewPage(url, winName, width, height) {

 if ( width == "" ) {
     width=500;
     height=500;
 }

window.open(url, winName, 'width='+width+',height='+height+',directories=no,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,resizable=yes');


}


function newCustomWindowImage( theURL, width, height, windowWidth, windowHeight, theTitleText ){

 var textWidthHeight = 'width=' + windowWidth + ', height=' + windowHeight;

var windowdressing = "<html><head><title>" + theTitleText + "</title>" + 
 "</head><body><font face='Verdana' size='1'>" + 
 "<br><img src='" + theURL + "' border=0 width='" + width + "' height='" + height + "' alt=" + theTitleText + "/>" + 
 "<p><a href='javascript:window.close();'><font color=gray>Close Window</font></A><p>&nbsp;<P></body></html>";

 newWindow = window.open('javascript:document.write();','Help',textWidthHeight );
 newWindow.document.write(windowdressing);


}


