
var arrNav = new Array('','','','','');
var iLevel=0;
var iTimer =0;
var szLast='';

function On(objId,id,lvl){
	if (iTimer) {clearTimeout(iTimer);}
	for (iLoop=0;iLoop<5;iLoop++) {
		if (iLoop>=lvl)
		{
			if (arrNav[iLoop]!=''){
				document.getElementById(arrNav[iLoop]).style.display = "none";
				arrNav[iLoop]='';
			}
		}
	}
	if (id!=''){
		document.getElementById(id).style.display = "";
	}
	arrNav[lvl] = id;
	iLevel = lvl;	
}

function Off(objId,lvl){
	iTimer=setTimeout("Close();",1000);
}

function Close(){
	for (iLoop=0;iLoop<5;iLoop++) {
		if (arrNav[iLoop]!=''){
			document.getElementById(arrNav[iLoop]).style.display = "none";
			arrNav[iLoop]='';
		}
	}
}

