function topNavSelector(objId) {
	document.getElementById(objId).className += " selected";
}


/* This function can be run at any point after the left nav is dropped into the page.
   It will compare the left nav HREFs to the page URL and assign a class to the appropriate, 
   selected left nav list item. To force a left nav item to be selected,
   first give it a unique id and then pass that ID into the function.
   
   It will then bubble up and open up the appropriate sub-navigation menus for the section
*/
function leftNavSelector(optionalID) {
// page URL after '.com' directory (for URL matching purposes)
var pageSubURL = decodeURI(document.location.pathname);

//strip 'index' file reference from URL (for comparison purposes)
if(pageSubURL.indexOf("/index.") >= 0) { pageSubURL = pageSubURL.substring( 0,pageSubURL.indexOf("/index.")+1 ); }


try {
	if(!optionalID) {
		leftNavDiv = document.getElementById("leftNav");
		aArray = leftNavDiv.getElementsByTagName("a");
		for(var i = 0; i < aArray.length; ++i) {
			
			var testHref = aArray[i].pathname;
			if(testHref.indexOf("/") != 0) { testHref = "/" + testHref; } // IE doesn't include beginning slash
			
			//strip 'index' file reference from link URLs (for comparison purposes)
			if(testHref.indexOf("/index.") >= 0) { testHref = testHref.substring( 0,testHref.indexOf("/index.")+1 ); }
			
			if(pageSubURL == testHref) {
				// set as selected
				selectedLeftNavItem = aArray[i];
				break;
			} // if(pageSubURL ==...
		}// for i
	} else {
		selectedLeftNavItem = document.getElementById(optionalID);
	}// else
	
	selectedLeftNavItem.parentNode.className += " selected";
	
	// bubble up and open up navs
	parentBubbler = selectedLeftNavItem.parentNode;
	while(parentBubbler.parentNode.id != "leftNav") {
		parentBubbler.style.display = "block";
		
		// bubble up
		parentBubbler = parentBubbler.parentNode;
	}// while
	
	leftNavSectionDivs = parentBubbler.getElementsByTagName("div");
	for(i=0; i<leftNavSectionDivs.length; i++) {
		leftNavSectionDivs[i].style.display = "block";
	}
	
} catch(err) {}
}