// display current date and time at author location
// =======================================
// copyright Stephen Chapman, Felgall Pty Ltd, 11 July 2001, 25th November 2004, 12th October 2006
// http://www.felgall.com/ and http://javascript.about.com/
// permission is given to use this script
// provided that all comment lines in the script are retained

function myTime() {
var dst = 0;       // set to 1 for daylight savings time
                   // update this as you go on and off daylight saving time
var loc = 'Chicago, IL (USA)'; // set to your location
var mtz = -5;      // set to your local timezone (hours ahead of UTC, negative if behind)
var stdz = 'CST'; // standard time indicator
var dayz = 'ADST'; // daylight saving time indicator (blank if you dont have daylight saving)
var showDate = 2; // 0 = don't show, 1 = international format, 2 = US format

// do not alter anything below this line
var newP = document.createElement("span"); var txt = 'The time in ' + loc + ' is '; var newT = document.createTextNode(txt); newP.appendChild(newT); var newP2 = document.createElement("span"); newP2.id = 'time'; var txt2 = setDsp(mtz,dst,stdz,dayz,showDate); var newT2 = document.createTextNode(txt2); newP2.appendChild(newT2); var frag = document.createDocumentFragment(); frag.appendChild(newP); frag.appendChild(newP2); var d2 = document.getElementById('datetime'); d2.parentNode.replaceChild(frag,d2);
setTimeout('updDsp('+mtz+',' +dst+',"' +stdz+'","' +dayz+'","'+showDate+'")', 5000);}
var pageLoaded = 0; window.onload = function() {pageLoaded = 1;}
function loaded(i,f) {if (document.getElementById && document.getElementById(i) != null) f(); else if (!pageLoaded) setTimeout('loaded(\''+i+'\','+f+')',100);
}
function updDsp(mtz,dst,stdz,dayz,showDate) {var obj = document.getElementById('time'); obj.firstChild.data = setDsp(mtz,dst,stdz,dayz,showDate); setTimeout('updDsp('+mtz+ ','+dst+ ',"'+stdz+ '","'+dayz+ '","'+showDate+'")', 5000);}
function setDsp(mtz,dst,stdz,dayz,showDate) {var dayname = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday','Friday', 'Saturday']; var month = ['January','February','March','April','May','June','July','August','September','October','November','December']; var now = new Date; now.setUTCMinutes(now.getUTCMinutes() + (mtz + dst)*60); var dow = now.getUTCDay(); var minute = now.getUTCMinutes();
var hour = now.getUTCHours(); if (hour > 11) {ampm = 'PM'; hour -= 12;} else {ampm = 'AM'} if (hour == 0) {hour = 12;} if (minute < 10) {pad = ':0';} else {pad = ':';} var txt = hour + pad + minute + ' ' + ampm + ' ('; if (dst) txt += dayz; else txt += stdz; txt += ') on ' + dayname[dow];
if (showDate == 1) txt += ' ' + now.getUTCDate() + ' '  + month[now.getUTCMonth()]  + ', ' + now.getUTCFullYear();
if (showDate == 2) txt += ' ' + month[now.getUTCMonth()] +' '  + now.getUTCDate() + ', ' + now.getUTCFullYear();
return (txt);
}
loaded('datetime',myTime);

function myTime1() {
var dst1 = 0;       // set to 1 for daylight savings time
                   // update this as you go on and off daylight saving time
var loc1 = 'London, United Kingdom'; // set to your location
var mtz1 = 1;      // set to your local timezone (hours ahead of UTC, negative if behind)
var stdz1 = 'ST'; // standard time indicator
var dayz1 = 'ADST'; // daylight saving time indicator (blank if you dont have daylight saving)
var showDate1 = 2; // 0 = don't show, 1 = international format, 2 = US format

// do not alter anything below this line
var newP1 = document.createElement("span"); var txt1 = 'The time in ' + loc1 + ' is '; var newT1 = document.createTextNode(txt1); newP1.appendChild(newT1); var newP21 = document.createElement("span"); newP21.id = 'time'; var txt21 = setDsp(mtz1,dst1,stdz1,dayz1,showDate1); var newT21 = document.createTextNode(txt21); newP21.appendChild(newT21); var frag1 = document.createDocumentFragment(); frag1.appendChild(newP1); frag1.appendChild(newP21); var d21 = document.getElementById('datetime1'); d21.parentNode.replaceChild(frag1,d21);
setTimeout('updDsp('+mtz1+',' +dst1+',"' +stdz1+'","' +dayz1+'","'+showDate1+'")', 5000);}
var pageLoaded = 0; window.onload = function() {pageLoaded = 1;}
function loaded(i,f) {if (document.getElementById && document.getElementById(i) != null) f(); else if (!pageLoaded) setTimeout('loaded(\''+i+'\','+f+')',100);
}
function updDsp(mtz1,dst1,stdz1,dayz1,showDate1) {var obj = document.getElementById('time'); obj.firstChild.data = setDsp1(mtz1,dst1,stdz1,dayz1,showDate1); setTimeout('updDsp('+mtz1+ ','+dst1+ ',"'+stdz1+ '","'+dayz1+ '","'+showDate1+'")', 5000);}
function setDsp(mtz1,dst1,stdz1,dayz1,showDate1) {var dayname1 = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday','Friday', 'Saturday']; var month1 = ['January','February','March','April','May','June','July','August','September','October','November','December']; var now1 = new Date; now1.setUTCMinutes(now1.getUTCMinutes() + (mtz1 + dst1)*60); var dow1 = now1.getUTCDay(); var minute1 = now1.getUTCMinutes();
var hour1 = now1.getUTCHours(); if (hour1 > 11) {ampm1 = 'PM'; hour1 -= 12;} else {ampm1 = 'AM'} if (hour1 == 0) {hour1 = 12;} if (minute1 < 10) {pad = ':0';} else {pad = ':';} var txt1 = hour1 + pad + minute1 + ' ' + ampm1 + ' ('; if (dst1) txt1 += dayz1; else txt1 += stdz1; txt1 += ') on ' + dayname1[dow1];
if (showDate1 == 1) txt1 += ' ' + now1.getUTCDate() + ' '  + month1[now1.getUTCMonth()]  + ', ' + now1.getUTCFullYear();
if (showDate1 == 2) txt1 += ' ' + month1[now1.getUTCMonth()] +' '  + now1.getUTCDate() + ', ' + now1.getUTCFullYear();
return (txt1);
}
loaded('datetime1',myTime1);

