
function ShowHide(id1, id2, id3) 
{
	var res = expMenu(id1);
	if (id2 != '') expMenu(id2);
	if (id3 != '') SetCookie(id3, res, exp);
}
function expMenu(id) 
{
	var itm = null;
	if (document.getElementById) 
	{
		itm = document.getElementById(id);
	}
	else if (document.all)
	{
		itm = document.all[id];
	} 
	else if (document.layers)
	{
		itm = document.layers[id];
	}
	if (!itm) 
	{
		// do nothing
	}
	else if (itm.style) 
	{
		if (itm.style.display == "none")
		{ 
			itm.style.display = ""; 
			return 1;
		}
		else
		{
			itm.style.display = "none"; 
			return 2;
		}
	}
	else 
	{
		itm.visibility = "show"; 
		return 1;
	}
}
var MenuVisible = false;
var showMenu = false;
var showSubMenu = false;
var navRoot = false;
var navTimer = false;
function startList()
{
	if (document.all&&document.getElementById) 
	{
		navRoot = document.getElementById("subnav");
		navRoot.onmouseover=function() 
		{
			navRoot.className=" over";
			MenuVisible = true;
			showMenu = true;
			MenuTimerStop();
		}
		navRoot.onmouseout=function() 
		{
			showMenu = false;
			MenuTimerStart();
		}
		for (i=0; i<navRoot.childNodes.length; i++) 
		{
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") 
			{
				node.onmouseover=function() 
				{
					showSubMenu = true;
					MenuTimerStop();
				}
				node.onmouseout=function() 
				{
					showSubMenu = false;
					MenuTimerStart();
				}
			}
		}
	}
}
function HideNav()
{
	navRoot.className="rollover";
	MenuVisible = false;
}

function CheckNav()
{
	if(MenuVisible && !showMenu && !showSubMenu)
	{
		HideNav();
	}
	MenuTimerStop();
}
function MenuTimerStop()
{
	if(navTimer != false)
	{
		clearTimeout(navTimer);
		navTimer = false;
	}
}

function MenuTimerStart()
{
	if(navTimer == false)
	{
		navTimer = setTimeout('CheckNav()', 200);
	}
}
window.onload=startList;  