// JavaScript Document// WHEN PAGE LOADS, RUN FUNCTION NAMED 'MONTRE'window.onload=montre;// MONTRE FUNCTIONfunction montre(id) {		// GETURL FUNCTION OBTAINS FOLDER NAME FROM URL	function getURL(uri) {		uri.dir = location.href.substring(0,location.href.lastIndexOf('\/'));		uri.dom = uri.dir; 		if (uri.dom.substr(0,7) == 'http:\/\/') uri.dom = uri.dom.substr(7);		uri.path = ''; 		var pos = uri.dom.indexOf('\/'); 		if (pos > -1) {			uri.path = uri.dom.substr(pos+1); 			uri.dom = uri.dom.substr(0,pos);		}					return uri;	}		var uri = new Object();		// OBTAINS FOLDER NAME FROM ABOVE FUNCTION	getURL(uri);		// CREATES ARRAY TO STORE NAVIGATION LINKS BY SMENU #	var x = new Array(10); // THIS # SHOULD BE THE SUM OF ARRAY ITEMS + 1	x[1] = "nss/about";	x[2] = "nss/campusvisits";	x[3] = "nss/orientation";	x[4] = "nss/parentsandfamily";	x[5] = "nss/pls";	x[6] = "nss/scholarships";	x[7] = "nss/wildcatwarmup";	x[8] = "nss/contactus";	x[9] = "nss/positions";	var d = document.getElementById(id);		// COMPARES CURRENT FOLDER TO NAVIGATION ARRAY. IF MATCH OCCURS, SUBNAV FOR THAT SECTION DISPLAYS.	for (var i = 1; i<=9; i++) {		if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}		if ((x[i]) == uri.path)	{document.getElementById('smenu'+i).style.display='block';}	}		if (d) {d.style.display='block';}	}