function init() {

 var sPath = window.location.pathname;
 var sPage = sPath.substring(sPath.lastIndexOf('/') + 1);	
 var allSubNavHrefs=document.getElementById('leftnav').getElementsByTagName('a');

 for(var y=0;y<allSubNavHrefs.length;y++) {
  if (allSubNavHrefs[y].href.substring(allSubNavHrefs[y].href.lastIndexOf('/') + 1)==sPage){
	if(allSubNavHrefs[y].className=='navLeft'){
	 allSubNavHrefs[y].className='navLeftOn';
	 //If a sub nav item exists, display the sub items.
	 if(allSubNavHrefs[y].parentNode.childNodes[1])
	 	allSubNavHrefs[y].parentNode.childNodes[1].style.display='block';	  
	}
	//Drop submenu down if this is the correct page
	if(allSubNavHrefs[y].className=='navSub'){
		allSubNavHrefs[y].parentNode.parentNode.style.display='block';
		allSubNavHrefs[y].className='navSubOn';
/********************************************************************************
the following sets the top nav color back to normal, since when the 
top level href matches the first href in the subnav, we only want to highlight the subnav. 
*********************************************************************************/
		for(var t=0;t<allSubNavHrefs.length;t++){
			if(allSubNavHrefs[t].className=='navLeftOn'){
				allSubNavHrefs[t].className='navLeft'
			}
		}//for
	}// IF navSub Then show drop down
  }//If location matches whats in the menu
 }//For all<a>s
}// function
window.onload = init;
