//
//
// This file contains the javascript routines for the
// dropdown menus.
//
// Increase "delay" to increase the stickiness of
// the dropdown menus. Delay must be set higher for
// Netscape 4 due to its incomplete DHTML support.
//
//


var delay = 250
var headerOn = new Array(numMenus)
var menuOn = new Array(numMenus)

function menuDropdown()
{	for(i=0;i<numMenus;i++)
	{	headerOn[i] = false
		menuOn[i] = false
		
		show("menuHead" + i + "a")
	}
	
	show("navBground")
	
	if (is.nav4)
	{	delay = 1500
	}
	
	checkMenu()
}

function menuRoll(which,status)
{	if (status)
	{	show("menu" + which)
		headerOn[which] = true
		menuOn[which] = true
		rollHead(which,true)
	}
	else
	{	headerOn[which] = false
		menuOn[which] = false
	}
}

function roll(obj,which,status)
{	if (status)
	{	obj.className = "bgOn"
	}
	else
	{	obj.className = "bgOff"
	}
	menuOn[which] = status
}

function roll4(which,status)
{	if (is.nav4)
	{	menuOn[which] = status
	}
}

function checkMenu()
{	for(i=0;i<numMenus;i++)
	{	if ((headerOn[i]) || (menuOn[i]))
		{	show("menu" + i)
			rollHead(i,true)
		}
		else
		{	hide("menu" + i)
			rollHead(i,false)
		}
	}
	setTimeout("checkMenu()",delay)
}

function rollHead(which,status)
{	if (status)
	{	show("menuHead" + which + "b")
		hide("menuHead" + which + "a")
	}
	else
	{	show("menuHead" + which + "a")
		hide("menuHead" + which + "b")
	}
}
