// Anytime Anywhere Web Page Clock Generator
// Clock Script Generated at
// http://www.rainbow.arch.scriptmania.com/tools/clock
// Combined and edited to produce the 8 timezones by ForumLead@ForumWales.com


// Specific clock functions
function BERtS(){ BERx=new Date(tN().getUTCFullYear(),tN().getUTCMonth(),tN().getUTCDate(),tN().getUTCHours(),tN().getUTCMinutes(),tN().getUTCSeconds()); BERx.setTime(BERx.getTime()+BERdS()+3600000); return BERx; } 
function CANtS(){ CANx=new Date(tN().getUTCFullYear(),tN().getUTCMonth(),tN().getUTCDate(),tN().getUTCHours(),tN().getUTCMinutes(),tN().getUTCSeconds()); CANx.setTime(CANx.getTime()+CANdS()+36000000); return CANx; } 
function GMTtS(){ GMTx=new Date(tN().getUTCFullYear(),tN().getUTCMonth(),tN().getUTCDate(),tN().getUTCHours(),tN().getUTCMinutes(),tN().getUTCSeconds()); GMTx.setTime(GMTx.getTime()); return GMTx; }
function SYStS(){ SYSx=new Date(); SYSx.setTime(SYSx.getTime()); return SYSx; }
function UKtS(){ UKx=new Date(tN().getUTCFullYear(),tN().getUTCMonth(),tN().getUTCDate(),tN().getUTCHours(),tN().getUTCMinutes(),tN().getUTCSeconds()); UKx.setTime(UKx.getTime()+UKdS()+0); return UKx; } 
function QUEtS(){ QUEx=new Date(tN().getUTCFullYear(),tN().getUTCMonth(),tN().getUTCDate(),tN().getUTCHours(),tN().getUTCMinutes(),tN().getUTCSeconds()); QUEx.setTime(QUEx.getTime()+QUEdS()-18000000); return QUEx; } 
function LOStS(){ LOSx=new Date(tN().getUTCFullYear(),tN().getUTCMonth(),tN().getUTCDate(),tN().getUTCHours(),tN().getUTCMinutes(),tN().getUTCSeconds()); LOSx.setTime(LOSx.getTime()+LOSdS()-28800000); return LOSx; } 
function NYtS(){ NYx=new Date(tN().getUTCFullYear(),tN().getUTCMonth(),tN().getUTCDate(),tN().getUTCHours(),tN().getUTCMinutes(),tN().getUTCSeconds()); NYx.setTime(NYx.getTime()+NYdS()-18000000); return NYx; } 

// Generic function
function tN(){ return new Date(); } 

// Specific clock ds
function BERdS(){ return ((tN().getTime()>fD(0,2,2,-1).getTime())&&(tN().getTime()<fD(0,9,2,-1).getTime()))?3600000:0; } 
function CANdS(){ return ((tN().getTime()>fD(0,9,1,-1).getTime())||(tN().getTime()<fD(0,2,2,-1).getTime()))?3600000:0; }
function UKdS(){ return ((tN().getTime()>fD(0,2,2,-1).getTime())&&(tN().getTime()<fD(0,9,2,-1).getTime()))?3600000:0; }
function QUEdS(){ return ((tN().getTime()>fD(0,3,1,1).getTime())&&(tN().getTime()<fD(0,9,1,-1).getTime()))?3600000:0; } 
function LOSdS(){ return ((tN().getTime()>fD(0,3,1,1).getTime())&&(tN().getTime()<fD(0,9,1,-1).getTime()))?3600000:0; }
function NYdS(){ return ((tN().getTime()>fD(0,3,1,1).getTime())&&(tN().getTime()<fD(0,9,1,-1).getTime()))?3600000:0; } 

