// JavaScript Document

<!--

//For Reference this is from: ---
//http://www.interspire.com/content/articles/10/1/Building-An-Expanding-DHTML-Menu-With-CSS-and-JavaScript

//First Code which worked but did not collapse the menu



//menu_status = new Array();

//function showHide(theid){
    //if (document.getElementById) {
    //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';
        //}
    //}
//}

//-->



var last_expanded = '';

function showHide(id)
{
var obj = document.getElementById(id);

var status = obj.className;

if (status == 'hide') {

if (last_expanded != '') {
var last_obj = document.getElementById(last_expanded);
last_obj.className = 'hide';
}

obj.className = 'show';

last_expanded = id;
} else {
obj.className = 'hide';
}
}

