var activepagearray = location.href.split("#");
var activepage = activepagearray[1];
function createsub(sid){
	var tblsub, padding, submenu;

	padding = "12";

	switch(sid)
	{
		case "gallerymenu":{
			tblsub = "<table id='" + sid + "' cellspacing='0' cellpadding='0' border='0' style='display:none;'><tr>";
			tblsub = tblsub + "<td valign='middle' align='left'>";
			tblsub = tblsub + "<span>";
			tblsub = tblsub + "<a href='generalinformation.html'>Gallery1</a></span>";
			tblsub = tblsub + "</td></tr></table>";
			break;
		}
	}
	return tblsub;
}

function createmain(show){
	var tbl, submenu, button;
	var padding;
	padding = "0";
	switch(show)
	{
		case "button1":{
			button = "menunav1";
			tbl = "<table id='" + button + "' cellspacing='0' cellpadding='0' border='0'>";
			tbl = tbl + "<tr>";
			tbl = tbl + "<td>";
			if(activepage != "main"){
			    tbl = tbl + "<a href='index.php#main' onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image1','','images/aboutus_mover.jpg',1)\"><img id='Image1' src='images/aboutus_mout.jpg' border='0'></a>";
			}else{
			    tbl = tbl + "<img id='Image1' src='images/aboutus_mover.jpg' border='0'>";
			}
			tbl = tbl + "</td>";
			tbl = tbl + "</tr>";
			tbl = tbl + "</table>";
			break;
		}
		case "button2":{
			button = "menunav2";
			tbl = "<table id='" + button + "' cellspacing='0' cellpadding='0' border='0'>";
			tbl = tbl + "<tr>";
			tbl = tbl + "<td>";
			if(activepage != "login"){
			    tbl = tbl + "<a href='memberlogin.php#login' onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image2','','images/members_mover.jpg',1)\"><img id='Image2' src='images/members_mout.jpg' border='0'></a>";
			}else{
			    tbl = tbl + "<img id='Image2' src='images/members_mover.jpg' border='0'>";
			}
			tbl = tbl + "</td>";
			tbl = tbl + "</tr>";
			tbl = tbl + "</table>";
			break;
		}
		case "button3":{
			button = "menunav3";
			tbl = "<table id='" + button + "' cellspacing='0' cellpadding='0' border='0'>";
			tbl = tbl + "<tr>";
			tbl = tbl + "<td>";
			if(activepage != "abt"){
			    tbl = tbl + "<a href='aboutus.html#abt' onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image3','','images/home_mover.jpg',1)\"><img id='Image3' src='images/home_mout.jpg' border='0'></a>";
			}else{
			    tbl = tbl + "<img id='Image3' src='images/home_mover.jpg' border='0'>";
			}
			tbl = tbl + "</td>";
			tbl = tbl + "</tr>";
			tbl = tbl + "</table>";
			break;
		}
		case "button4":{
			button = "menunav4";
			tbl = "<table id='" + button + "' cellspacing='0' cellpadding='0' border='0'>";
			tbl = tbl + "<tr>";
			tbl = tbl + "<td>";
			if(activepage != "evt"){
			    tbl = tbl + "<a href='rgps_latest.html#evt' onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image4','','images/activities_mover.jpg',1)\"><img id='Image4' src='images/activities_mout.jpg' border='0'></a>";
			}else{
			    tbl = tbl + "<img id='Image4' src='images/activities_mover.jpg' border='0'>";
			}
			tbl = tbl + "</td>";
			tbl = tbl + "</tr>";
			tbl = tbl + "</table>";
			break;
		}
		case "button5":{
			button = "menunav5";
			tbl = "<table id='" + button + "' cellspacing='0' cellpadding='0' border='0'>";
			tbl = tbl + "<tr>";
			tbl = tbl + "<td>";
			if(activepage != "info"){
			    tbl = tbl + "<a href='postings.php#info' onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image5','','images/contactus_mover.jpg',1)\"><img id='Image5' src='images/contactus_mout.jpg' border='0'></a>";
			}else{
			    tbl = tbl + "<a href='postings.php#info'><img id='Image5' src='images/contactus_mover.jpg' border='0'></a>";
			}
			tbl = tbl + "</td>";
			tbl = tbl + "</tr>";
			tbl = tbl + "</table>";
			break;
		}
		case "button6":{
			button = "menunav6";
			tbl = "<table id='" + button + "' cellspacing='0' cellpadding='0' border='0'>";
			tbl = tbl + "<tr>";
			tbl = tbl + "<td>";
			if(activepage != "links"){
			    tbl = tbl + "<a href='sitemap.html#links' onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image6','','images/sitemap_mover.jpg',1)\"><img id='Image6' src='images/sitemap_mout.jpg' border='0'></a>";
			}else{
			    tbl = tbl + "<img id='Image6' src='images/sitemap_mover.jpg' border='0'>";
			}
			tbl = tbl + "</td>";
			tbl = tbl + "</tr>";
			tbl = tbl + "</table>";
			break;
		}
		case "button7":{
			button = "menunav7";
			// tbl = "<table id='" + button + "' cellspacing='0' cellpadding='0' border='0'>";
			// tbl = tbl + "<tr>";
			// tbl = tbl + "<td>";
			// if(activepage != "reg"){
				// tbl = tbl + "<a href='memberregistration.php#reg' onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image7','','images/membersregistration_mover.jpg',1)\"><img id='Image7' src='images/membersregistration_mout.jpg' border='0'></a>";
			// }else{
			    // tbl = tbl + "<img id='Image7' src='images/membersregistration_mover.jpg' border='0'>";
			// }
			// tbl = tbl + "</td>";
			// tbl = tbl + "</tr>";
			// tbl = tbl + "</table>";
			break;
		}
		case "button8":{
			button = "menunav8";
			tbl = "<table id='" + button + "' cellspacing='0' cellpadding='0' border='0'>";
			tbl = tbl + "<tr>";
			tbl = tbl + "<td>";
			tbl = tbl + "<img id='Image8' src='images/links.jpg' border='0'>";
			tbl = tbl + "</td>";
			tbl = tbl + "</tr>";
			tbl = tbl + "</table>";
			break;
		}
		case "button9":{
			button = "menunav9";
			tbl = "<table id='" + button + "' cellspacing='0' cellpadding='0' border='0'>";
			tbl = tbl + "<tr>";
			tbl = tbl + "<td>";
			tbl = tbl + "<a href='http://www.rgps.moe.edu.sg/cos/o.x?c=/wbn/pagetree&func=view&rid=52931' target='_blank' onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image9','','images/rgpspvg_mover.jpg',1)\"><img id='Image9' src='images/rgpspvg_mout.jpg' border='0'></a>";
			tbl = tbl + "</td>";
			tbl = tbl + "</tr>";
			tbl = tbl + "</table>";
			break;
		}
		case "button10":{
			button = "menunav10";
			tbl = "<table id='" + button + "' cellspacing='0' cellpadding='0' border='0'>";
			tbl = tbl + "<tr>";
			tbl = tbl + "<td>";
			tbl = tbl + "<a href='http://www.rgps.moe.edu.sg' target='_blank' onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image10','','images/rgps_mover.jpg',1)\"><img id='Image10' src='images/rgps_mout.jpg' border='0'></a>";
			tbl = tbl + "</td>";
			tbl = tbl + "</tr>";
			tbl = tbl + "</table>";
			break;
		}
		case "button11":{
			button = "menunav11";
			tbl = "<table id='" + button + "' cellspacing='0' cellpadding='0' border='0'>";
			tbl = tbl + "<tr>";
			tbl = tbl + "<td>";
			tbl = tbl + "<div style='color:#EAEAEA;font-size:10px' align='center'>Images & Content Copyright &copy; RGPS Alumni. Google map is Copyright &copy; Google Inc.<br>Web developed, designed and maintained by <a href='http://www.uniddwebdesign.com' target='_blank'>unidd web design</a>. <br>This site has been tested to work with FireFox 2.0 and IE 7.0. <a href='adminlogin.php'>Administrator Login</a> / <a href='timesheet/login.php'>Teachers Login</a>.</div>";
			tbl = tbl + "</td>";
			tbl = tbl + "</tr>";
			tbl = tbl + "</table>";
			break;
		}
		case "button12":{
			button = "menunav12";
			// tbl = "<table id='" + button + "' cellspacing='0' cellpadding='0' border='0'>";
			// tbl = tbl + "<tr>";
			// tbl = tbl + "<td>";
			// if(activepage != "pos"){
			    // tbl = tbl + "<a href='postings.php#pos' onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image12','','images/activityposting_mover.jpg',1)\"><img id='Image12' src='images/activityposting_mout.jpg' border='0'></a>";
			// }else{
			    // tbl = tbl + "<img id='Image12' src='images/activityposting_mover.jpg' border='0'>";
			// }
			// tbl = tbl + "</td>";
			// tbl = tbl + "</tr>";
			// tbl = tbl + "</table>";
			break;
		}
		case "button13":{
			button = "menunav13";
			tbl = "<table id='" + button + "' cellspacing='0' cellpadding='0' border='0'>";
			tbl = tbl + "<tr>";
			tbl = tbl + "<td>";
			if(activepage != "reg2"){
				tbl = tbl + "<a href='http://www.rgpsalumni.org.sg/myuploads/brochures/32200906051244171404.pdf' onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image13','','images/donation_mover.jpg',1)\" target='_blank'><img id='Image13' src='images/donation_mout.jpg' border='0'></a>";
			}else{
				tbl = tbl + "<img id='Image13' src='images/donation_mover.jpg' border='0'>";
			}
			tbl = tbl + "</td>";
			tbl = tbl + "</tr>";
			tbl = tbl + "</table>";
			break;
		}
	}
	writeMenu(tbl);
}