// display current time at author location
// =======================================
// copyright Stephen Chapman, Felgall Pty Ltd, 11 July 2001, 25th November 2004
// 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 loc1 = 'Vancouver';
var loc2 = 'New York';
var loc3 = 'Sao Paolo';
var loc4 = 'London';
var loc5 = 'Brussels';
var loc6 = 'Dubai';
var loc7 = 'Bejing';
var loc8 = 'Tokyo'; // set to your location
var mtz = 1;      // set to your local timezone (hours ahead of UTC, negative if behind)
var stdz = ''; // standard time indicator
var dayz = 'ADST'; // daylight saving time indicator (blank if you dont have daylight saving)

// do not alter anything below this line
document.writeln('<link href="styles/expat.css" rel="stylesheet" type="text/css"><p class=inhoud>');
document.writeln(loc1 + ' ' + setDsp(mtz-8,dst,stdz,dayz)+'<br>');
document.writeln(loc2 + ' ' + setDsp(mtz-5,dst,stdz,dayz)+'<br>');
document.writeln(loc3 + ' ' + setDsp(mtz-4,dst,stdz,dayz)+'<br>');
document.writeln(loc4 + ' ' + setDsp(mtz,dst,stdz,dayz)+'<br>');
document.writeln(loc5 + ' ' + setDsp(mtz+1,dst,stdz,dayz)+'<br>');
document.writeln(loc6 + ' ' + setDsp(mtz+3,dst,stdz,dayz)+'<br>');
document.writeln(loc7 + ' ' + setDsp(mtz+7,dst,stdz,dayz)+'<br>');
document.writeln(loc8 + ' ' + setDsp(mtz+8,dst,stdz,dayz)+'<br>');
document.writeln('</p>');
if (DOMsupported) setTimeout('updDsp('+mtz+',' +dst+',"' +stdz+'","' +dayz+'")', 5000);
}

var DOMsupported = 0;var standardDOMsupported = 0;var ieDOMsupported = 0;
if (document.getElementById) { standardDOMsupported = 1; DOMsupported = 1;}
else { if (document.all) {ieDOMsupported = 1; DOMsupported = 1;}
}
function findDOM(objectId) {
if (standardDOMsupported) {return (document.getElementById(objectId));}
if (ieDOMsupported) {return (document.all[objectId]);}
}

function updDsp(mtz,dst,stdz,dayz) {
var obj = findDOM('time');
obj.innerHTML = setDsp(mtz,dst,stdz,dayz);
setTimeout('updDsp('+mtz+ ','+dst+ ',"'+stdz+ '","'+dayz+ '")', 5000);
}
function setDsp(mtz,dst,stdz,dayz) {
var dayname = new Array ('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday','Friday', 'Saturday', 'Sunday');
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 < 10) {padhour = '0';} else {padhour = '';}
if (hour == 0) {hour = 12;} if (minute < 10) {pad = ':0';} else {pad = ':';}
var txt = '<strong>' + padhour + hour + pad + minute + ' </strong>'  ;
if (dst) txt += dayz; else txt += stdz;
txt += '';
return (txt);
}
                  
