/********************************************************/
/* THIS JAVASCRIPT BELOW OPENS AND CLOSES THE NAVIGATION*/
/********************************************************/

if (document.getElementById){ 
document.write('<style type="text/css">\n')
document.write('.tiersub{display: none;}\n')
document.write('</style>\n')
}

function SwitchMenu(obj){
	// set the 'Current Navigation Position' cookie
	document.cookie="CNP="+obj+"; path=/";

	if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById("masterdiv").getElementsByTagName("span"); 
		if(el.style.display != "block"){ 
			for (var i=0; i<ar.length; i++){
				if (ar[i].className=="tiersub") 
				ar[i].style.display = "none";
			}
			el.style.display = "block";
		}else{
			el.style.display = "none";
		}
	}
}

// Function to retrieve the value of the navigation cookie.
function getCookie(name) 
{
	var dc = document.cookie;
	var index = dc.indexOf(name + "=");
	if (index == -1) return null;
	index = dc.indexOf("=", index) + 1;
	var endstr = dc.indexOf(";", index);
	if (endstr == -1) endstr = dc.length;
	return unescape(dc.substring(index, endstr));
}

// Function to remember which navigation header was open.
function setNavigation()
{
	var navitem = getCookie("CNP");
	if (navitem > "") SwitchMenu(navitem);
}

// call the function to reset the nav bar.
// see the image load at the end of the navigation list (line 131).

/********************************************************/
/* THIS JAVASCRIPT ABOVE OPENS AND CLOSES THE NAVIGATION*/
/********************************************************/



