

//drop down menu function
function GoUrl(s)
{	var d = s.options[s.selectedIndex].value
	window.top.location.href = d
	s.selectedIndex=0
}

//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;
	
//turn on layer and rollover
	function layOver(which)
	{
	x=0;
	l = eval(lR + "l" + which + sR);
	if (oldwhich != which)
	{  
		ol = eval(lR + "l" + oldwhich + sR);
		ol.visibility = invis;
	}
	l.visibility = vis;
	oldwhich = which;
	clearTimeout(layerTimer);
	return;
	}
	
//turn off layer and rollover if user is completely off nav 
	function stopOver()
	{
		if (x<5) x++;
		else
		{
		ol = eval(lR + "l" + oldwhich + sR);
		ol.visibility = invis;
		x=0;
		}
	layerTimer = setTimeout("stopOver()",150)
	}
	
//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
	}	

}


//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()



function pickBrowser()
{
if (isIE) moveLayers()
else {location.reload()}
}	

var width
function moveLayers()
{
if (isNS || isNS6) width= window.innerWidth
if (isIE) width= document.body.clientWidth

	for (q=1;q<6;q++)
	{
	l = eval(lR + "p" +q+ sR);
	if (q > 1) lOld = eval(lR + "p" + (q-1) + sR)
		if(width > 745)
		{
			if (q==1)
			{
				if (isIE) l.pixelLeft = width-267
				else if (isNS6)l.left = width-267
				else l.left = width-282
			}
			if (q>2)
			{
			if(isIE || isNS6) end = width - 5 
			else end = width-20
			start = 312
			middle = end-start
				if(isIE) l.pixelLeft = parseInt(lOld.pixelLeft) + middle/3
				else l.left = parseInt(lOld.left) + middle/3 
			}
		}
		else if (width <745)
		{
			if (q==1)
			{
			if(isIE) l.pixelLeft = 476
			else l.left = 476
			}
			if (q>2)
			{
			if(isIE) l.pixelLeft = parseInt(lOld.pixelLeft) + 142
			else l.left = parseInt(lOld.left) + 142
			}
		}
	}
}
	

