
menu_status = new Array();

function hide(theid)
{
	document.getElementById(theid).className = 'hide';
   	menu_status[theid] = 'hide';
}

//amaga tots els menús menys l'actual (theid):
function hideAll(theid)
{
	if( theid.match( "mymenu" )){
		var compt = 1;

		while( document.getElementById( "canvi"+compt )!=null ){
			//amagar:
			hide( "mymenu"+compt );

			compt++;
		}
	}
}

function showHide(theid){
	if(menu_status[theid] != 'show') {
		document.getElementById(theid).className = 'show';
		menu_status[theid] = 'show';
	}
	else{
		document.getElementById(theid).className = 'hide';
		menu_status[theid] = 'hide';
	}
}
