var IE  = (document.all ? true : false);
var NS  = (document.layers);

function WriteTopMenu(sMenuName, sAnchor, sDisabledMenuName)
{
	var bMenuItemDisabled = false
	
	document.write("		<TD>")
	if( sMenuName == "HELP" ) document.write("| ")
	
	if ( sDisabledMenuName.toUpperCase().indexOf(sMenuName.toUpperCase() ) > -1) bMenuItemDisabled = true
	
	if( bMenuItemDisabled )
		document.writeln("<span class=clsToolbarDisabled>" + sMenuName + " </span>|</TD>")
	else
		document.writeln("<A class=\"clsToolbar\" " + 
			"name=\"toolhelp\" target=_top href=\"" + sAnchor + "\">" + sMenuName + 
			"</A> |</B></TD>")
}

function WritePageBanner(sSecondName, sPageTypeName, sDisabledMenuName)
{
/*
	document.writeln("<TABLE align=center>")
	document.writeln("	<TR>")
	WriteTopMenu("HELP", "../pages/page_help.htm", sDisabledMenuName)
	WriteTopMenu("INDEX", "../pages/page_index.htm", sDisabledMenuName)
	if ( sFirstName.toUpperCase().indexOf("GENERAL") > -1 || sFirstName == "" )
	{
		WriteTopMenu("SYSTEM MENU", "../pages/menu_system.htm#spx" + window.location.search, "SYSTEM MENU")
	}else{
		WriteTopMenu("SYSTEM MENU", "../pages/menu_system.htm#spx" + window.location.search, sDisabledMenuName)
	}
	WriteTopMenu("MAIN MENU", "../pages/menu_main.htm", sDisabledMenuName)
	document.writeln("	</TR>")
	
	document.writeln("</TABLE>")
*/
	document.writeln("<BR><BR>")

	var sFirstName = "Welcome to My World";
	 
	if ( sFirstName.toUpperCase() == sSecondName.toUpperCase() ) sSecondName = ""
	
	var sBannerLine1 
	if (sSecondName != "")
	{
		sBannerLine1 = sFirstName.toUpperCase() + ": " + sSecondName
	}else{
		sBannerLine1 =  sFirstName.toUpperCase()
	}
	 
	var sBannerLine2 = sPageTypeName

	document.writeln("<TABLE border=1 width=\"85%\" align=center>")
	document.writeln("<TR>")
	document.writeln("<TD class=clsBanner bgcolor=\"#999999\" align=\"center\" valign=\"middle\">")
	document.writeln("&nbsp;" + sBannerLine1 + "&nbsp;")
	
	if (sBannerLine2)
	{
		document.writeln("<BR><BR>")
		document.writeln("&nbsp;" + sBannerLine2 + "&nbsp;")
	}
	
	document.writeln("</TD>")
	document.writeln("</TR>")
	document.writeln("</TABLE>")
	
	document.writeln("<BR><BR>")
}

function WriteMenu()
{
	document.writeln("<BR><BR><BR>")

	document.writeln("<TABLE align=center>")
/*	
	document.writeln("<TR>")
	document.writeln("<TD align=middle>")
	document.writeln("<FORM method=GET action=\"http://www.google.com/search\">")
//    document.writeln("<TABLE bgcolor=\"#FFFFFF\"><tr><td>")
//    document.writeln("<A HREF=\"http://www.google.com/\">")
//    document.writeln("<IMG SRC=\"http://www.google.com/logos/Logo_40wht.gif\" border=\"0\" ALT=\"Google\" align=\"absmiddle\"></A>")
    document.writeln("<INPUT TYPE=text name=q size=35 maxlength=255 value=\"\">")
    document.writeln("<INPUT type=submit name=btnG VALUE=\"Search the Internet\">")
//    document.writeln("</td></tr></TABLE>")
    document.writeln("</FORM>")
	document.writeln("</TD>")
	document.writeln("</TR>")
*/
	document.writeln("<TR>")
	document.writeln("<TD align=middle>")
	document.writeln("<A href=\"http://math.tulane.edu/~xsun1\">Home</A> |")
//	document.writeln("<A href=\"http://math.tulane.edu/~xsun1/termofuse.htm\">Terms of Use</A> | ")
	document.writeln("<A href=\"http://math.tulane.edu/~xsun1/mathgame.htm\">Academic</A> |") 
	document.writeln("<A href=\"http://math.tulane.edu/~xsun1/toolbox.htm\">Toolbox</A> | ")
	document.writeln("<A href=\"mailto:xsun1  <AT> tulane <DOT> edu\">Contact Me</A> |")
	document.writeln("<A href=\"http://math.tulane.edu/~xsun1/myself.htm\">Help</A>")
	document.writeln("</TD>")
	document.writeln("</TR>")
	document.writeln("</TABLE>")

	document.writeln("<BR><BR>")
}
