<!--
//--- Requires lauerUtils.js

var timerRunning = false; // boolean flag
var myTimer = null;

/**
 *	 Note: I'm not doing anything fancy here; I'm hard-coding the layer visibility/invisiblity in
 *	 the function as there are only two layers to deal with; this should be rewritten in the future. 
 **/
 
/*
Nov 2005 - adopting for SC needs
Layers to deal with:
	mnuCompany
	mnuServices
	mnuSolutions
	mnuPartners
	mnuNews
*/
function showMenuLayer(visibleLayerName){
	cancelTimeout();
	
	hideAllMenuLayers()
	showLayer(getLayer(visibleLayerName));
}

function hideLayerTmOut(layerName){
	timerRunning = false;
	hideLayer(getLayer(layerName));
}

function hideLayerTimeout(layerName){
	myTimer = setTimeout("hideLayerTmOut('"+layerName+"')", 1000);
	timerRunning = true;
}

function cancelTimeout(){
    if (timerRunning)
        clearTimeout(myTimer);
}

function hideAllMenuLayers(){
	hideLayer(getLayer("mnuCompany"));
	hideLayer(getLayer("mnuServices"));
	hideLayer(getLayer("mnuSolutions"));
	hideLayer(getLayer("mnuNews"));
}

//-->
