// JavaScript Document
window.onload=montre;
function montre(id) {

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();

getURL(uri);
var x = new Array(9);
x[1] = "pilots/about";
x[2] = "pilots/lab";
x[3] = "pilots/courses";
x[4] = "pilots/prepareforenrollment";
x[5] = "pilots/newsandevents";
x[6] = "pilots/scholarshipsandwards";
x[7] = "pilots/peerassistant";
x[8] = "pilots/usefullinks";
var d = document.getElementById(id);
	for (var i = 1; i<=8; 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';}
}