

function leftNav(pageId) {
	rightLink = pageId.split("_");
	if (rightLink[2]) { // If this is a third-level link 
		var highlightedLink = document.getElementById(pageId);
		highlightedLink.className = "third_highlighted"; // Assign highlighted third-level link style
		var linkArray = document.getElementById("masterdiv").getElementsByTagName("div");
		for (i=0;i<linkArray.length;i++) {
			var tempLink = linkArray[i].id.split("_");
			if (tempLink[0] == rightLink[0] && tempLink[1] == rightLink[1] && linkArray[i] != highlightedLink) {
				linkArray[i].className = "third"; // If this is in the same section as our link, make it visible
			}
			if (tempLink[0] == rightLink[0] && !tempLink[2]) linkArray[i].className = "second"; // If this is in the same section as our link and not third-level, make it visible
			if (tempLink[0] == rightLink[0] && !tempLink[1]) { // If this is the top-level category for our link
				linkArray[i].className = "first_highlighted"; // Apply highlighted top-level style
			}
			if (tempLink[0] == rightLink[0] && tempLink[1] == rightLink[1] && !tempLink[2]) { // If this is the second-level category for the link
				linkArray[i].className = "second_dropdown"; // Apply highlighted second-level style
			}
		}
		
	} else if (rightLink[1]) { // If this is a second-level-only link
		var highlightedLink = document.getElementById(pageId);
		highlightedLink.className = "second_highlighted"; // Apply highlighted second-level style
		var linkArray = document.getElementById("masterdiv").getElementsByTagName("div");
		for (i=0;i<linkArray.length;i++) {
			var tempLink = linkArray[i].id.split("_");
			if (tempLink[0] == rightLink[0] && !tempLink[2] && linkArray[i] != highlightedLink) linkArray[i].className = "second"; // If this is in the same section as our link and not third-level, make it visible
			if (tempLink[0] == rightLink[0] && !tempLink[1]) { // If this is the top-level category for our link
				linkArray[i].className = "first_highlighted"; // Apply highlighted top-level style
			}
		}
	} else if (rightLink[0]) { // If this is a first-level-only
		var highlightedLink = document.getElementById(pageId);
		highlightedLink.className = "first_highlighted"; // Apply highlighted top-level style
	}
}

function popUp(pageName) {
	var win=window.open(pageName, "_blank", "location=no ,menubar=no, toolbar=no, status=no, scrollbars=yes,  width=406, height=496")
}

function popUpSmall(pageName) {
	window.open(pageName, "_blank", "location=no ,menubar=no, toolbar=no, status=no,  width=306, height=258");
}