function myTime2() {
var dst2 = 0;       // set to 1 for daylight savings time
                   // update this as you go on and off daylight saving time
var loc2 = 'Lagos, Nigeria'; // set to your location
var mtz2 = 1;      // set to your local timezone (hours ahead of UTC, negative if behind)
var stdz2 = 'DST'; // standard time indicator
var dayz2 = 'ADST'; // daylight saving time indicator (blank if you dont have daylight saving)
var showDate2 = 2; // 0 = don't show, 1 = international format, 2 = US format

// do not alter anything below this line
var newP2 = document.createElement("span"); var txt2 = 'The time in ' + loc2 + ' is '; var newT2 = document.createTextNode(txt2); newP2.appendChild(newT2); var newP22 = document.createElement("span"); newP22.id = 'time'; var txt22 = setDsp(mtz2,dst2,stdz2,dayz2,showDate2); var newT22 = document.createTextNode(txt22); newP22.appendChild(newT22); var frag2 = document.createDocumentFragment(); frag2.appendChild(newP2); frag2.appendChild(newP22); var d22 = document.getElementById('datetime2'); d22.parentNode.replaceChild(frag2,d22);
setTimeout('updDsp('+mtz2+',' +dst2+',"' +stdz2+'","' +dayz2+'","'+showDate2+'")', 5000);}
var pageLoaded = 0; window.onload = function() {pageLoaded = 1;}
function loaded(i,f) {if (document.getElementById && document.getElementById(i) != null) f(); else if (!pageLoaded) setTimeout('loaded(\''+i+'\','+f+')',100);
}
function updDsp(mtz2,dst2,stdz2,dayz2,showDate2) {var obj = document.getElementById('time'); obj.firstChild.data = setDsp1(mtz2,dst2,stdz2,dayz2,showDate2); setTimeout('updDsp('+mtz2+ ','+dst2+ ',"'+stdz2+ '","'+dayz2+ '","'+showDate2+'")', 5000);}
function setDsp(mtz2,dst2,stdz2,dayz2,showDate2) {var dayname2 = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday','Friday', 'Saturday']; var month2 = ['January','February','March','April','May','June','July','August','September','October','November','December']; var now2 = new Date; now2.setUTCMinutes(now2.getUTCMinutes() + (mtz2 + dst2)*60); var dow2 = now2.getUTCDay(); var minute2 = now2.getUTCMinutes();
var hour2 = now2.getUTCHours(); if (hour2 > 11) {ampm2 = 'PM'; hour2 -= 12;} else {ampm2 = 'AM'} if (hour2 == 0) {hour2 = 12;} if (minute2 < 10) {pad = ':0';} else {pad = ':';} var txt2 = hour2 + pad + minute2 + ' ' + ampm2 + ' ('; if (dst2) txt2 += dayz2; else txt2 += stdz2; txt2 += ') on ' + dayname2[dow2];
if (showDate2 == 1) txt2 += ' ' + now2.getUTCDate() + ' '  + month2[now2.getUTCMonth()]  + ', ' + now2.getUTCFullYear();
if (showDate2 == 2) txt2 += ' ' + month2[now2.getUTCMonth()] +' '  + now2.getUTCDate() + ', ' + now2.getUTCFullYear();
return (txt2);
}
loaded('datetime2',myTime2);