var linkarray=new Array();
linkarray[0]="http://www.bikenewyork.org/education/index.html";
linkarray[1]="http://www.bikenewyork.org/education/classes/index.html";
linkarray[2]="http://www.bikenewyork.org/education/classes/commute.html";
linkarray[3]="http://www.bikenewyork.org/education/classes/bike_driver_ed.html";
linkarray[4]="http://www.bikenewyork.org/education/classes/maintenance.html";
linkarray[5]="http://www.bikenewyork.org/education/classes/learn_to_ride.html";
linkarray[6]="http://www.bikenewyork.org/education/classes/learn_to_ride_adults.html";
linkarray[7]="http://www.bikenewyork.org/education/classes/savvy.html";
linkarray[8]="http://www.bikenewyork.org/education/trainings/index.html";
linkarray[9]="http://www.bikenewyork.org/education/trainings/trainings.html";
linkarray[10]="http://www.bikenewyork.org/education/trainings/fleet.html";
linkarray[11]="http://www.bikenewyork.org/education/trainings/kits.html";
linkarray[12]="http://www.bikenewyork.org/education/trainings/lci.html";
linkarray[13]="http://www.bikenewyork.org/education/trainings/srts.html";
linkarray[14]="http://www.bikenewyork.org/education/events/rides.html";
linkarray[15]="http://www.bikenewyork.org/education/ready/index.html";
linkarray[16]="http://www.bikenewyork.org/education/ready/quiz/index.html";
linkarray[17]="http://www.bikenewyork.org/education/ready/bike.html";
linkarray[18]="http://www.bikenewyork.org/education/ready/helmet.html";
linkarray[19]="http://www.bikenewyork.org/education/ready/guidelines.html";
linkarray[20]="http://www.bikenewyork.org/education/ready/advice.html";
linkarray[21]="";
linkarray[22]="http://www.bikenewyork.org/education/people/staff.html";
linkarray[23]="http://www.bikenewyork.org/education/people/volunteer.html";
linkarray[24]="http://www.bikenewyork.org/education/people/volunteer_profile.html";
linkarray[25]="http://www.bikenewyork.org/education/people/savvy_profile.html";

var structure=new Array();
	structure[0]="main";
	structure[1]="main";
	structure[2]="sub";
	structure[3]="sub";
	structure[4]="sub";
    	structure[5]="sub";
    	structure[6]="sub";
    	structure[7]="sub";	
	structure[8]="main";
	structure[9]="sub";
	structure[10]="sub";	
	structure[11]="sub";
	structure[12]="sub";
	structure[13]="sub";
	structure[14]="main";
	structure[15]="main";
	structure[16]="sub";
	structure[17]="sub";
	structure[18]="sub";
	structure[19]="sub";
	structure[20]="sub";
	structure[21]="main";
	structure[22]="sub";
	structure[23]="sub";
	structure[24]="sub";
	structure[25]="sub";	
	
var linktext=new Array();
	linktext[0]="Home";
	linktext[1]="Classes";
	linktext[2]="-Bike Commuting 101";
	linktext[3]="-Bike Driver's Ed";
	linktext[4]="-Bike Maintenance 101";	
	linktext[5]="-Learn to Ride--Kids";
	linktext[6]="-Learn to Ride--Adults";
	linktext[7]="-Savvy Cyclist:<br />&nbsp;Traffic Skills 101";
	linktext[8]="Trainings and Consulting";
	linktext[9]="-Educator Trainings";
	linktext[10]="-Bike Fleet";	
	linktext[11]="-Bike Ed Kits";
	linktext[12]="-LCI Certification";
	linktext[13]="-Safe Routes to School";
	linktext[14]="Bike New York Rides";
	linktext[15]="Get Ready for Riding";
	linktext[16]="-Traffic Smarts Quiz";
	linktext[17]="-Your Bike";
	linktext[18]="-Your Helmet";
	linktext[19]="-Ride Day Guidelines";	
	linktext[20]="-Advice\/Q&amp;A";
	linktext[21]="Bike Ed People";
	linktext[22]="-Staff";
	linktext[23]="-Volunteer Opportunities";
	linktext[24]="-Volunteer Profile";
	linktext[25]="-Savvy Cyclist Profile";

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]=="Events") || (linktext[j]=="Bike Ed People")) {
				//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+='<tr><td>&nbsp;</td></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();