// new options introduced by Bernhard Friedrich; should work in all browsers
// additional code to display date in Month Day, Year format by Robert Crooks
// Define varibles for the finished date string, the date string returned
// by the browser, the month, day, and year
var lutext;
var lutime;
var ludm;
var ludd;
var ludy;
function sstr(a,b){ //extract substrings
	// function converts month string to appropriate number
	ret=lutime.substring(a,b);
	if (ret=="Jan" || ret=="01") ret="1";
	if (ret=="Feb" || ret=="02") ret="2";
	if (ret=="Mar" || ret=="03" || ret=="Mrz") ret="3";
	if (ret=="Apr" || ret=="04") ret="4";
	if (ret=="May" || ret=="05" || ret=="Mai") ret="5";
	if (ret=="Jun" || ret=="06") ret="6";
	if (ret=="Jul" || ret=="07") ret="7";
	if (ret=="Aug" || ret=="08") ret="8";
	if (ret=="Sep" || ret=="09") ret="9";
	if (ret=="Oct" || ret=="Okt") ret="10";
	if (ret=="Nov") ret="11";
	if (ret=="Dec" || ret=="Dez") ret="12";
return ret;	}
lutime = unescape(document.lastModified);
// the following structures determine the browser type and version
// according to the length of the last.modified date string,
// then extract the month, day, and year information from the string
if (lutime.length == 17) { // Netscape 3 and higher, Internet Explorer 4
	ludm = sstr(0,2);
	ludd = sstr(3,5);
	ludy = sstr(6,8);
}
if (lutime.length == 25 || lutime.length == 24) { // Netscape 2 or IE 3 (US)
	ludm = sstr(4,7);
	ludd = sstr(8,10);
	ludy = sstr(20,24);
}
if (lutime.length == 29) { // Opera 3
	ludm = sstr(8,11);
	ludd = sstr(5,7);
	ludy = sstr(12,16);
}
if (lutime.length == 19) { // Internet Explorer 5
	ludm = sstr(0,2);
	ludd = sstr(3,5);
	ludy = sstr(6,10);
}
lutext = "";
// US date format
// defines full English names for the months
monthName = new Array(12)
monthName[1] = 'January'
monthName[2] = 'February'
monthName[3] = 'March'
monthName[4] = 'April'
monthName[5] = 'May'
monthName[6] = 'June'
monthName[7] = 'July'
monthName[8] = 'August'
monthName[9] = 'September'
monthName[10] = 'October'
monthName[11] = 'November'
monthName[12] = 'December'
yearNow = null
// initialize yearNow;
// then determine whether it's the 20th or 21st century,
// if the year is in two-digit form
// (note that if this script is still around in 2090,
// it will have to be modified for the next century;-)
if (ludy.length==2) {
	if (ludy >= 90) {
		yearNow = 19
	}
	else {
		yearNow = 20
	}
}
else if (ludy.length==1) {
	if (ludy >= 90) {
		yearNow = 190
	}
	else {
		yearNow = 200
	}
}
else {
  yearNow= ""
}
// construct the modified last modified date string
lutext += monthName[ludm] + " " + ludd + ", " + yearNow + ludy + " ";
// write the string to the HTML document
document.write("Last Modified " + lutext);
// no output? try the next line to confirm script output
// document.write("boo !!");
