//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;
	menu = eval(lR + "menu" + which + sR);
	if (oldwhich != which)
	{
		omenu = eval(lR + "menu" + oldwhich + sR);
		omenu.visibility = invis;
	}
	menu.visibility = vis;
	oldwhich = which;
	clearTimeout(layerTimer);
	return;
	}
	
//turn off layer and rollover if user is completely off nav 
	function stopOver()
	{
		if (x<2) x++;
		else
		{
		omenu = eval(lR + "menu" + oldwhich + sR);
		omenu.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, bcolor)
{
	if (document.getElementById)
	{
	theone = eval("document.getElementById('"+item+"')")
	theone.style.background = bcolor
	}	

}
