<!--
//--- 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 2003 - adopting for RAC needs
Layers to deal with:
	divMenuRac
	divMenuNews
	divProducts
	divLegislation
	divOperations
	divCareers
*/
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("divMenuRac"));
	hideLayer(getLayer("divMenuNews"));
	hideLayer(getLayer("divProducts"));
	hideLayer(getLayer("divLegislation"));
	hideLayer(getLayer("divOperations"));
	hideLayer(getLayer("divCareers"));
	hideLayer(getLayer("divTraining"));
}

//-->
