// var ns4=document.layers?1:0
// var ie4=document.all?1:0
// var ns6=document.getElementById&&!document.all?1:0
//
/* 
manages the class and id of links in the sidebar so the one corresponding 
to the currently loaded page can be styled uniquely

called by onLoad() in the body tag, see header.xilinc
*/
function showNavInSidebar(url) {
	var k = url.lastIndexOf("#")
	if( k > -1 ) {
		// remove anchor spec
		url = url.substring(0,k);
	}
    var theLinks = document.getElementById("sidebar").getElementsByTagName('a');
    for( i=0; i < theLinks.length; i++ ) {
        var link = theLinks[i];
        if( link == url  ) {
			var last = document.getElementById("selected");
			if( last != null ) {
				last.className="";
				last.id="";
			}			
			var li = link.parentNode;
			li.className = "currentLink";
			li.id = "selected";
			li.blur();
			break;
        }
    }    
}

