var menu_status = new Array();
function verify(){
	alert("ok");
}

function hideAll(){
	for(var i=1; i<5; i++)
    	{
		id = "mymenu"+i;
            var  switch_id = document.getElementById(id);
            if(menu_status[id] == 'show') {
			switch_id.className = 'hide';
           		menu_status[id] = 'hide';
		}  
    	}
}

function showHide(theid){
    if (document.getElementById) {
    //close the showen menu
    for(var i=1; i<6; i++)
    {
		id = "mymenu"+i;
            if(id != theid){
            	var  switch_id = document.getElementById(id);
            	if(menu_status[id] == 'show') {
				switch_id.className = 'hide';
           			menu_status[id] = 'hide';
			}
            }  
    }
    //change the status of the current menu
    var switch_id = document.getElementById(theid);
        if(menu_status[theid] != 'show') {
           switch_id.className = 'show';
           menu_status[theid] = 'show';
        }else{
           switch_id.className = 'hide';
           menu_status[theid] = 'hide';
        }
    }
}
//-----------------------------------------------------------------
function expand(divid){ 
	var div = document.getElementById(divid); 
	var status = div.style.display; 
	if(status == "none") div.style.display = ""; 
	else div.style.display = "none"; 
	} 
function expand_all(stat){ 
	var divs = document.getElementById("content").getElementsByTagName("div").length; 
	for(var i = 1; i <= divs; i++){ 
		var div = document.getElementById("a"+i); 
		if(stat == "on") div.style.display = ""; 
		else div.style.display = "none"; 
	} 
} 
// expend off div
function expandoff(divid){ 
	var div = document.getElementById(divid); 
	var status = div.style.display; 
	//if(status == "none") div.style.display = ""; 
	//else 
	div.style.display = "none"; 
} 