oldName=false
timer=true
function  submenu(name) {
	if(oldName!=false&&oldName!=name){ document.getElementById(oldName).style.display = "none" }
    timer=false;
	if (name!='clear') {	
		oldName=name;
		elem = document.getElementById(name);
		elem.style.display = "block";
	}
}
function submenureport() {
	timer=true;
	timer1=setTimeout("if(timer==true){submenu('clear')}",300);
}	  
function elem_on(name) {
	elem = document.getElementById(name);
	if (elem!=false) elem.style.display = "block";
}
function elem_off(name) {
	elem = document.getElementById(name);
	if (elem!=false) elem.style.display = "none";
}	  
oldPoint=false
function point_switch(name,onoff) {
	elem_on(name+"_"+onoff);
	switch (onoff) { 
		case "on" : if ((oldPoint!=false) && (oldPoint!=name)) {elem_off(oldPoint+'_on'); elem_on(oldPoint+'_off'); } oldPoint=name; onoff="off"; break; 
		case "off" : onoff="on"; break; 
	}
	elem_off(name+"_"+onoff);
}
oldRoute=false
function route_chng(name) {
	elem_on(name);
	if ((oldRoute!=false) && (oldRoute!=name)) elem_off(oldRoute);
	oldRoute=name;
}
