menu_status = new Array();
var last_opened;

function showHide(theid){
    if (document.getElementById) {
    var switch_id = document.getElementById(theid);
		
        if(menu_status[theid] != 'show') {
			if(last_opened){
				 var switch_id2 = document.getElementById(last_opened);
				 switch_id2.className = 'hide';
          		 menu_status[last_opened] = 'hide';
				}
           switch_id.className = 'show';
           menu_status[theid] = 'show';
		   last_opened = theid;
        }else{
           switch_id.className = 'hide';
           menu_status[theid] = 'hide';
        }
    }
}
