function printPages(lastchar){
page_num =Number(location.pathname.substring(
	location.pathname.lastIndexOf(lastchar)+1, 
	location.pathname.indexOf('.htm'))
);  //get the number in front of the end ltr and take off the .htm

switch(lastchar){
	case 'p':  //rep, rutgers ecological preserve
	numpages = 6;
	label = 'rep';
	break;
	case 's':  //meadows
	numpages = 7;
	label = 'meadows';
	break;
	case 'r':  //npr
	numpages = 7;
	label = 'npr';
	break;
	case 'a':  //ayres
	numpages = 6;
	label = 'ayres';
	break;

	default:
	numpages =7;
	label = 'meadows';
	break;
}

mynumpage=Number(page_num);
for(i=1;i<=numpages;i++){
	if(i==mynumpage)
		document.writeln("<span class='greenbold'> Page " + mynumpage +"</span>&nbsp;&nbsp;");
	else
		document.writeln ("<a href='"+ label + i +".htm'> Page " + i +"</a>&nbsp;&nbsp;");
	}
}

