function popWin(theURL,thewidth,theheight) {
	 var Win = window.open(theURL,"popWindow",'width='+thewidth+',height='+theheight+',resizable=1,scrollbars=yes,menubar=no,status=no')
}
//set up layer call
var isIE, isNS, isNS6, isDOM, lR, sR, vis, invis, myTimeOut, goName;
	if (document.all) {isIE= true;lR="document.all.";sR=".style";vis="visible";invis="hidden";}
	if (document.layers){isNS = true;lR="document.layers.";sR="";vis="show";invis="hide";}
	if (document.getElementById &&!isIE) {isDOM=true;lR = "document.getElementById('";sR = "').style";invis ="hidden";vis = "visible"}
	if (isDOM == true && navigator.appName =="Netscape") isNS6 = true;
	
var oldwhich = 0;
var x=0;
var layerTimer;

//main nav color
var nColor1 = "none"
var nColor2 = "#4AD2F6"

//turn on layer and rollover
	function layOver(which)
	{
	x=0;
	l = eval(lR + "L" + which + sR);
	//eval("changebg('n"+which+"','" + nColor2 + "')")
	if (oldwhich != which)
	{
		//alert(lR + "L" + oldwhich + sR)
		oL = eval(lR + "L" + oldwhich + sR);
		//eval("changebg('n"+oldwhich+"','" + nColor1 + "')")
		oL.visibility = invis;
	}
	l.visibility = vis;
	oldwhich = which;
	clearTimeout(layerTimer);
	return;
	}
	
//turn off layer and rollover if user is completely off nav 
	function stopOver()
	{
	layerTimer = setTimeout("stopOver()",150)
		if (x<5) x++;
		else
		{
		oL = eval(lR + "L" + oldwhich + sR);
		oL.visibility = invis;
		//eval("changebg('n"+oldwhich+"','" + nColor1 + "')")
		x=0;
		startOver()
		}
	}
	
//reset the timer
	function startOver()
	{
	x=0
	clearTimeout(layerTimer);
	}
	
//change subnav background color (ie5+ ns6+)
	function changebg(item,color)
{
	if (document.getElementById)
	{
	theone = eval("document.getElementById('"+item+"')")
	theone.style.background = color
	}	

}
function alignLastLayer(lastNum,layerWidth) {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else {
    if( document.documentElement &&
        ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
      //IE 6+ in 'standards compliant mode'
      myWidth = document.documentElement.clientWidth;
      myHeight = document.documentElement.clientHeight;
    } else {
      if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
        //IE 4 compatible
        myWidth = document.body.clientWidth;
        myHeight = document.body.clientHeight;
      }
    }
  }
  oL = eval(lR + "L" + lastNum + sR)
  oL.left=myWidth-layerWidth
  //window.alert( 'Width = ' + myWidth );
  //window.alert( 'Height = ' + myHeight );
}

//netscape resize bug fix
function NSresize() {
  if (document.FIX.NSfix.initWindowWidth != window.innerWidth || document.FIX.NSfix.initWindowHeight != window.innerHeight) {
    document.location = document.location;
  }
}

function NSCheck() {
  if ((navigator.appName == 'Netscape') && (parseInt(navigator.appVersion) == 4)) {
    if (typeof document.FIX == 'undefined'){
      document.FIX = new Object;
    }
    if (typeof document.FIX.FIX_scaleFont == 'undefined') {
      document.FIX.NSfix = new Object;
      document.FIX.NSfix.initWindowWidth = window.innerWidth;
      document.FIX.NSfix.initWindowHeight = window.innerHeight;
    }
    window.onresize = NSresize;
  }
}


NSCheck();



