var linkarray=new Array();
linkarray[0]="http://www.bikenewyork.org/rides/tlr/index.html";
linkarray[1]="http://www.bikenewyork.org/rides/tlr/register.html";
linkarray[2]="";
linkarray[3]="http://www.bikenewyork.org/rides/tlr/event_info.html";
linkarray[4]="http://www.bikenewyork.org/rides/tlr/getting_there.html";
linkarray[5]="http://www.bikenewyork.org/rides/tlr/lodging.html";
linkarray[6]="http://www.bikenewyork.org/rides/tlr/highlands.html";
linkarray[7]="http://www.bikenewyork.org/rides/tlr/get_ready.html";
linkarray[8]="";
linkarray[9]="http://www.bikenewyork.org/rides/tlr/photo_gallery_2009.html";
linkarray[10]="http://www.bikenewyork.org/rides/tlr/photo_gallery_2008.html";
linkarray[11]="http://www.bikenewyork.org/rides/tlr/photo_gallery_2007.html";
linkarray[12]="http://www.bikenewyork.org/rides/tlr/sponsors_partners.html";
linkarray[13]="http://www.bikenewyork.org/rides/tlr/volunteer.html";


var structure=new Array();
	structure[0]="main";
	structure[1]="main";
	structure[2]="main";	
	structure[3]="sub";
	structure[4]="sub";
	structure[5]="sub";
	structure[6]="sub";
	structure[7]="main";
	structure[8]="main";
	structure[9]="sub";	
	structure[10]="sub";
	structure[11]="sub";
	structure[12]="main";
	structure[13]="main";


var linktext=new Array();
	linktext[0]="Twin Lights Ride";
	linktext[1]="Register";
	linktext[2]="Practical Info";
	linktext[3]="-Event Info";
	linktext[4]="-Getting There";	
	linktext[5]="-Lodging";	
	linktext[6]="-About Highlands";
	linktext[7]="Get Ready";
	linktext[8]="Photos";
	linktext[9]="-2009";
	linktext[10]="-2008";
	linktext[11]="-2007";
	linktext[12]="Sponsors and Partners";
	linktext[13]="Volunteer";



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 width="135" class="leftnav_box_selected"><span class="leftnav_' + structure[j] + '_selected">' + linktext[j] + '<\/span><\/td>';
		 } else if ((linktext[j]=="Practical Info") || (linktext[j]=="Photos")) {
						//not a link- use blueheadline style
						str+='<td class="leftnav_' + structure[j] + '"><span class="nolink">' + linktext[j] + '<\/span><\/td>';
		}else {
			str+='<td width ="135" 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+='<tr><td>&nbsp;</td></tr>';
	
	str+='<\/table>';
	document.write(str);
}
//getCurrentPage();
//writeJS();
makenav();