///////////////////////////////////////////////////////////////////////////////
//menu_top.js 
///////////////////////////////////////////////////////////////////////////////
//
//Common horizontal menus for the bottom of page.
//Must work with navigator browser.
//
//Author: Vincent Chow 
//Copyright (c)2004 by Vincent Chow.
//
///////////////////////////////////////////////////////////////////////////////

//initialize variables
//arrays of the menu descriptions and urls
	var arrHref = new Array("index.html","mccAbout.htm","mccCFY.htm","mccChampions.htm","mccArchive.htm","mccGrandpp.htm","mccSchedule.htm","mccLinks.htm","mailto:chessking123@hotmail.com"); 
	var arrDescription = new Array("Home","About Us","Chess For Kids","Champions List","Archives","Grand Prix","Schedule","Links","Email Us");

//identify current page to disable link
	var sThisUrl = new String(parent.location);
	var iPosSlash = sThisUrl.lastIndexOf("/");
	var currPage = sThisUrl.substr(iPosSlash+1, eval(sThisUrl.length-iPosSlash));
	var iNumberOfUrls = arrHref.length;

	document.write("<center>");
	document.write("<TABLE NAME='tblBottomMenu' id='tblBottomMenu' BORDER='0' CELLSPACING='0' CELLPADDING='0' width='100%'>");
	document.write("	<TR>");
	document.write("		<TD align='center'><img src='pics/spacer.gif' width='2' height='1'/>|&nbsp;");
	
	if (currPage.length==0)	{currPage="index.html"}	//if page is blank such as http://www.../chess/
	
	for (i=0;i<iNumberOfUrls;i++)
	{
	  strUrl = arrHref[i];
	  if  (strUrl!=currPage)
		{
			document.write("<font size=1><a href='" + strUrl + "'>" + arrDescription[i] + "</a></font>&nbsp;|&nbsp;");			//with link
		}
		else
		{
			document.write("<font size='1' color='BROWN'>"+ arrDescription[i] + "</font>&nbsp;|&nbsp;");	//no link
		}
	}
	document.write("		</TD>");
	document.write("	</TR>");
	document.write("	<TR>");
	document.write("		<TD align='left'><img src='pics/spacer.gif' width='1' height='1'/>");
	document.write("		</TD>");
	document.write("	</TR>");

	document.write("</TABLE>");
	document.write("</center>");
