  //     scripts taken from JAVASCRIPT INCLUDE FILE - (c) J R Stockton  >= 2004-08-13
  //             http://www.merlyn.demon.co.uk/include1.js
  //             http://www.merlyn.demon.co.uk/include3.js     
  //       Routines may be copied, but URL must not be linked to.

// General Utilities :

function LZ(x) { return (x<0||x>=10?"":"0") + x }

// Gregorian Date/Time Utilities :


Date.prototype.getTimezoneOffset = new Function("with (this) return 0 ")

Date.prototype.ISOlocaltimeStr =
  new Function("  /* Date.ISOlocaltimeStr */ with (this)\n    return " +
    "LZ(getHours())+':'+LZ(getMinutes())+':'+LZ(getSeconds())")

Date.prototype.ISOlocaldateStr =
  new Function("  /* Date.ISOlocaldateStr */ with (this)\n    return " +
    "getFullYear()+'-'+LZ(getMonth()+1)+'-'+LZ(getDate())")

Date.prototype.ISOlocalDTstr =
  new Function("  /* Date.ISOlocalDTstr */  with (this)\n    return " +
    "ISOlocaldateStr()+' '+ISOlocaltimeStr()")


Date.prototype.UTCstr =
  new Function("  /* Date.UTCstr */ with (this)\n    return " +
    "getUTCFullYear() + '-' + LZ(getUTCMonth()+1) + '-' +\n" +
    "      LZ(getUTCDate()) + ' ' + LZ(getUTCHours()) + ':' +\n" +
    "      LZ(getUTCMinutes()) + ':' + LZ(getUTCSeconds()) ")



function ItIs() { var D = new Date()
  document.write("Your own Local Time = ", D.ISOlocalDTstr(),
    "\nGreenwich Mean Time = ", D.UTCstr(),
    "\nYour TimezoneOffset = ",
    D.getTimezoneOffset(), " minutes;") }

function WinSum() {
  var DT = 2*new Date().getTimezoneOffset()
    - new Date(2004, 0).getTimezoneOffset()
    - new Date(2004, 6).getTimezoneOffset()
  document.write(" Summer Time is ",
    DT==0 ? "inapplicable" : DT>0 ? "OFF" : "ON" ) }


