// all scripts on abccr.org are Copyright 2001 by Aaron Ansell

// this script checks against pageID variable located on .shtml page
// if pageID isn't set, the script won't place background on any menu item
// pageID must be a number from 0 to 9 (number of menu items starting at 0)
// hint: look at the array setup below for pageID

// VARIABLES //
	var menuItem = new Array;
	var menuURL = new Array;

	menuItem[0]="News";
	menuItem[1]="Calendar";
	menuItem[2]="Camps";
	menuItem[3]="Missions";
	menuItem[4]="Staff";
	menuItem[5]="Directory";
	menuItem[6]="Vision Statement";
	menuItem[7]="Links";
	menuItem[8]="FOCUS Newsletter";
	menuItem[9]="Email Alerts";
	menuItem[10]="FAQ";
//	menuItem[10]="Resources";
	
	menuURL[0]="/";
	menuURL[1]="/calendar.shtml";
	menuURL[2]="/campconf/";
	menuURL[3]="/missions.shtml";
	menuURL[4]="/staff/";
	menuURL[5]="/directory/";
	menuURL[6]="/vision.shtml";
	menuURL[7]="/links.shtml";
	menuURL[8]="/focus/";
	menuURL[9]="/maillistjoin.shtml";
	menuURL[10]="/FAQs.shtml";
//	menuURL[10]="/resources/";

function buildMenu2() {	

// begin menu table	
	document.write('<table width="95" border="0" cellspacing="1" cellpadding="0" align="center" background="/images/spacer.gif" id="nav_menu">');
// begin loop through menuItems
	for(var i=0; i < menuItem.length; i++) {
// open table row and data cell

// if pageID isn't matched write menu_off item, else write menu_on item
// this is using "negative logic" for speed optimization -
// out of 10 menuItems, only one will be menu_on on any give page
		if( i != pageID) {
			document.write('<tr><td>');
			document.write('<a class="menu_off" href="' + menuURL[i] + '">');
		}
		else {
			document.write('<tr bgcolor="#743D29"><td>');
			document.write('<a class="menu_on" href="' + menuURL[i] + '">');
		}
// write menuItem, close anchor, close table data cell and row
		document.write( menuItem[i] + '</a>');
		document.write('</td></tr>');
	}
// end menu table
	document.write('</table>');	
}

function buildTextLinks() {
	for(var i=0; i < menuItem.length; i++) {
		if(i != 0)
			document.write(' - ');
		document.write('<a href="' + menuURL[i] + '">' + menuItem[i] + '</a>');
	}
}