// ---------------------------------------------------------------------------------------
// browser sniffer, defines variables for the rest of the functions below to use.

ns4 = (document.layers)? true:false
ie4 = (document.all)? true:false
sNS6 = (!document.all && document.getElementById) ? true : false;

// ---------------------------------------------------------------------------------------

// Rollover code when using images

function swapimg(name, state){
if (state == "on") document.images[name].src="images/nav/"+name+"_on.gif";
else if (state == "off")  document.images[name].src="images/nav/"+name+"_off.gif";
}

// ---------------------------------------------------------------------------------------

// Rollover code when using images

function swapimginside(name, state){
if (state == "on") document.images[name].src="../images/nav/"+name+"_on.gif";
else if (state == "off")  document.images[name].src="../images/nav/"+name+"_off.gif";
}



// ---------------------------------------------------------------------------------------
// resizes page to its proper dimension

function resizeFix() {
	if(widthCheck != window.innerWidth || heightCheck != window.innerHeight) {
		window.location.reload();
   }
}


// ---------------------------------------------------------------------------------------
// handles netscape resizing problem by forcing to reload when window is resized

if(ns4) {
	widthCheck = window.innerWidth;
    	heightCheck = window.innerHeight;
    	window.onresize = resizeFix();
}


// ---------------------------------------------------------------------------------------
//To be used for popup windows with all atributes passed to function 

function popup_all(topic,namer,tool,loc,dir,stat,menu,scroll,resize,x,y) {
eval('window.open(topic, namer, "history=no,toolbar='+tool+',location='+loc+',directories='+dir+',status='+stat+',menubar='+menu+ ',scrollbars='+scroll+',resizable='+resize+',width=' +  y  + ',height=' +  x + '");');

}

