var linkarray=new Array();
linkarray[0]="http://www.bikenewyork.org/rides/fbbt/index.html";
linkarray[1]="http://www.bikenewyork.org/rides/fbbt/register.html";
linkarray[2]="http://www.bikenewyork.org/shop/fbbt_09.html";
linkarray[3]="";
linkarray[4]="http://www.bikenewyork.org/rides/fbbt/photo_contest.html";
linkarray[5]="http://www.bikenewyork.org/shop/photos.html";
linkarray[6]="http://www.bikenewyork.org/rides/fbbt/photo_gallery_2009.html";
linkarray[7]="http://www.bikenewyork.org/rides/fbbt/photo_gallery_08.html";
linkarray[8]="http://www.bikenewyork.org/rides/fbbt/photo_gallery.html";
linkarray[9]="";
linkarray[10]="http://www.bikenewyork.org/rides/fbbt/schedule.html";
linkarray[11]="http://www.bikenewyork.org/rides/fbbt/route_map.html";
linkarray[12]="http://www.bikenewyork.org/rides/fbbt/services.html";
linkarray[13]="http://www.bikenewyork.org/rides/fbbt/children.html";
linkarray[14]="http://www.bikenewyork.org/rides/fbbt/rules_security.html";
linkarray[15]="http://www.bikenewyork.org/rides/fbbt/festival.html";
linkarray[16]="http://www.bikenewyork.org/rides/fbbt/getting_there.html";
linkarray[17]="http://www.bikenewyork.org/rides/fbbt/lodging.html";
linkarray[18]="http://www.bikenewyork.org/rides/fbbt/training.html";
linkarray[19]="http://www.bikenewyork.org/rides/fbbt/volunteer.html";
linkarray[20]="http://www.bikenewyork.org/rides/fbbt/sponsors_partners.html";
linkarray[21]="http://www.bikenewyork.org/rides/fbbt/become_sponsor.html";

linkarray[22]="http://www.bikenewyork.org/rides/fbbt/rider_news_profiles.html";
linkarray[23]="";
linkarray[24]="http://www.bikenewyork.org/rides/fbbt/history.html";
linkarray[25]="http://www.bikenewyork.org/rides/fbbt/about_bridges.html";
linkarray[26]="http://www.bikenewyork.org/rides/fbbt/fun_facts.html";
linkarray[27]="http://www.bikenewyork.org/rides/fbbt/environment.html";
linkarray[28]="http://www.bikenewyork.org/rides/fbbt/media.html";

var structure=new Array();
	structure[0]="main";
	structure[1]="main";
	structure[2]="main";
	structure[3]="main";
	structure[4]="sub";
	structure[5]="sub";
	structure[6]="sub";
	structure[7]="sub";
	structure[8]="sub";	
	structure[9]="main";
	structure[10]="sub";
	structure[11]="sub";
    structure[12]="sub";
	structure[13]="sub";
	structure[14]="sub";
	structure[15]="sub";
	structure[16]="sub";
	structure[17]="sub";
	structure[18]="main";
	structure[19]="main";
	structure[20]="main";
	structure[21]="sub";

	structure[22]="main";
	structure[23]="main";
	structure[24]="sub";
	structure[25]="sub";
	structure[26]="sub";
	structure[27]="sub";
	structure[28]="main";
	

var linktext=new Array();
	linktext[0]="Home";
	linktext[1]="Registration Info";
	linktext[2]="Merchandise";
	linktext[3]="Photos";
	linktext[4]="\-Photo Contest";
	linktext[5]="\-brightroom<br />Participant Photos";
	linktext[6]="\-2009 Gallery";	
	linktext[7]="\-2008 Gallery";	
	linktext[8]="\-2007 Gallery";	
	linktext[9]="Practical Info";
	linktext[10]="\-Schedule";
	linktext[11]="\-Route Map";
	linktext[12]="\-Services";
	linktext[13]="\-Touring with Children<br />or Groups";
	linktext[14]="\-Rules and Security";
	linktext[15]="\-Festival";
	linktext[16]="\-Getting There";
	linktext[17]="\-Lodging";
	linktext[18]="Training";
	linktext[19]="Volunteer";
	linktext[20]="Sponsors and Partners";
	linktext[21]="\-Become a Sponsor";
	linktext[22]="Rider News and Profiles";
	linktext[23]="Tour Background";
	linktext[24]="\-History\, Since 1977";
	linktext[25]="\-About the Bridges";
	linktext[26]="\-Fun Facts";
	linktext[27]="\-Environmental Impact";
	linktext[28]="Media";

function getCurrentPage() {
	var page=document.URL;
	for(i=0;i<linkarray.length;i++) {
		if (linkarray[i]==document.URL) {
			//alert("match");	
			return i;
		}	
	}
}

function makenav(){
	var str='';
	str+='<table cellpadding="4" cellspacing="1" class="menu" width="135" border="0">';
	for(j=0;j<linkarray.length;j++) {
		str+='<tr>';
		if(getCurrentPage()==j) {
			str+='<td class="leftnav_box_selected"><span class="leftnav_' + structure[j] + '_selected">' + linktext[j] + '<\/span><\/td>';
		 } else if ((linktext[j]=="Practical Info") || (linktext[j]=="Photos") || (linktext[j]=="Tour Background")) {
				//not a link- use blueheadline style
				str+='<td class="leftnav_' + structure[j] + '"><span class="nolink">' + linktext[j] + '<\/span><\/td>';
			}
		 else {
				 str+='<td class="leftnav_' + structure[j] + '"><a class="leftnav_' + structure[j] + '" href="' + linkarray[j] + '">' + linktext[j] + '<\/a><\/td>';
			
			}
	str+='<\/tr>';
	}	
	
	
	str+='<tr><td class="leftnav_box_m">&nbsp;</td></tr>';

	
	



	
	str+='<\/table>';
	document.write(str);
}
//getCurrentPage();
//writeJS();
makenav();