function hideAll() 
{
	hideSubs();
	
	for(var mmenu in Menu)
	{
	    hide("Menu" + mmenu);
	    hide("menuBar" + mmenu);
	}
	
	/* HIDING FLASH  */
	var isMac = navigator.userAgent.indexOf("Mac") != -1
	if (isMac) 
	{
		fob('on');
	}
	
	// restore 'hidden' objects only if NS7 or before
	var agt=navigator.userAgent.toLowerCase();
	var rv = geckoGetRv();
	if (agt.indexOf('gecko') != -1)
	{
		if (rv < 1.0002)
		{
			fob('on'); //style.left = 0
		}
	}
}

function hideSubs()
{	
	for(var hindex = 0; hindex < CloseSubMenuBoxes.length; hindex++)
	{
		var temp = CloseSubMenuBoxes[hindex];
		hide(temp);
	}
}
function showMenuBar(id) {
    show('menuBar' + id);
}
function OnTriggerMov(id)
{
    hideAll();
    if (DF.$(id).childNodes.length > 0) {
        show(id);
        showMenuBar(id.substring(id.indexOf('Menu') + 4, id.length));
        stopTime();
    }
	setTier1Color(id, "on");
}
function OnTriggerMout(id)
{
	startTime();
	setTier1Color(id, "off");
}

/* Secondary menu color (first dropdown) */
function setTier1Color(id, state) {
	var target = document.getElementById(id);

	var TextOn = "#003264";
	var TextOff = "#59728F";

	var colorTo =  TextOff;
	if (state == "on") { colorTo = TextOn; }
	if (target) {
		target.style.color = "red";
	}
}

function OnMov(id)
{
	hideSubs();
	var target = document.getElementById(id);
	setTextColor(target, 'on');
	setBGColor(target, 'on');
	showSub(id+'Box');
	stopTime();
}

function OnMout(id)
{
	var target = document.getElementById(id);
	setTextColor(target, 'off');
	setBGColor(target, 'off');
	startTime();
}

function OnSubMov(id)
{
	stopTime();
	var target = document.getElementById(id);
	setSubTextColor(target, 'on');
	setBGColor(target, 'on');
	showSub(id+'Box');
}

function OnSubMout(id)
{
	var target = document.getElementById(id);
	setSubTextColor(target, 'off');
	setBGColor(target, 'off');
	startTime();
}

function OnDivClick(url)
{
	parent.location=url;
}

function DisplayOne(list)
{
	var selected = Math.round(Math.random() * (list.length-1));

	for (var ix = 0; ix < list.length; ix++)
	{
		if(selected == ix)
		{
			list[ix].style.display = "";
		}
		else
		{
			list[ix].style.display = "none";
		}
	}
}