var current; /** * Toggle the displayed menu */ function menu_unhide(whichLayer,old) { if (current == null) current = old; var oldmenu = document.getElementById('MID_'+current).style; oldmenu.display = 'none'; if (document.getElementById) { // this is the way the standards work var newmenu = document.getElementById(whichLayer).value; var newmenu_div = document.getElementById('MID_'+newmenu).style; newmenu_div.display = 'block'; } current = newmenu; }