// JavaScript Document
// menu system, and how it works
// when they roll the mouse over a parent menu, there is a 'rollover' function call with the name of the submenu that needs to be opened
// when they roll the mouse off a parent menu, there is a 'rolloff' function call with the name of the submenu that needs to be hidden
// likewise the submenus have the same rollover and rolloff function calls to make sure that they are kept alive
// however, to make sure that when the user moves the mouse from a parent menu to a submenu, there's a time delay between the actions
// so the sequence of actions when a user moves the mouse from parent to submenu is 'rollover(submenu)', 'rolloff(submenu)','rollover(submenu)'
//     as long as the last two happen within the time delay the submenu stays up

//flag to show the submenu
function timer(elementName)
{
	// if the flag is false, kill the menu
	var submenu = document.getElementById(elementName);
	if(!submenu.menuflag)
		submenu.style.display = "none";
	else
		submenu.style.display = "inline";
}

function rollover(elementName)
{
	var submenu = document.getElementById(elementName);
	submenu.menuflag = true;// need to show the menu
	setTimeout("timer('"+elementName+"')",100);
}

function rolloff(elementName)
{
	var submenu = document.getElementById(elementName);
	submenu.menuflag = false;// need to hide the menu unless they roll onto it in the next 0.2s
	setTimeout("timer('"+elementName+"')",100);
}







