
function printbooknav(title, active, picture){
var cstyle_off = "inactive";
var cstyle_on = "active";

var activeone;

//define makenav list elements
firstnav = new makenav("Welcome", 0, "about.html");
secondnav = new makenav("Why Covenant?", 0, "why-covenant.html");
thirdnav = new makenav("History", 0, "history.html");
fourthnav = new makenav("Our Faculty", 0, "faculty.html");
fifthnav = new makenav("Calendar", 0, "calendar.html");
sixthnav = new makenav("Reflections", 0, "reflections.html");

//put makenav list into array
var argarray = new Array(firstnav, secondnav, thirdnav, fourthnav, fifthnav, sixthnav); 
var arsize = argarray.length;

document.write('	<td rowspan="4" class="booknavtd1">	');
document.write('	<p>&nbsp;</p>	');

// <!--left side nav starts here, set active page as active, current in li-->
document.write('	<table border="0" class="booknavtab"><tr>	');
document.write('	<td class="booknavtd2">&nbsp;</td>	');

document.write('	<td><span class="booknavtitle">'+title+'</span></td>	');

document.write('	</tr></table>	');

document.write('	<br><div id="navcontainer">	');
document.write('	<ul id="navlist">	');

for (cnt=0; cnt<arsize; cnt++){
activeone = cstyle_off; //set all navs to off
//walk through the function arguments to see if set
if ( (cnt+1) == active){ activeone = cstyle_on;}; //unless set in arg list

//print the book nav
document.write('	<li id='+activeone+'><a href="'+argarray[cnt].url+'">'+argarray[cnt].title+'</a></li>');

  }

document.write('	</ul><BR>	');
document.write('	<img src='+picture+' class="booknavphoto">	');
document.write('	</div></td>	');

}



