//Copyright timeanddate.com 2005-2009, do not use without permission

ptn=0;ptns=0;ptn0=0;pwds="";function init(){var c,i,o,f,a,n;var t=[{n:"s2",f:1},{n:"m2",f:60},{n:"h2",f:3600},{n:"d2",f:86400},{n:"s1",f:1,m:60},{n:"m1",f:60,m:60},{n:"h1",f:3600,m:24},{n:"d1",f:86400}];lt0=0;if(typeof(window.cks)!=="undefined"){for(c in cks){i=cks[c];i.d1=gf(c);i.d2=gf(c+"a");i.pa="";if((o=i.c)){var u={s:["second","seconds"],m:["minute","minutes"],h:["hour","hours"],d:["day","days"]};o.u1=gf(c+"_u1");o.u2=gf(c+"_u2");o.l=[];for(a=0;a<8;a++){f=t[a];n=c+"_"+f.n;o.l[a]={f:f,n1:gf(n),n2:gf(n+"t"),u:u[f.n.charAt(0)]};}}}
sync();}}
function sync(i){var r,x=gx(),t,e,m;if(x){var f=function(){e=new Date();if((r=rs4(x))){m=(t+e.getTime())/2;srvadj=Math.floor(parseFloat(r)*1E3-m);upd();iH("ref","At time of loading, accuracy was within "+(Math.round(m-t)+100)/1E3+" seconds");}};i=(i)?"&r="+i:"";t=new Date().getTime();gp(x,"/worldclock/ts.php?ut="+t+"&cb="+Math.random()+i,f);}}
function dsync(i){if(ptns++<40){i+="_"+ptns;window.setTimeout(function(){sync(i)},2500);}}
function rf(n,t,i,a){iH(n,t);setTimeout("location.reload()",Math.floor(1E3*(i+Math.random()*a)));}
function pf(v,n){while((v="0000"+v)&&v.length<n){}return v.substring(v.length-n);}
function p2(v){return((v<10)?"0"+v:v);}
function upd(){var o,d,v,w,r,f,a,i,j,b,n,t,l,y,k,u,p,e,s,c=[],m;m=new Date().getTime()+srvadj;p=ptn;ptn=m;e=Math.floor(m/1E3);if(e>et){rf("tz1","Will refresh in 10 seconds",10,0);return;}
if(p){u=m-p;if(ptn0>m){rf("tz1","Clock has gone backward - will refresh soon",7,0);return;}
if(u>3E4){dsync("f"+u);return;}
if(u<-10){dsync("b"+u);return;}}else{ptn0=m;}
if(e!=lt0){lt0=e;for(i in cks){y=cks[i];r=y.t;f="";a="";for(b=0;b<r.length;b++){if(r[b].t>e){break;}
f=r[b].o;a=r[b].a;n=r[b].d;j=b;}
if(f!==""&&y.c){l=y.c;s=Math.floor((l.t-m+999)/1000);if(s!=l.p){if(s<0&&l.p>=0){ih(l.u1,"since");ih(l.u2,"since");}
l.p=s;if(s<0){s=-s;}
r=l.l;for(b=0;b<r.length;b++){o=r[b];d=o.f;v=Math.floor(s/d.f);if(d.m){v%=d.m;}
if(v!==o.o){ih(o.n1,v);o.o=v;j=o.u[(v!=1)?1:0];if(j!==o.p){ih(o.n2,j);o.p=j;}}}}}
if(f!==""&&y.d1){l=new Date((e+f)*1E3);ih(y.d1,y.f(l));if(i.charAt(0)=="p"){k=(Math.floor((e+f)/86400)+4)%7;c[k]=(c[k]||0)+1;if(dsts){iH(i+"as",(n)?" *":"");c[7]=(c[7]||0)+(n||0);}}
if(y.pa!=a&&y.d2){y.pa=a;ih(y.d2,a);}
if(y.d){t="Page will be refreshed soon";if(j>0){rf("tz1",t,30,300);}
j=l.getUTCDate();if(y.d!=j){rf("da1",t,10,150);iH("da2",t);y.d=j;}}}}}
if(window.updwds&&c.length){w=c.join(",");if(w!=pwds){pwds=w;for(k=0;k<8;k++){j=c[k]||0;b=gf("smwd"+k);if(b){sd(b,j?1:0);iH("smwi"+k,updwds(j));}}}}
m=new Date().getTime()+srvadj;setTimeout(upd,1E3-(m%1E3));}
function ofs(e,f){var h=0,w,s,p,i=window,o="directories=no,location=no,menubar=no,resizable=yes,scrollbars=no,status=no,toolbar=no";if((s=i.screen)){h=s.availHeight-30;w=s.availWidth-10;}
if(f){o+=",left=0,screenX=0,top=0,screenY=0,fullscreen=yes";if(h){o+=",height="+h+",innerHeight="+h+",width="+w+",innerWidth="+w;}}else{o+=",height=180,width=320";}
if((p=i.open(e.href,"_blank",o))){return false;}
alert("Could not open the popup-window, maybe there is a poupup-blocker installed");if(f&&h){i.moveTo(0,0);i.resizeTo(w,h);}
return true;}