//Generic Functions
function fD(d,m,h,p){ var week=(p<0)?7*(p+1):7*(p-1),nm=(p<0)?m+1:m,x=new Date(tN().getUTCFullYear(),nm,1,h,0,0),dOff=0; if(p<0){ x.setTime(x.getTime()-86400000); } if(x.getDay()!=d){ dOff=(x.getDay()<d)?(d-x.getDay()):0-(x.getDay()-d); if(p<0&&dOff>0){ week-=7; } if(p>0&&dOff<0){ week+=7; } x.setTime(x.getTime()+((dOff+week)*86400000)); } return x; } 
function lZ(x){ return (x>9)?x:'0'+x; } 

// Specific clock dT
function BERdT(){ if(BERfr==0){ BERfr=1; document.write('<span id="BERtP">'+eval(BERoT)+'</span>'); } BERtP.innerText=eval(BERoT); setTimeout('BERdT()',1000); }
function CANdT(){ if(CANfr==0){ CANfr=1; document.write('<span id="CANtP">'+eval(CANoT)+'</span>'); } CANtP.innerText=eval(CANoT); setTimeout('CANdT()',1000); }
function GMTdT(){ if(GMTfr==0){ GMTfr=1; document.write('<span id="GMTtP">'+eval(GMToT)+'</span>'); } GMTtP.innerText=eval(GMToT); setTimeout('GMTdT()',1000); }
function SYSdT(){ if(SYSfr==0){ SYSfr=1; document.write('<span id="SYStP">'+eval(SYSoT)+'</span>'); } SYStP.innerText=eval(SYSoT); setTimeout('SYSdT()',1000); }
function UKdT(){ if(UKfr==0){ UKfr=1; document.write('<span id="UKtP">'+eval(UKoT)+'</span>'); } UKtP.innerText=eval(UKoT); setTimeout('UKdT()',1000); } 
function QUEdT(){ if(QUEfr==0){ QUEfr=1; document.write('<span id="QUEtP">'+eval(QUEoT)+'</span>'); } QUEtP.innerText=eval(QUEoT); setTimeout('QUEdT()',1000); }
function LOSdT(){ if(LOSfr==0){ LOSfr=1; document.write('<span id="LOStP">'+eval(LOSoT)+'</span>'); } LOStP.innerText=eval(LOSoT); setTimeout('LOSdT()',1000); }
function NYdT(){ if(NYfr==0){ NYfr=1; document.write('<span id="NYtP">'+eval(NYoT)+'</span>'); } NYtP.innerText=eval(NYoT); setTimeout('NYdT()',1000); } 

// Generic Function
var dN=new Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat');
var BERfr=0;
var CANfr=0;
var GMTfr=0;
var SYSfr=0;
var UKfr=0;
var QUEfr=0;
var LOSfr=0;
var NYfr=0;
var BERoT="dN[BERtS().getDay()]+'.'+' '+lZ(BERtS().getHours())+':'+lZ(BERtS().getMinutes())";
var CANoT="dN[CANtS().getDay()]+'.'+' '+lZ(CANtS().getHours())+':'+lZ(CANtS().getMinutes())";
var GMToT="dN[GMTtS().getDay()]+'.'+' '+lZ(GMTtS().getHours())+':'+lZ(GMTtS().getMinutes())";
var SYSoT="dN[SYStS().getDay()]+'.'+' '+lZ(SYStS().getHours())+':'+lZ(SYStS().getMinutes())";
var UKoT="dN[UKtS().getDay()]+'.'+' '+lZ(UKtS().getHours())+':'+lZ(UKtS().getMinutes())";
var QUEoT="dN[QUEtS().getDay()]+'.'+' '+lZ(QUEtS().getHours())+':'+lZ(QUEtS().getMinutes())";
var LOSoT="dN[LOStS().getDay()]+'.'+' '+lZ(LOStS().getHours())+':'+lZ(LOStS().getMinutes())";
var NYoT="dN[NYtS().getDay()]+'.'+' '+lZ(NYtS().getHours())+':'+lZ(NYtS().getMinutes())";

// Use the following within your HTML to Start/display your clock
// <script language="JavaScript">dT();</script>
