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

ltn=0;pwds="";function gf(f){if(document.getElementById){return document.getElementById(f);}
if(document.all){return document.all[f];}
return null;}
function init(){lt0=0;var a;if(typeof(window.cks)!=="undefined"){for(a in cks){var ck=cks[a];ck.d1=gf(a);ck.d2=gf(a+"a");ck.pa="";}
sync();}}
function sync(){var obj=null;try{obj=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){}
if(!obj){try{obj=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}}
if(!obj){try{obj=new XMLHttpRequest();}catch(e){}}
if(!obj){return;}
try{obj.open("GET","http://"+document.domain+"/worldclock/ts.php?cb="+Math.random(),true);obj.onreadystatechange=function(){var t=new Date();if(obj&&obj.readyState==4&&obj.status==200){srvadj=Math.floor(parseFloat(obj.responseText)*1E3-(st+t.getTime())/2);obj=null;upd();}};st=new Date().getTime();obj.send("");}
catch(e){return;}}
function ih(n,t){if(n){n.innerHTML=t;}}
function rf(n,t,i,a){ih(gf(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 c,j;var tn=new Date().getTime()+srvadj;if(ltn>tn){rf("tz1","Clock has gone backward - will refresh soon",7,0);return;}
ltn=tn;wds=new Array();var t0=Math.floor(tn/1E3);if(t0>et){rf("tz1","Will refresh in 10 seconds",10,0);return;}else{if(t0!=lt0){lt0=t0;for(c in cks){var ck=cks[c];var ts=ck.t;var o="",a="";for(var i=0;i<ts.length;i++){if(ts[i].t>t0){break;}
o=ts[i].o;a=ts[i].a;ad=ts[i].d
j=i;}
if(o!==""&&ck.d1){var b=new Date((t0+o)*1E3);ih(ck.d1,ck.f(b));if(c.charAt(0)=="p"){wd=(Math.floor((t0+o)/86400)+4)%7;wds[wd]=(wds[wd]||0)+1;if(dsts){ih(gf(c+"as"),(ad)?" *":"");wds[7]=(wds[7]||0)+(ad||0);}}
if(ck.pa!=a&&ck.d2){ck.pa=a;ih(ck.d2,a);}
if(ck.d){rt="Page will be refreshed soon";if(j>0){rf("tz1",rt,30,300);}
j=b.getUTCDate();if(ck.d!=j){rf("da1",rt,10,150);ih(gf("da2"),rt);ck.d=j;}}}}
tn=new Date().getTime()+srvadj;}
if(window.updwds&&wds.length){twds=wds.join(",");if(twds!=pwds){for(i=0;i<8;i++){c=wds[i];if(!c){c=0;}
nd=gf("smwd"+i);if(nd){nd.style.display=(c)?"block":"none";ih(gf("smwi"+i),updwds(c));}}
pwds=twds;}}}
setTimeout(upd,1E3-(tn%1E3));}
function ofs(e,f){var h=0,w,s,i,o="directories=no,location=no,menubar=no,resizable=yes,scrollbars=no,status=no,toolbar=no";if(s=window.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(i=window.open(e.href,"_blank",o)){return false;}
alert("Could not open the popup-window, maybe there is a poupup-blocker installed");if(f&&h){window.moveTo(0,0);window.resizeTo(w,h);}
return true;}