// Formatted last-modified date
// Jim Dettwiler  http://www.icehouse.net/jim_d/
// This script was modified by Neil Dempster.
// Added: Display date no longer than x days feature
if (Date.parse(document.lastModified) != 0) {
	var modiDate = new Date(document.lastModified);
	var todayDate = new Date();
	var milliseconds = todayDate.getTime();
	var difference = milliseconds - modiDate.getTime();
	var artificialDate = new Date(todayDate.getYear(),todayDate.getMonth(),todayDate.getDate() - 187);
	var monthName = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
	if (difference > 16156800000) //Based on a desired display date no more that 187 days old (187*24*60*60*1000)
		document.write("This page was last modified on " + monthName[artificialDate.getMonth()] + " " + artificialDate.getDate() + ", " + artificialDate.getFullYear());
	else {
		document.write("This page was last modified on " + monthName[modiDate.getMonth()] + " " + modiDate.getDate() + ", " + modiDate.getFullYear());
	}
}
