function toggle(id) {  
         var state = document.getElementById(id).style.display;  
             if (state == 'block') {  
                 document.getElementById(id).style.display = 'none';  
             } else {  
                 document.getElementById(id).style.display = 'block';  
             }  
         }  

menu_status = new Array();
var currentOpenItemName="";
function showHide(theid)
{
    if(currentOpenItemName!="" && theid!=currentOpenItemName) showHide(currentOpenItemName);
    if (document.getElementById)
    {
       var switch_id = document.getElementById(theid);
        if(menu_status[theid] != 'show')
        {
           switch_id.className = 'show';
           menu_status[theid] = 'show';
           currentOpenItemName = theid;
        }
        else
        {
           switch_id.className = 'hide';
           menu_status[theid] = 'hide';
           currentOpenItemName = "";
        }
    }
}


