menu_status = new Array();
function showHide(theidPrefix, theidNum)
{
    // show/hide clicked menu element 
    if (document.getElementById) 
    {
        var switch_id = document.getElementById(theidPrefix+theidNum); 

        if(menu_status[theidPrefix+theidNum] != 'show'){ 
        switch_id.className = 'show'; 
        menu_status[theidPrefix+theidNum] = 'show';} 
    else
    { 
        switch_id.className = 'hide'; 
        menu_status[theidPrefix+theidNum] = 'hide';
    } 


// hide non-clicked menu elements 
    n = 1; 
    while( document.getElementById(theidPrefix+n) )
    { 
        if(n != theidNum)
        { 
            var hide_id = document.getElementById(theidPrefix+n); 
            hide_id.className = 'hide'; 
            menu_status[theidPrefix+n] = 'hide';
        }

        n++; 
        }
    }
}

function showAll(theidPrefix)
{
    n = 1; 
    while( document.getElementById(theidPrefix+n) )
    { 
        var show_id = document.getElementById(theidPrefix+n); 
        show_id.className = 'show'; 
        n++;
    } 
}