/*******************************************************************************
Copyright (c) 1999 Thomas Brattli (www.bratta.com)

eXperience DHTML coolFrameMenus - Get it at www.bratta.com
Version Beta 1.0
This script can be used freely as long as all copyright messages are
intact. 

All files that goes in the "main" frame must have this file linked to it
(after the body tag!!)
*******************************************************************************/
function makeMenus(){
	if(parent.frmMenu){
		if(parent.frmMenu.oCFMenu){
			if(parent.frmMenu.oCFMenu.frameString2){
				document.write(parent.frmMenu.oCFMenu.frameString)
				if(parent.frmMenu.bw.ns5){
					document.close()
					document.body.innerHTML+=parent.frmMenu.oCFMenu.frameString2
				}else{
					document.write(parent.frmMenu.oCFMenu.frameString2)
					document.close()
				}
				parent.frmMenu.oCFMenu.refresh()
			}
		}
	}
}
function unload(){
	if(parent.frmMenu){
		if(parent.frmMenu.oCFMenu){
			parent.frmMenu.oCFMenu.loaded=0
		}
	}
}
makeMenus()
window.onunload=unload;


function writeDateModified (time) {

  var days = new Array;                        // Array to hold day names
  var months = new Array;                      // Array to hold up month names

  // Load up day names
  days[0] = "Sunday";
  days[1] = "Monday";
  days[2] = "Tuesday";
  days[3] = "Wednesday";
  days[4] = "Thursday";
  days[5] = "Friday";
  days[6] = "Saturday";

  // 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
    if (time) {
      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 Updated On " + ndate + " " + month + " " + year+ "  ");
    if (time) {
      document.write(hour + ":" + minute + ":" + second);
    }
  }
}
