function dateModified()
{
  var days = new Array;                        // Array to hold day names
  var months = new Array;                      // Array to hold month names

  // Load up day names
  days[0] = "Sun";
  days[1] = "Mon";
  days[2] = "Tue";
  days[3] = "Wed";
  days[4] = "Thu";
  days[5] = "Fri";
  days[6] = "Sat";

  // Load up month names
  months[0] = "Jan";
  months[1] = "Feb";
  months[2] = "Mar";
  months[3] = "Apr";
  months[4] = "May";
  months[5] = "Jun";
  months[6] = "Jul";
  months[7] = "Aug";
  months[8] = "Sep";
  months[9] = "Oct";
  months[10] = "Nov";
  months[11] = "Dec";

  // Assign date variables with document.lastModified 
  var modDate = new Date(Date.parse(document.lastModified));
  
  // If we have a valid date reformat it.
  if (modDate != 0) {
  
    // Set up day variable to hold the name of the day
    var day = days[modDate.getDay()];
    
    // ndate variable holds day of month
    var ndate = modDate.getDate();
    
    // Set up month variable to hold the name of the month
    var month = months[modDate.getMonth()];
    
    // Get the year and if it is less than 1000 add 1900 to it.
    var year = modDate.getYear();
    if (year < 1000) year = year + 1900;
    
    // Load up the time variables if required
    var hour = modDate.getHours().toString();
    if (hour.length == 1) hour = "0" + hour; 
    var minute = modDate.getMinutes().toString();
    if (minute.length == 1) minute = "0" + minute;
    var second = modDate.getSeconds().toString();
    if (second.length == 1) second = "0" + second;
    
    // Display date and time document was last updated.
    document.write("Last modified at " + hour + ":" + minute + ":" + second + " (24hr) on " + day + " " + ndate + " " + month + " " + year+ " ");
  }
}
