var linkarray=new Array();
linkarray[0]="http://www.bikenewyork.org/rides/hhr/index.html";
linkarray[1]="http://www.bikenewyork.org/rides/hhr/photo_gallery_2009.html";
linkarray[2]="http://www.bikenewyork.org/rides/hhr/register.html";
linkarray[3]="";
linkarray[4]="http://www.bikenewyork.org/rides/hhr/event_info.html";
linkarray[5]="http://www.bikenewyork.org/rides/hhr/getting_there.html";
linkarray[6]="http://www.bikenewyork.org/rides/hhr/get_ready.html";
linkarray[7]="http://www.bikenewyork.org/rides/hhr/sponsors_partners.html";
linkarray[8]="http://www.bikenewyork.org/volunteer/hhr.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]="main";
	structure[7]="main";
	structure[8]="main";
	

var linktext=new Array();
	linktext[0]="Henry Hudson Ride";
	linktext[1]="Photos";
	linktext[2]="Register";
	linktext[3]="Practical Info";
	linktext[4]="\-Event Info";
	linktext[5]="\-Getting There";	
	linktext[6]="Get Ready";
	linktext[7]="Sponsors and Partners";
	linktext[8]="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 {
			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();