// http://www.interspire.com/content/articles/10/1/Building-An-Expanding-DHTML-Menu-With-CSS-and-JavaScript

menu_status = new Array(); 

function showHide(theid, altid1, altid2){
    if (document.getElementById) {

		var switch_id = document.getElementById(theid);
		var alt_id1 =  document.getElementById(altid1); 
		var alt_id2 =  document.getElementById(altid2); 
			
		if(menu_status[theid] != 'show') {
			// If the selected menu item is not open, open it...
			switch_id.className = 'show';
			menu_status[theid] = 'show';
			
			// ... and close the other menus	
			alt_id1.className = 'hide';
			menu_status[altid1] = 'hide';

			alt_id2.className = 'hide';
			menu_status[altid2] = 'hide';
		
        }else{
           switch_id.className = 'hide';
           menu_status[theid1] = 'hide';
		   menu_status[theid2] = 'hide';
        }
    }
}
