var timerID = null; 
var timerOn = false; 

function noneLayer(strName){
    document.getElementById(strName).style.display = 'none';
}

function resetTimer() {
    if (timerOn) {  
        clearTimeout(timerID);  
        timerID = null;  
        timerOn = false;  
    } 
}

function showMenu(strName) {
	displayLayer(strName);
}

function hideMenu(strName) {
	if (timerOn == false) {  
        timerID = setTimeout('noneLayer("'+strName+'")',1000);
        timerOn = true;  
    } 
}

function haltTimer() {
	resetTimer();	
}

function displayLayer(strName) {
	resetTimer();
	document.getElementById(strName).style.display = 'block';
}

