

//set this equal to the very first link in the menu bar

var first = "index.htm";



//this specifies the total width of the page

var totWidth = "95%";



//store links as an array **NOTE:ORDER WRITTEN IS THE ORDER LINKS WILL BE DISPLAYED!!**

//array format is:  links["FILE_NAME"] = "MENU_NAME";

var links = new Array();

links["index.htm"] = "Home";

links["academic.htm"] = "Academic Resources";

links["frequent.htm"] = "Frequent Links";

links["reference.htm"] = "Reference Desk";

links["search.htm"] = "Web Search";

links["publications.htm"] = "Publications";

links["economics.htm"] = "Economics, Policy, &amp; Politics";

links["entertainment.htm"] = "Entertainment &amp; Hobbies";

links["medicine.htm"] = "Medicine &amp; Health";

links["travel.htm"] = "Travel &amp; Culture";

links["shopping.htm"] = "Shopping &amp; Up-to-the-Minute";

links["misc.htm"] = "Miscellaneous Links";



//array format is:  links["FILE_NAME"] = "TITLE_NAME";

var title = new Array();

title["index.htm"] = "Eric M. Eisenstein";

title["academic.htm"] = "Academic Resources";

title["frequent.htm"] = "Frequent Links";

title["reference.htm"] = "Reference Desk";

title["search.htm"] = "Web Search";

title["publications.htm"] = "Publications";

title["economics.htm"] = "Economics, Policy, &amp; Politics";

title["entertainment.htm"] = "Entertainment &amp; Hobbies";

title["medicine.htm"] = "Medicine &amp; Health";

title["travel.htm"] = "Travel &amp; Culture";

title["shopping.htm"] = "Shopping &amp; Up-to-the-Minute";

title["misc.htm"] = "Miscellaneous Links";



//store header images as an array

//array format is:  links["FILE_NAME"] = "IMAGE_NAME";

var images = new Array();

images["index.htm"] = "home.gif";

images["academic.htm"] = "acad.gif";

images["frequent.htm"] = "freq.gif";

images["reference.htm"] = "reference.gif";

images["search.htm"] = "search.gif";

images["publications.htm"] = "pub.gif";

images["economics.htm"] = "econ.gif";

images["entertainment.htm"] = "entertainment.gif";

images["medicine.htm"] = "medicine.gif";

images["travel.htm"] = "travel.gif";

images["shopping.htm"] = "shopping.gif";

images["misc.htm"] = "misc.gif";



var spacerShort = "<tr><td class=\"spacerShort\">&nbsp;</td></tr>";

var spacerLong = "<tr><td class=\"spacerLong\">&nbsp;</td></tr>";

var begLinkTag = "<tr><td class=\"leftLink\"><div class=\"rollover\">";

var begCurrTag = "<tr><td class=\"leftLink\"><div class=\"current\">";

var anchor1 = "<a href=\"";

var anchor2 = "\">";

var anchor3 = "</a>";

var endTag = "</div></td></tr>";



var body1 = "<table align=\"center\" width=\"" + totWidth + "\" cellspacing=\"0\" cellpadding=\"0\">"+

			"<tr>"+

				"<td class=\"topElement\" align=\"center\">"+

					"<a href=\"http://sbm.temple.edu\" >"+

						"<img src=\"images/templelogo.gif\" border=\"0\" alt=\"Fox School of Business\" style=\"vertical-align:middle;\">"+

					"</a>"+

				"</td>"+

				"<td background=\"images/";

				

					//images goes here

					

var body2 = 	"\" width=\"110px\" height=\"108px\">"+

					"&nbsp;"+

				"</td>"+

				"<td background=\"images/bg_header.gif\" height=\"108px\">"+

					"<div style=\"position:relative; color:#484848; left:5px; top:27px; font-family:Times New Roman, Times, serif; font-size:40px; vertical-align:top;\">";

					

					//title goes here

					

var body3 = 		"</div>"+

				"</td>"+

				"<td background=\"images/bg_header_end.gif\" height=\"108px\" width=\"7px\">"+

					"&nbsp;"+

				"</td>"+

			"</tr>"+

			"</table>"+

			"<table align=\"center\" width=\"" + totWidth + "\" cellspacing=\"0\" cellpadding=\"0\">"+

			"<tr>"+

				"<td class=\"bottomElement\">"+

					"<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">";



var body4 = "</table></td><td class=\"bottomRight\">";



function createLinks(current)

{

	var retString = body1 + images[current] + body2 + title[current] + body3 + spacerShort + spacerShort;																									  

	

	for(var i in links)

	{

		if(i == current)

		{

			retString += begCurrTag + links[i] + endTag;

		}

		else

		{

			retString += begLinkTag + anchor1 + i + anchor2 + links[i] + anchor3 + endTag;

		}

	}

	return retString + body4;

}



var body5 = "</td></tr></table><table align=\"center\" width=\"" + totWidth + "\" cellspacing=\"0\" cellpadding=\"0\">";

var body6 = "</table>";



function createBottomLinks(current)

{

	var retString = body5 + "<tr><td class=\"bottomLinks\"><div class=\"endLinks\">";

	

	for(var i in links)

	{

		if((i == current) && (i == first))

		{			

			retString += links[i];

		}

		else if((i == current) && (i != first))

		{

			retString += "&nbsp;|&nbsp;" + links[i];

		}

		else if((i != current) && (i == first))

		{

			retString += anchor1 + i + anchor2 + links[i] + anchor3;

		}

		else

		{

			retString += "&nbsp;|&nbsp;" + anchor1 + i + anchor2 + links[i] + anchor3;

		}

	}

	return retString + endTag + body6;

}
