<!--
//--- 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. 
 **/
function showMenuLayer(visibleLayerName, invisibleLayerName){
	cancelTimeout();
	
	hideLayer(getLayer(invisibleLayerName));
	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("lyrMenu1"));
	hideLayer(getLayer("lyrMenu2"));
}
//-->
