var d=document; var l;
function showNav(id, left){var oId = 'sub'+id;if(d.getElementById(oId)){d.getElementById(oId).style.display = 'block';}}
function hideNav(id){var oId = 'sub'+id;if(d.getElementById(oId)){d.getElementById(oId).style.display = 'none';}}

var mNavIds = [];
function navState(id, state, last){
    if(l==undefined) {l=last;}
    if(l!=last) {
	hideNav(l);
	l=last;
    }
    clearTimer();
    if(state == 1){	
        showNav(id);
    } else{
	setTimer(id);
    }
}
var tmr=null;
function setTimer(id){tmr = window.setTimeout("hideNav(\"" + id + "\")",500);}
function clearTimer(){if(tmr != null) window.clearTimeout(tmr);tmr = null;}
