function DateTime() {
    //debugger;
    if (!document.layers && !document.all && !document.getElementById) { return; }

    var UTCtime = new Date();
    var myUTCMonth = UTCtime.getUTCMonth();
    var myUTCDate = UTCtime.getUTCDate();
    var myUTCYear = UTCtime.getUTCFullYear();
    var UTChr = UTCtime.getUTCHours();
    var UTCmin = UTCtime.getUTCMinutes();
    var UTCsec = UTCtime.getUTCSeconds();
    var currentUTC = Date.UTC(myUTCYear, myUTCMonth, myUTCDate, UTChr, UTCmin, UTCsec); // returns milliseconds
    var DST = 3600000; //1 hour in milliseconds

    //note months are a zero based list
    /*
    Ottawa and Washington 
    Daylight saving time: +1 hour 
    UTC 9 Mar 2008 - 07:00 DST Starts
    UTC 2 Nov 2008 - 07:00 DST Ends
    DST started on Sunday, March 9, 2008 at 2:00 AM local standard time
    DST ends on Sunday, November 2, 2008 at 2:00 AM local daylight time
    Standard time zone: UTC/GMT -5 hours 
    */
    var UTCDSTStartUSCA = Date.UTC(2010, 10, 7, 2, 0, 0);
    var UTCDSTEndUSCA = Date.UTC(2010, 2, 14, 2, 0, 0);
    var USCAUTCOffset = -18000000; //-5 hours
    if (currentUTC <= UTCDSTStartUSCA && currentUTC >= UTCDSTEndUSCA)
    { NADate = currentUTC + USCAUTCOffset + DST; }
    else
    { NADate = currentUTC + USCAUTCOffset; }
    var CurrentAmericaDate = new Date(NADate);


    /*
    London
    UTC 30 Mar 2008 - 01:00 - DST Start
    UTC 26 Oct 2008 - 01:00 - DST Ends
    DST starts on Sunday, March 30, 2008 at 1:00 AM local standard time
    DST ends on Sunday, October 26, 2008 at 2:00 AM local daylight time
    Standard time zone: No UTC/GMT offset
    */
    var UTCDSTStartLondon = Date.UTC(2010, 9, 31, 2, 0, 0);
    var UTCDSTEndLondon = Date.UTC(2010, 2, 28, 1, 0, 0);
    var LondonUTCOffset = 0;
    if (currentUTC <= UTCDSTStartLondon && currentUTC >= UTCDSTEndLondon)
    { LondonDate = currentUTC + LondonUTCOffset + DST; }
    else
    { LondonDate = currentUTC + LondonUTCOffset; }
    var CurrentLondonDate = new Date(LondonDate);


    /*
    Canberra
    UTC 6 Apr 2008 - 07:00 DST ends
    UTC 5 Oct 2008 - 06:00 DST Starts
    DST ends on Sunday, April 6, 2008 at 3:00 AM local daylight time
    DST starts on Sunday, October 5, 2008 at 2:00 AM local standard time
    Standard time zone: UTC/GMT +10 hours 
    */
    var UTCDSTStartCanberra = Date.UTC(2010, 3, 4, 3, 0, 0);
    var UTCDSTEndCanberra = Date.UTC(2010, 9, 3, 2, 0, 0);
    var CanberraUTCOffset = 36000000; //10 hours
    if (currentUTC >= UTCDSTStartCanberra && currentUTC <= UTCDSTEndCanberra)
    { CanberraDate = currentUTC + CanberraUTCOffset; }
    else
    { CanberraDate = currentUTC + CanberraUTCOffset + DST; }
    var CurrentCanberraDate = new Date(CanberraDate);




    /*
    Wellington 
    UTC 6 Apr 2008 - 07:00 DST ends
    UTC 28 Sep 2008 - 06:00 DST Starts
    DST ends on Sunday, April 6, 2008 at 3:00 AM local daylight time
    DST starts on Sunday, September 28, 2008 at 2:00 AM local standard time
    Standard time zone: UTC/GMT +12 hours 
    */
    var UTCDSTEndWellington = Date.UTC(2010, 3, 4, 3, 0, 0); //new Date("March 17, 2007 14:00:00");
    var UTCDSTStartWellington = Date.UTC(2010, 8, 26, 2, 0, 0); //new Date("October 6, 2007 14:00:00");
    var WellingtonUTCOffset = 43200000; //12 hours
    if (currentUTC < UTCDSTStartWellington && currentUTC > UTCDSTEndWellington) {
        WellingtonDate = currentUTC + WellingtonUTCOffset;
    }
    else {
        WellingtonDate = currentUTC + WellingtonUTCOffset + DST;
    }
    var CurrentWellingtonDate = new Date(WellingtonDate);



        document.getElementById('USclock').innerHTML = formatDateString(CurrentAmericaDate.getUTCFullYear(), CurrentAmericaDate.getUTCMonth(), CurrentAmericaDate.getUTCDate(), CurrentAmericaDate.getUTCHours(), CurrentAmericaDate.getUTCMinutes());
        document.getElementById('CAclock').innerHTML = document.getElementById('USclock').innerHTML;
        document.getElementById('UKclock').innerHTML = formatDateString(CurrentLondonDate.getUTCFullYear(), CurrentLondonDate.getUTCMonth(), CurrentLondonDate.getUTCDate(), CurrentLondonDate.getUTCHours(), CurrentLondonDate.getUTCMinutes());
        document.getElementById('ASclock').innerHTML = formatDateString(CurrentCanberraDate.getUTCFullYear(), CurrentCanberraDate.getUTCMonth(), CurrentCanberraDate.getUTCDate(), CurrentCanberraDate.getUTCHours(), CurrentCanberraDate.getUTCMinutes());
        document.getElementById('NZclock').innerHTML = formatDateString(CurrentWellingtonDate.getUTCFullYear(), CurrentWellingtonDate.getUTCMonth(), CurrentWellingtonDate.getUTCDate(), CurrentWellingtonDate.getUTCHours(), CurrentWellingtonDate.getUTCMinutes());





    setTimeout("DateTime()", 60000);
}


