/*
Five Boro Bike Tour
Register
About
-Route/Map
-Festival
-Sponsors
--Become a Sponsor
--Advertising Opportunities
-Photo Gallery
-Photo Contest
-Rider News and Profiles
-Raves/Media
-Event History
Register
Get Ready
-You
-Your Kids
-Your Bike [link to Ed. section]
-Your Helmet [link to Ed. section]
Tour Day 
-Schedule 
-Directions to the Start
-Shortcuts
-Services 
-Rules and Security
-Street Closures
Official Lodging
Volunteer [link to vol. section]
Official Merchandise and Photos [link to shop]
*/


var linkarray=new Array();
linkarray[0]="http://www.bikenewyork.org/rides/index.html";
linkarray[1]="http://www.bikenewyork.org/rides/fbbt/index.html";
linkarray[2]="http://www.bikenewyork.org/rides/lihr/index.html"
linkarray[3]="http://www.bikenewyork.org/rides/hvrr/index.html";
linkarray[4]="http://www.bikenewyork.org/rides/hhr/index.html";
linkarray[5]="http://www.bikenewyork.org/rides/tlr/index.html";




var structure=new Array();
	structure[0]="main";
	structure[1]="sub1";
	structure[2]="sub1";	
	structure[3]="sub1";
	structure[4]="sub1";	
	structure[5]="sub1";

var linktext=new Array();
	linktext[0]="Home";
	linktext[1]="-TD Bank Five Boro Bike Tour";
	linktext[2]="-Long Island Harbors Ride";
	linktext[3]="-Harlem Valley Rail Ride";
	linktext[4]="-Henry Hudson Ride";
	linktext[5]="-Twin Lights Ride";	

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="100" border="0">';
	for(j=0;j<linkarray.length;j++) {
		str+='<tr>';
		if(getCurrentPage()==j) {
			str+='<td width="100" class="leftnav_box_selected"><span class="leftnav_' + structure[j] + '_selected">' + linktext[j] + '<\/span><\/td>';
		}else {
			str+='<td width ="100" class="leftnav_' + structure[j] + '"><a class="leftnav_' + structure[j] + '" href="' + linkarray[j] + '">' + linktext[j] + '<\/a><\/td>';
		}	
		str+='<\/tr>';
	}
	
	str+='<tr><td>&nbsp;</td></tr>';
	str+='<tr><td>&nbsp;</td></tr>';
	str+='<tr><td>&nbsp;</td></tr>';	
	
	str+='<\/table>';
	document.write(str);
}
//getCurrentPage();
//writeJS();
makenav();