/*
 * Writes the menu bar at the top of the TIDE pages
 */
function mainMenu(title,graphic)
{
        var urlBase, bgcolor, nl;
	var mMenu = new Array();

	urlBase = "http://www.njtide.org/";

	mMenu["Home"]         = urlBase+"index.html";
	mMenu["Overview"]     = urlBase+"overview/index.html";
	mMenu["Research Areas"]     = urlBase+"research/index.html";
	mMenu["Reports/Papers"]      = urlBase+"reports/index.html";
	mMenu["People"]       = urlBase+"people/index.html";
	mMenu["Sponsors"]     = urlBase+"sponsors/index.html";
	mMenu["Tutorials"]    = urlBase+"tutorials/index.html";
	mMenu["Links"]        = urlBase+"links/index.html";
	mMenu["Presentations"]        = urlBase+"presentations/index.html";
	mMenu["Announcement"]        = urlBase+"announcement/index.html";

	bgcolor = "#000000";



	document.writeln("<TABLE WIDTH=\"100%\">");
	document.writeln("<TR BGCOLOR=\""+bgcolor+"\">");

	for (n in mMenu) {

		if (title.toLowerCase() != n.toLowerCase()) {
			document.writeln("<TD ALIGN=\"CENTER\" WIDTH=\""+100/(n+1)+"%\">");
			document.writeln("<FONT FACE=\"Arial,Helvetica,sans-serif\" STYLE=\"BOLD\"  SIZE=\"-2\">");
			document.writeln("<A HREF=\""+mMenu[n]+"\">"+n+"</A>");
			document.writeln("</FONT>");
			document.writeln("</TD>");
		}

	}

	document.writeln("</TR>");
	document.writeln("</TABLE>");


	if (title.toLowerCase() != "home") {

		document.writeln("<TABLE WIDTH=\"100%\" BGCOLOR=\"#FFFFFF\" BORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\">");
		document.writeln("<TR>");
		document.writeln("<TD WIDTH=\"141\" BGCOLOR=\"#00CCFF\" VALIGN=\"MIDDLE\"><A HREF=\""+urlBase+"index.html\"><IMG SRC=\""+urlBase+"logocurve.gif\" BORDER=\"0\"></A></TD>");
		document.writeln("<TD  BGCOLOR=\"00CCFF\" ALIGN=\"LEFT\">");
		document.writeln("<FONT SIZE=\"+3\"><B>"+title+"&nbsp;&nbsp;&nbsp;&nbsp;</B></FONT>");
		document.writeln("</TD>");
		if (graphic != null) document.writeln("<TD BGCOLOR=\"00CCFF\" ALIGN=\"RIGHT\"><IMG SRC=\""+graphic+"\"></TD>");
		document.writeln("</TR>");
		document.writeln("</TABLE>");
	}
}



function sideMenu(title)
{
	/*
	**  NOTE: sMenu should be defined in a directory-specific
	**        file named sMenu.js
	*/


	document.writeln("<TABLE>");
	document.writeln("<TR>");
	document.writeln("<TD WIDTH=\"15%\" VALIGN=\"TOP\">");

	for (n in sMenu) {

		if (title.toLowerCase() != n.toLowerCase()) {
			document.writeln("<P><BR></P>");
			document.writeln("<A HREF=\""+sMenu[n]+"\">"+n+"</A>");
		}

	}

	document.writeln("<P><BR></P>");
	document.writeln("</TD>");

	document.writeln("<TD WIDTH=\"85%\" VALIGN=\"TOP\">");
	document.writeln("<P><BR></P>");

	/* NOTE: The TABLE is closed by writeCopyright */
}


function writeFooter()
{
     document.writeln("</TD>");
     document.writeln("</TR>");
     document.writeln("</TABLE>");
}
