

/*
this goes in the head tags of the HTML pages
  <script language="javascript" src="js/Submenu.js"></script>


this goes in the HTML body where you want the menu drawn
  <script language="javascript">drawMenu();</script>

*/


function drawMenu()
{
	// create the string for the submenu along the top of the inner pages	
	strMenu = "<table width=\"910\" height=\"158\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" id=\"Header\">" +
				"<tr><td width=\"12%\" height=\"158\"><a href=\"http:\/\/www.temple.edu\">" + 
				"<img src=\"http:\/\/www.temple.edu\/wi\/images\/Temple_bw.jpg\" alt=\"Temple Logo\" width=\"200\" height=\"54\" border=\"0\"></a></td>" + 
				"<td width=\"75%\"><div align=\"center\"><a href=\"http:\/\/www.temple.edu\/wi\">" + 
				"<img src=\"http:\/\/www.temple.edu\/wi\/images\/WILogo1.jpg\" alt=\"Writing Program Logo\" width=\"415\" height=\"200\" border=\"0\"><\/a><\/div><\/td>" +
				"<td width=\"13%\"><div align=\"center\"><a href=\"http:\/\/www.temple.edu\/wi\">" + 
				"<img src=\"http:\/\/www.temple.edu\/wi\/images\/Paper.jpg\" alt=\"Writing Pedagogy\" width=\"152\" height=\"140\" border=\"0\">" + 
				"<\/a><\/div><\/td><\/tr><\/table>" +
				"<table width=\"82%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">" + 
				"<tr bgcolor=\"#CCCC99\"><td align=\"left\">" +
				"<table width=\"100%\" height=\"190%\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\">" +
				"<tr align=\"center\" valign=\"middle\" bgcolor=\"006699\">" +
				"<td width=\"23%\" height=\"30\" bgcolor=\"006699\"><p>" + 
				"<a href=\"http:\/\/www.temple.edu\/wi\/faculty_resources\/for_faculty.htm\" class=\"main_menu\">FOR FACULTY<\/a> " +
				"<\/p><\/td><td width=\"30%\" height=\"30\" bgcolor=\"006699\"><p>" +
				"<a href=\"http:\/\/www.temple.edu\/wi\/admin_resources\/for_admins.htm\" class=\"main_menu\">FOR DEPARTMENT CHAIRS & ADMINISTRATORS<\/a>" +
				"<\/p><\/td><td width=\"23%\" height=\"30\" bgcolor=\"006699\"><p>" +
				"<a href=\"http:\/\/www.temple.edu\/wi\/student_resources\/for_students.htm\" class=\"main_menu\">FOR STUDENTS<\/a>" + 
				"<\/p><\/td><td width=\"24%\" height=\"30\" bgcolor=\"006699\"><p>" +
				"<a href=\"http:\/\/www.temple.edu\/writingctr\" class=\"main_menu\">FOR WRITING CENTER<\/a>" +
				"<\/p><\/td><\/tr><!-- tr bgcolor=\"6666cc\"><td height=\"19\" colspan=\"4\" align=\"center\" valign=\"middle\">&nbsp;<\/td>" +
				"</tr --></table></td></tr></table>";
	
	
	document.write(strMenu);
}