function formatDateString(numYear, numMonth, numDay, numHours, numMinutes) {
    var months = new Array();
    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] = "Sept";
    months[9] = "Oct";
    months[10] = "Nov";
    months[11] = "Dec";

    strYear = numYear.toString();
    DateString = numDay + " " + months[numMonth] + " " + strYear.substr(2);
    TimeString = ((numHours < 10) ? "0" : "") + numHours;

    if (TimeString.length == 1) TimeString = " " + TimeString;

    TimeString += ((numMinutes < 10) ? ":0" : ":") + numMinutes;
    return DateString + " [" + TimeString + "]";
}

function AdjustColumnsHeight() {
    //debugger;
    // get a reference to the three DIVS that make up the columns
    var centerCol = window.document.getElementById('middle');
    var leftCol = window.document.getElementById('left');
    var rightCol = window.document.getElementById('right');
    // calculate the max height
    if (centerCol != null && leftCol != null && rightCol != null) {
        var hCenterCol = centerCol.offsetHeight;
        var hLeftCol = leftCol.offsetHeight;
        var hRightCol = rightCol.offsetHeight;
        var maxHeight = Math.max(hCenterCol, Math.max(hLeftCol, hRightCol));
        // set the height of all 3 DIVS to the max height
        centerCol.style.height = maxHeight + 'px';
        leftCol.style.height = maxHeight + 'px';
        rightCol.style.height = maxHeight + 'px';
        // Show the footer
        //debugger;


        window.document.getElementById('footer').style.visibility = 'inherit';
    }
}

function init() {
    //AdjustColumnsHeight();
    DateTime();
}
window.onload = init;