/* 
 * This is the table portion of the webpage. You can change the common elements of the page here.
 */


/* 
 * function will take in the filename located in imgs file (without jpg extension) and load it on
 * mouseover for event in which it is delcared
 *    Image must have extension .jpg case-sensitive and be in directory imgs/!!
 */
function swapImage(name){
	document.getElementById("changeImg").src="imgs/"+name+".jpg"	
}

/*
 * Function will redisplay original menu (i.e. wethepeople.jpg)
 *
 */
function returnImage(){
	document.getElementById("changeImg").src="imgs/wethepeople.jpg"
}

/*
 * incorporartes the top portion of table before content!
 */
function displayTop (menu){
	var spec =""
	var widthval = screen.width-21
	var heightval = screen.height
	if (menu != "moe"){
		spec ="../"
	}

	document.write("<table border='0' cellpadding='0' cellspacing='0' width='"+widthval+"' height='600'>\
	<tr>\
		<td valign='top' background='"+spec+"images/topback.jpg' colspan='2' height='160'>\
		<img border='0' src='"+spec+"images/top.jpg' ></td>\
	</tr>\
	<tr>\
		<td valign='top' width='160' background='"+spec+"images/sideback.jpg'>\
		<table border='0' width='160' background='"+spec+"images/sidebar.jpg' height = '390' id='menu'>\
			<tr>\
				<td height='1'>&nbsp;</td>\
			</tr>")
			
		if (menu == "moe" || menu == "cus"){
			document.write("<tr><th><a class='menu' href='"+spec+"album.htm'>Album</a></th></tr>\
			<tr><th><a class='menu' href='"+spec+"india.htm'>India Trip</a></th></tr>\
			<tr><th><a class='menu' href='"+spec+"wallpaper.htm'>Wallpaper</a></th></tr>\
			<tr><th><a class='menu' href='"+spec+"jokes.php'>Jokes</a></th></tr>\
			<tr><th><a class='menu' href='"+spec+"links.htm'>Links</a></th></tr>\
			<tr><th><a class='menu' href='"+spec+"abtmoe.htm'>Moe</a></th></tr>\
			<tr><th><a class='menu' href='"+spec+"bhabhi.htm'>Bhabhi <br>Card Game</a></th></tr>\
			<tr><th>&nbsp;</th></tr>\
			<tr><th><a class='menu' href='"+spec+"maltonhistory/intro.htm'>About Malton</a></th></tr>")
		}
		else {	
			// remember, these menus will be run from the maltonhistory path!!		
			document.write("<tr><th><a class='menu' href='timeline.htm'>Timeline</a></th></tr>\
			<tr><th><a class='menu' href='intro.htm'>Introduction</a></th></tr>\
			<tr><th><a class='menu' href='foundation.htm'>Foundation</a></th></tr>\
			<tr><th><a class='menu' href='townofmalton.htm'>Town of Malton</a></th></tr>\
			<tr><th><a class='menu' href='westwoodmall.htm'>Westwood Mall</a></th></tr> \
			<tr><th><a class='menu' href='firstschools.htm'>Early Schools</a></th></tr>\
			<tr><th><a class='menu' href='schoolhistory.htm'>Schools</a></th></tr>\
			<tr><th><a class='menu' href='maltonairport.htm'>Aviation</a></th></tr>\
			<tr><th><a class='menu' href='sources.htm'>Sources</a></th></tr>\
			<tr><th><a class='menu' href='maltonmap.htm'>Maps</a></th></tr> \
			<tr><th>&nbsp;</th></tr> \
			<tr><th><a class='menu' href='../main.htm'>Moe's Content</a></th></tr>")
		}
			
			document.write("<tr> <td height='100%'>&nbsp;</td>\
			</tr>\
		</table>\
		</td>\
		<td class='cont' valign='top' height='446' width='100%'>")
}

/* 
 * incorporates the bottom portion of table after content!
 */
function displayBottom(){

	document.write="</td></tr></table>"

}


/*
 * removes the sitmap if external javascript can be read
 */
function removeSiteMap(){
	document.getElementById('sitemaploc').innerHTML="<!--aa-->"
}

/*
			<tr><th><a class='menu' href='"+spec+"custom/index.htm'>Custom <br>Software</a></th></tr>\
			<tr><th><a class='menu' href='"+spec+"photo.htm'>Photo <br>Restoration</a></th></tr>\
*/