function loadmenu() {

var menustring = new String;
var menulinks = new Array;
var menuheads = new Array;

menulinks[0] = "index.html";
menuheads[0] = "Home";
menulinks[1] = "news.html";
menuheads[1] = "News";
menulinks[2] = "master.html";
menuheads[2] = "Master";
menulinks[3] = "pe.html";
menuheads[3] = "PE Class";
menulinks[4] = "members.html";
menuheads[4] = "Members";
menulinks[5] = "gallery.html";
menuheads[5] = "Gallery";
menulinks[6] = "faq.html";
menuheads[6] = "FAQ";
menulinks[7] = "email.html";
menuheads[7] = "E-mail";
menulinks[8] = "info.html";
menuheads[8] = "Info";
menulinks[9] = "links.html";
menuheads[9] = "Links";

//This code parses the URL to find the file name, used in the array to highlight the proper menu item
var active = window.location.pathname.substring(window.location.pathname.lastIndexOf("/")+1);
if (active == "") { active = "index.html"; }

//This is used for sub-pages for sections, using the convention of mainpaige_subpage.html
//This code will properly parse the file name to highlight the proper item in the menu
if (active.lastIndexOf("_") != -1) {
	active = active.substring(0, active.length - active.substring(active.indexOf("_")).length) + "." + active.substring(active.lastIndexOf(".")+1);	
}

var menustring = '<table cellpadding="0" cellspacing="0" width="800">' +
				'<tr bgcolor="#FFFFFF">' +
				'<td style="border-bottom: #000000 1px solid; width: 40px; color: #FFFFFF;">_</td>';
for (a=0; a< menulinks.length; a++) {
	
	if (menulinks[a] == active) {
		menustring = menustring +
		'<td class="activemenu">_</td>';
	} else {
		menustring = menustring +
		'<td class="menu"><a href="' + menulinks[a] + '">' + menuheads[a] + "</a></td>\n";
	}
}
menustring = menustring + '<td class="menu" style="width: 40px; color: #FFFFFF;">_</td></tr>' +
	'<tr><td style="width: 55px;"></td>';
	
for (a=0; a< menulinks.length; a++) {
	if (menulinks[a] == active) {
		menustring = menustring +
		'<td class="activeundermenu" bgcolor="#FFFFFF">' + menuheads[a] + '</td>';
	} else {
		menustring = menustring +
		"<td></td>";	
	}
}
menustring = menustring + '<td style="width: 55px;"></td></tr></table>';

var menucell = document.getElementById('menucell');
menucell.innerHTML = menustring;
}
