<!--

// Nihat M. Gurmen
// $Id: navigation.js,v 1.6 2001/12/20 20:56:26 ngurmen Exp $

if (Date.parse(document.lastModified) != 0){

   date = new Date(document.lastModified);
   day = date.getDate();
   
   namemonth = date.getMonth();
   if (namemonth==0)  month  = 'January';
   if (namemonth==1)  month  = 'February';
   if (namemonth==2)  month  = 'March';
   if (namemonth==3)  month  = 'April';
   if (namemonth==4)  month  = 'May';
   if (namemonth==5)  month  = 'June';
   if (namemonth==6)  month  = 'July';
   if (namemonth==7)  month  = 'August';
   if (namemonth==8)  month  = 'September';
   if (namemonth==9)  month  = 'October';
   if (namemonth==10) month  = 'November';
   if (namemonth==11) month  = 'December';
 
   year = date.getYear();
 
	   if (year < 1000) {
       year=year+1900;}

   if (year < 1990) {
       year=year+100;}

   hour = date.getHours();
   minute = date.getMinutes();
   
   if (hour >= 12) {
       hourf = hour-12;
       if (hourf==0) hourf=12;
       ampmword = 'pm';
   }
   else {
       hourf = hour;
       ampmword = 'am';
   }
}


function writeNavigation(URL_array, topic_array) 
{
	var upURL = URL_array[0];
	var leftURL = URL_array[1];
	var rightURL = URL_array[2];
	var backURL = URL_array[3]
	var downURL = URL_array[4];

	var altLeft = "Previous: " + topic_array[0];
	var altRight = "Next: " + topic_array[1];

	document.write('<P>');
	document.write('<div align="center">');

	if (upURL) {
		document.write('<A href=' + upURL + '><img src="img/up_on.gif" border="0" alt="Table of Contents"></A>');
	} else {
		document.write('<img src="img/up_off.gif" border="0" alt="Table of Contents">');
	}

	if (leftURL) {
		document.write('<A href=' + leftURL + '><img src="img/left_on.gif" border="0" alt="' + altLeft + '"></A>');
	} else {
		document.write('<img src="img/left_off.gif" border="0" alt="Previous: no topic">');
	}

	if (rightURL) {
		document.write('<A href=' + rightURL + '><img src="img/right_on.gif" border="0" alt="' + altRight + '"></A>');
	} else {
		document.write('<img src="img/right_off.gif" border="0" alt="Next: no topic">');
	}

	if (backURL) {
		document.write('<A href=' + backURL + ' target="_self"><img src="img/back_on.gif" border="0" alt="Return to Chapter 8 Notes"></A>');
	} else {
		document.write('<img src="img/back_off.gif" border="0" alt="Return to Chapter 8 Notes">');
	}

	if (downURL) {
		document.write('<A href=' + downURL + ' target="_top"><img src="img/down_on.gif" border="0" alt="CRE Home"></A>');
	} else {
		document.write('<img src="img/down_off.gif" border="0" alt="CRE Home">');
	}

	document.write('</div>');
	//document.write('<hr>');
}


function writeLastModified() 
{
	document.write('<P>');

	document.write('<div class="footer">');
	document.write('Last updated on&nbsp;<FONT COLOR=\"#0000A0\">');
	if (minute < 10) {
		document.write(month,' ',day,', ',year,
		              '  at ',hourf,':','0',minute,ampmword);
	}
	if (minute >= 10) {
		document.write(month,' ',day,', ',year,
			          '  at ',hourf,':',minute,ampmword);
	}
	document.write('<BR></FONT>');
}


function writeCreatedBy() 
{
	document.write('Created by ');
	document.write('<A HREF=\"mailto:gurmen@umich.edu\">MNG</A>');
	document.write(' &amp; ');
	document.write('<A HREF=\"mailto:sfogler@umich.edu\">HSF</A>');
	document.write(', &copy; 2001');
	document.write('</div>');
}
// -->
