// BrowserCheck Variables
var ie4 = (document.all && !document.getElementById) ? true : false;
var ns4 = (document.layers) ? true : false;
var ie5 = (document.all && document.getElementById) ? true : false;
var ns6 = (document.getElementById && !document.all) ? true : false;
var ismac = (navigator.appVersion.indexOf("Mac") != -1)? true:false;

//New window functions

var imageWindow;
var width = 550;
var height =640;
if( (navigator.userAgent.toLowerCase().indexOf("win")) >0 && (ie4 ||ie5)){height = 620;}

function openImageWindow(imagetoOpen) {
		var wintoOpen ='window.asp?' + imagetoOpen;
		imageWindow = window.open(wintoOpen, "ImageView", "left=10,top=0,toolbar=no,location=no,directories=no,status=no,menubar=yes,screenX=0,width=" + width + ",height=" + height + ",screenY=0,scrollbars=no,resizable=yes");
        imageWindow.focus();
			}
                  
function checkimageWindow()
{
	if(imageWindow){
	if(!imageWindow.closed)
	{imageWindow.close();}
	}
}


// Ns4 resize bug

function reDo() {
if (innerWidth != origWidth || innerHeight != origHeight) 
   location.reload();
}

if (ns4) {
var origWidth = innerWidth;
var origHeight = innerHeight;
	onresize = reDo; 
}         

//apply proper stylesheet

//if (ns4) {document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="js/nn.css">')}
//else {document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="js/ie.css">')}