function drawMenu_OLD()
{
	// create the string for the submenu along the top of the inner pages	
	strMenu = "<table cellspacing=\"0\" cellpadding=\"0\"><tr>" + 
			"<td><a href=\"Main.aspx\"><img id=\"mnuHome\" src=\"Image/buttons/home_up1.gif\" onmouseover=\"showSubMenu(\'home\', " + 
			"\'home_over1.gif\', \'mnuHome\')\" onmouseout=\"showSubMenu(\'home\', \'home_up1.gif\', " +
			"\'mnuHome\')\" border=\"0\"></a></td>" +
			"<td><a href=\"Main.aspx?Ctl=process.ascx\"><img id=\"mnuProcess\" src=\"Image/buttons/process_up1.gif\" onmouseover=\"showSubMenu(\'process\', " +
			"\'process_over1.gif\', \'mnuProcess\')\" onmouseout=\"showSubMenu(\'process\', \'process_up1.gif\', " +
			"\'mnuProcess\')\" border=\"0\"></a></td>" +
			"<td><a href=\"Main.aspx?Ctl=knowledge.ascx\"><img id=\"mnuKnowledge\" src=\"Image/buttons/knowledge_up1.gif\" onmouseover=\"showSubMenu(\'" + 
			"knowledge\', \'knowledge_over1.gif\', \'mnuKnowledge\')\" onmouseout=\"showSubMenu(\'knowledge\', " +
			"\'knowledge_up1.gif\', \'mnuKnowledge\')\" border=\"0\"></a></td>" +			
			"<td><a href=\"Main.aspx?Ctl=tools.ascx\"><img id=\"mnuTools\" src=\"Image/buttons/tools_up1.gif\" onmouseover=\"showSubMenu(\'tools\', " +
			"\'tools_over1.gif\', \'mnuTools\')\" onmouseout=\"showSubMenu(\'tools\', \'tools_up1.gif\', " +
			"\'mnuTools\')\" border=\"0\"></a></td>" +
			"<!-- td onmouseover=\"closeSubMenu()\"><img src=\"image/buttons/searchbar.gif\" border=\"0\"></td -->" +
			"</tr></table>" +
			"<table width=\"100%\"><tr><td>" +
			"<div id=\"divSubmenu\" style=\"height:60px;width:500px;\"></div>" +
			"</td></tr></table>"
	
	document.write(strMenu);
}



function showSubMenu(menu, imgName, imgID)
{
	var over = /over/gi;
	
	switchMenu(imgName, imgID);

	// section for submenu
	d = document.getElementById("divSubmenu");
	
	// if this is not the image for "home"
	if (menu == "home")
	{
		d.innerHTML = "";
	}
	else
	{
		// if the user is moused over the menu button...
		if (over.test(imgName))
		{
			strLinks = getPortalLinks(menu);
			strMenu = strLinks.replace(/<br>/gi, "&nbsp;|&nbsp;");
			//strMenu = strMenu.replace(/class=\"menu\"/gi, "");
			
			d.innerHTML = strMenu;
		}
		/* else
		{
			d.innerHTML = "";
		} */
	}
}


function bottomLinks()
{
	var output = "<table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">" +
		"<tr bgcolor=\"006699\"><td height=\"30\" align=\"center\" valign=\"middle\">" +
		/*"<a href=\"http:\/\/www.temple.edu\/writingctr\/hours_locations.htm\" class=\"main_menu\">Hours and Locations<\/a>" +
		"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" +
		"<span class=\"menu_text\">&middot;<\/span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" + 
		"<a href=\"http:\/\/www.temple.edu\/writingctr\/wcinfo.htm\" class=\"main_menu\">Information About the Writing Center<\/a>" +
		"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"menu_text\">&middot;<\/span>" +
		"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" +
		"<a href=\"http:\/\/www.temple.edu\/writingctr\/contact.html\" class=\"main_menu\">Contact Us<\/a>*/
		"<\/td><\/tr>";
	
	document.write(output);
}


function copyrightInfo()
{
	var output = "<table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#ffffff\">" +
		"<tr><td colspan=\"2\">&nbsp;<\/td><\/tr>" +
		"<tr><td width=\"48%\" class=\"copyright\">Content and design&copy;2007, Temple University.<br>All Rights Reserved.<br>" +
		"Jaime Lynn Longo, Web Manager.<br>This <a href=\"http:\/\/www.temple.edu\/wi\" class=\"copyrightlink\">site<\/a> is best viewed " +
		"with IE 6.x+ or Firefox 2.0.<\/td><td width=\"52%\" class=\"copyright\" align=\"right\">Temple University Writing Program<br>" +
		"Dr. Lori A. Salem, Assistant Vice Provost<br>Director, Temple University Writing Program<br><a href=\"http:\/\/www.temple.edu\/vpus\/\" class=\"copyrightlink\">Office of the Vice-Provost for " +
		"Undergraduate Studies<\/a><br><a href=\"http:\/\/www.temple.edu\/\" class=\"copyrightlink\">Temple University<\/a><\/td><\/tr>" +
		"<\/table><p>&nbsp;<\/p>";
	
	document.write(output);
}
