//time stamp functions

function filestamp() {
	homePage = new String("/html/NetLife/");
	changeDate = new Date(document.lastModified);
	document.write("Last Updated: ",formatDate(changeDate));
}

function formatDate(theDate) {
	today = new Date();
	oneDay = 24*60*60*1000;
	UTCDiff = today.getTimezoneOffset()*60*1000;
	msToday = today.getMilliseconds() + today.getSeconds()*1000 +
	today.getMinutes()*60*1000 + today.getHours()*60*60*1000 - UTCDiff;

	if (theDate >= (today - msToday)) {
		dateformatted = "Today";
	}
	else if (theDate >= today - msToday - oneDay) {
		dateformatted = "Yesterday";
	} 
	else {
		thisyear = theDate.getYear();
		while (thisyear >= 100) {
		thisyear -= 100;
		}
		if (thisyear < 10) {
		thisyear = "0" + thisyear;
		}
		
		thismonth = theDate.getMonth();
		thismonth++;
		thisday = theDate.getDate();
		dateformatted=thismonth + "/" + thisday + "/" + thisyear;
	}

return dateformatted;
}
