﻿// Anytime Anywhere Web Page Clock Generator
// Clock Script Generated at
// http://www.rainbow.arch.scriptmania.com/tools/clock

function timeSource() {
    x = new Date(timeNow().getUTCFullYear(), timeNow().getUTCMonth(), timeNow().getUTCDate(), timeNow().getUTCHours(), timeNow().getUTCMinutes(), timeNow().getUTCSeconds());
    x.setTime(x.getTime());
    return x;
}
function timeNow() {
    return new Date();
}
function leadingZero(x) {
    return (x > 9) ? x : '0' + x;
}
function displayTime() {
    if (fr == 0) {
        fr = 1;
        document.write('<span class="ClockText" id="tP">' + eval(outputTime) + '</span>');
    }
    document.getElementById('tP').innerHTML = eval(outputTime);
    setTimeout('displayTime()', 1000);
}
function fixYear4(x) {
    return (x < 500) ? x + 1900 : x;
}
var fr = 0;
var outputTime = "leadingZero(timeSource().getDate())+'.'+leadingZero((timeSource().getMonth()+1))+'.'+fixYear4(timeSource().getYear())+' '+leadingZero(timeSource().getHours())+':'+leadingZero(timeSource().getMinutes())+':'+leadingZero(timeSource().getSeconds())+' '";

// Use the following within your HTML to Start/display your clock
// <script language="JavaScript">displayTime();</script>