var prev= null;

window.onload=function(){
if(document.getElementsByTagName && document.getElementById){
    document.getElementById("nav").className="jsenable";
    BuildList();
    }
}

function BuildList(){
var hs=document.getElementById("nav").getElementsByTagName("h3");
	if (window.location.href.substr(location.href.length - 1, 1) == '/') {
		var loc = window.location.href + 'index.asp'; 
	}
	else {
		var loc = window.location.href;
	}
for(var i=0;i<hs.length;i++){
 if (loc.indexOf(hs[i].id) > -1) {
	//alert(hs[i].id);
    document.getElementById(hs[i].id).parentNode.className="show";
		}
		hs[i].onclick=function(){
        if(this.parentNode.className!="show"){
            this.parentNode.className="show";
            if(prev && prev!=this.parentNode) prev.className="hide";
            prev=this.parentNode;
            }
        else this.parentNode.className="hide";
        }
    }
}
