/*****************************************
*	Last Modified Date
*		by TJ Anthony
******************************************/

function findTime(hours, minutes) {
	if (minutes < 10) minutes = "0"+minutes;
	if (hours < 12) {
		if (hours == 0) hours = 12;
		return hours + ":" + minutes + " AM";
	}
	if (hours==12) hours = 24;
	return (hours-12) + ":" + minutes + " PM";
}

function findDay(day_of_week) {
	switch(day_of_week) {
	case 0: return "Sunday";
	case 1: return "Monday";
	case 2: return "Tuesday";
	case 3: return "Wednesday";
	case 4: return "Thursday";
	case 5: return "Friday";
	case 6: return "Saturday";
	}
}

function findMonth(month_of_year) {
	switch(month_of_year) {
	case 0: return "January";
	case 1: return "February";
	case 2: return "March";
	case 3: return "April";
	case 4: return "May";
	case 5: return "June";
	case 6: return "July";
	case 7: return "August";
	case 8: return "September";
	case 9: return "October";
	case 10: return "November";
	case 11: return "December";
	}
}

function findYear(year) {
	yearString = new String("0"+year);
	return "20" + yearString.substr(yearString.length-2);
}

function getLastModified() {
	date = Date.parse(document.lastModified);
	newdate = new Date (date);
	return "<font style=\"font-weight: normal; "+ 
		"font-size: 10pt;\">" + 
		findDay(newdate.getDay()) + ",<br>" +
		findMonth(newdate.getMonth()) + " "
		+ newdate.getDate()+ ", "
		+ findYear(newdate.getYear()) + "<br>at "
		+ findTime(newdate.getHours(), 
			  newdate.getMinutes()) + "</font>";
}