

var linkarray=new Array();
linkarray[0]="http://www.bikenewyork.org/resources/index.html";
linkarray[1]="http://www.bikenewyork.org/resources/rides.html";
linkarray[2]="http://www.bikenewyork.org/resources/shops_rentals.html";
linkarray[3]="http://www.bikenewyork.org/resources/clubs.html";
linkarray[4]="http://www.bikenewyork.org/resources/advocacy_orgs.html";
linkarray[5]="http://www.bikenewyork.org/resources/routes.html"
linkarray[6]="http://www.bikenewyork.org/resources/advice.html"

var structure=new Array();
	structure[0]="main";
	structure[1]="main";
	structure[2]="main";
	structure[3]="main";
    structure[4]="main";
	structure[5]="main";
	structure[6]="main";

var linktext=new Array();

	linktext[0]="Home";
	linktext[1]="Regional Rides";
	linktext[2]="Bike Shops \& Rentals";
	linktext[3]="Riding Clubs";
	linktext[4]="Advocacy Organizations";
	linktext[5]="Routes";
	linktext[6]="Advice and Q\&A";

/*
	linktext[0]="test";
	linktext[1]="test";
	linktext[2]="test";
	linktext[3]="test";
	linktext[4]="test";
	linktext[5]="test";
	linktext[6]="test";
	*/

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+='<\/table>';
	document.write(str);
}
//getCurrentPage();
//writeJS();
makenav();