/* A javascript comment */

/* 
The javascript file writes a menu to any page location
where this script is included using the following line
of code:  <script src="scripts/menu.js"></script> 

The reason we use JS is to allow for contextual changes 
in the navigation menu. For example, if we are on the 
philosophy page, a different button image will display
than if we are on, say, the home page.
*/



function imageChange(imageID,imageName) {
	document.images[imageID].src = eval(imageName + ".src");
}

if (pagelocation) { //this makes sure the variable has been set

	
	//home button
	homeoff= new Image();
	homeoff.src ="images/nav_home1.gif";
	homeon = new Image();
	homeon.src ="images/nav_home2.gif";	
	if (pagelocation == 'home') {
		document.write('<a href="index.htm"><img src="images/nav_home3.gif" border="0"></a>');
	}
	else {
		document.write('<a href="index.htm" onMouseOver=imageChange("home","homeon") onMouseOut=imageChange("home","homeoff")><img src="images/nav_home1.gif" border="0" name="home"></a>');
	}
	//philosophy button
	document.write('<br>');	
	philosophyoff= new Image();
	philosophyoff.src ="images/nav_philosophy1.gif";
	philosophyon = new Image();
	philosophyon.src ="images/nav_philosophy2.gif";
	if (pagelocation == 'philosophy') {
		document.write('<a href="philosophy.htm"><img src="images/nav_philosophy3.gif" border="0"></a>');
	}
	else {
		document.write('<a href="philosophy.htm" onMouseOver=imageChange("philosophy","philosophyon") onMouseOut=imageChange("philosophy","philosophyoff")><img src="images/nav_philosophy1.gif" border="0" name="philosophy"></a>');
	}
	//programs button
	document.write('<br>');	
	programsoff= new Image();
	programsoff.src ="images/nav_programs1.gif";
	programson = new Image();
	programson.src ="images/nav_programs2.gif";
	if (pagelocation == 'programs') {
		document.write('<a href="programs.htm"><img src="images/nav_programs3.gif" border="0"></a>');
	}
	else {
		document.write('<a href="programs.htm" onMouseOver=imageChange("programs","programson") onMouseOut=imageChange("programs","programsoff")><img src="images/nav_programs1.gif" border="0" name="programs"></a>');
	}
	//staff button
	document.write('<br>');	
	staffoff= new Image();
	staffoff.src ="images/nav_staff1.gif";
	staffon = new Image();
	staffon.src ="images/nav_staff2.gif";
	if (pagelocation == 'staff') {
		document.write('<a href="staff.htm"><img src="images/nav_staff3.gif" border="0"></a>');
	}
	else {
		document.write('<a href="staff.htm" onMouseOver=imageChange("staff","staffon") onMouseOut=imageChange("staff","staffoff")><img src="images/nav_staff1.gif" border="0" name="staff"></a>');
	}
	//admissions button
	document.write('<br>');	
	admissionsoff= new Image();
	admissionsoff.src ="images/nav_admissions1.gif";
	admissionson = new Image();
	admissionson.src ="images/nav_admissions2.gif";
	if (pagelocation == 'admissions') {
		document.write('<a href="admissions.htm"><img src="images/nav_admissions3.gif" border="0"></a>');
	}
	else {
		document.write('<a href="admissions.htm" onMouseOver=imageChange("admissions","admissionson") onMouseOut=imageChange("admissions","admissionsoff")><img src="images/nav_admissions1.gif" border="0" name="admissions"></a>');
	}
	//parentinv button
	document.write('<br>');	
	parentinvoff= new Image();
	parentinvoff.src ="images/nav_parentinv1.gif";
	parentinvon = new Image();
	parentinvon.src ="images/nav_parentinv2.gif";
	if (pagelocation == 'parentinv') {
		document.write('<a href="parentinv.htm"><img src="images/nav_parentinv3.gif" border="0"></a>');
	}
	else {
		document.write('<a href="parentinv.htm" onMouseOver=imageChange("parentinv","parentinvon") onMouseOut=imageChange("parentinv","parentinvoff")><img src="images/nav_parentinv1.gif" border="0" name="parentinv"></a>');
	}
	//calendar button
	document.write('<br>');	
	calendaroff= new Image();
	calendaroff.src ="images/nav_calendar1.gif";
	calendaron = new Image();
	calendaron.src ="images/nav_calendar2.gif";
	if (pagelocation == 'calendar') {
		document.write('<a href="calendar.htm"><img src="images/nav_calendar3.gif" border="0"></a>');
	}
	else {
		document.write('<a href="calendar.htm" onMouseOver=imageChange("calendar","calendaron") onMouseOut=imageChange("calendar","calendaroff")><img src="images/nav_calendar1.gif" border="0" name="calendar"></a>');
	}

	//testimonials button
	document.write('<br>');	
	testimonialsoff= new Image();
	testimonialsoff.src ="images/nav_testimonials1.gif";
	testimonialson = new Image();
	testimonialson.src ="images/nav_testimonials2.gif";
	if (pagelocation == 'testimonials') {
		document.write('<a href="testimonials.htm"><img src="images/nav_testimonials3.gif" border="0"></a>');
	}
	else {
		document.write('<a href="testimonials.htm" onMouseOver=imageChange("testimonials","testimonialson") onMouseOut=imageChange("testimonials","testimonialsoff")><img src="images/nav_testimonials1.gif" border="0" name="testimonials"></a>');
	}
	
	//facilities button
	document.write('<br>');	
	facilitiesoff= new Image();
	facilitiesoff.src ="images/nav_facilities1.gif";
	facilitieson = new Image();
	facilitieson.src ="images/nav_facilities2.gif";
	if (pagelocation == 'facilities') {
		document.write('<a href="facilities.htm"><img src="images/nav_facilities3.gif" border="0"></a>');
	}
	else {
		document.write('<a href="facilities.htm" onMouseOver=imageChange("facilities","facilitieson") onMouseOut=imageChange("facilities","facilitiesoff")><img src="images/nav_facilities1.gif" border="0" name="facilities"></a>');
	}
	
	//newsletter button
	document.write('<br>');	
	newsletteroff= new Image();
	newsletteroff.src ="images/nav_newsletter1.gif";
	newsletteron = new Image();
	newsletteron.src ="images/nav_newsletter2.gif";
	if (pagelocation == 'newsletter') {
		document.write('<a href="newsletter.htm"><img src="images/nav_newsletter3.gif" border="0"></a>');
	}
	else {
		document.write('<a href="newsletter.htm" onMouseOver=imageChange("newsletter","newsletteron") onMouseOut=imageChange("newsletter","newsletteroff")><img src="images/nav_newsletter1.gif" border="0" name="newsletter"></a>');
	}
	
		//contact button
	document.write('<br>');	
	contactoff= new Image();
	contactoff.src ="images/nav_contact1.gif";
	contacton = new Image();
	contacton.src ="images/nav_contact2.gif";
	if (pagelocation == 'contact') {
		document.write('<a href="contact.htm"><img src="images/nav_contact3.gif" border="0"></a>');
	}
	else {
		document.write('<a href="contact.htm" onMouseOver=imageChange("contact","contacton") onMouseOut=imageChange("contact","contactoff")><img src="images/nav_contact1.gif" border="0" name="contact"></a>');
	}
	
}