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

var wsc=["00","33","66","99","CC","FF"];var wsc3=["00","99","FF"];var dv={i:0,n:"0",fn:1,fs:"14",fc:"000",tc:"fff",pc:"fff",tt:"2",tw:"2",tm:"0",td:"0",tb:"0",th:"0",ts:"0",ta:"0",tl:"us",ah:"c",av:"c",dpt:0};for(i=0;i<5;i++){c="abtlr".charAt(i);dv['b'+c+'c']='000';dv['b'+c+'t']='3';dv['b'+c+'s']='1';dv['p'+c]='1';}
var prevhtml="";var prevw=500;var prevh=100;var sh=0;var fat="";function extfield(field,page,w){var p;lastField=field;p=window.open("/field/"+page,"fieldselect","width="+w+",height=450,resizable=yes,status=yes,scrollbars=yes,directories=no,location=no,menubar=no");if(!p){alert("Sorry, your browser does not allow popups or they are disabled");}}
function extlocs(field){extfield(field,"picklocation.html",600);}
function exttzs(field){extfield(field,"picktimezone.html",750);}
function selectloc(id,name){var pfield=document.f[lastField],popts=pfield.options,i=popts.length;popts[i]=new Option(name,id);pfield.selectedIndex=i;}
function gv(i){return document.f[i].value;}
function gc(i){return(document.f["f"+i].checked)?i:"";}
function ctc(){var f,r,o=document.f;if(o){f=o.html;if(f){r=f.createTextRange();r.select();r.execCommand("Copy");}}}
function ffl(){var v=gc("loat");gf("fldiv").className=(v)?"stck":"";}
function fdpt(){var v=gv("dpt")=="1",e=gf("dptnote"),s=gf("dpt"),p=ap(s);jp(p,e,s,1,0);ep(e,p);sd(e,v);ih(e,v?'<img src="/gfx/warning.gif" width="32" height="32">Warning, only use this option if your web site is on a secure server (https). If you are unsure, select "normal"':'');}
function chdpt(){fdpt();fsu();}
function fsu(){gh(0,1);}
function chtt(){var v=gv("tt"),e=(v!=2),f=document.f;ee(f,'td',e);ee(f,'tw',e);ee(f,'tm',e);ee(f,'td',e);e=(v!=1);ee(f,'th',e);ee(f,'ts',e);ee(f,'ta',e);ee(f,'tb',(v==="0"));fsu();}
function cht(){fsu();}
function chfn(f){he('fontsamp',f);}
function chfn1(){document.f.fontext[gv("fn")-1].checked=true;fsu();}
function chfn2(i){document.f.fn.value=i;fsu();}
function chcl(){fsu();}
function chbo(){var v=gv("bo");he("bo2",(v==2));he("bo3",(v==3));fsu();}
function chpd(){var v=gv("pd");he("pd2",(v==2));he("pd3",(v==3));fsu();}
function cinit(){chbo();chpd();chtt();}
function hpal(){gf("palette").style.left="-500px";}
function updcol(n,c){var h,e,o=gv(n),v=o.replace(/ /g,"");v=v.toUpperCase();h=v.charAt(0);if(h=="T"){v="transparent";}else{if(v=="RED"){v="F00";}
if(v=="BLUE"){v="00F";}
if(v=="YELLOW"){v="FF0";}
if(v=="WHITE"){v="FFF";}
if(v=="BLACK"){v="000";}
if(v.length==3){v=v.charAt(0)+v.charAt(0)+v.charAt(1)+v.charAt(1)+v.charAt(2)+v.charAt(2);}
if(!v.match("[0-9A-F]{6}")){v=c;}}
if(v!=o){document.f[n].value=v;}e=gf(n+"disp");if(e){e.style.backgroundColor=v;}
hpal();fsu();}
function setcol(v){document.f[activecol].value=v;updcol(activecol,'');}
function fst(){var f=document.f,v="transparent";f.tc.value=v;f.pc.value=v;hpal();fsu();}
function ic(){var a,i,n=arguments.length;for(i=0;i<n;i++){a=arguments[i];updcol(a,dv[a]);}}
function ct(c){return"<td title='#"+c+"' style='background-color:"+c+"' onclick='setcol(\""+c+"\")'>&nbsp;</td>";}
function opencol(n,c){var t,h,i,r,g,b,e=gf(n+"disp"),p=ap(e);if(e.offsetWidth){p.x+=e.offsetWidth+5;}
e=gf("palette");activecol=n;ep(e,p);e.style.zIndex=50;t="<table cellpadding=0 cellspacing=1 border=0 class='ct'><tr>";for(i=0;i<16;i++){h=String.fromCharCode(i+((i>9)?55:48));t+=ct(h+h+h+h+h+h);}
t+="<\/tr><\/table>";t+="<table cellpadding=0 cellspacing=1 border=0 class='c"+c+"a'>";if(c){for(r=0;r<6;r++){t+="<tr>";for(g=0;g<6;g++){for(b=0;b<3;b++){t+=ct(wsc[r]+wsc[g]+wsc3[b]);}}
t+="<\/tr>";}}else{for(r=0;r<3;r++){t+="<tr>";for(g=0;g<3;g++){for(b=0;b<3;b++){t+=ct(wsc3[r]+wsc3[g]+wsc3[b]);}}
t+="<\/tr>";}}
t+="<\/table>";t+="<br \/><input type='button' value='"+((c)?"Less colors":"More colors")+"' onclick=\"opencol('"+n+"',"+(1-c)+")\">";ih(e,t);}
function fga(){var c,t,s,v,n,u="",i,d,l=arguments.length;for(i=0;i<l;i++){n=arguments[i];v=""+gv(n);if(n.match(/c$/)){v=v.toLowerCase();c=v.charAt(0);t="";for(d=0;d<6;d++){s=v.charAt(d++);if(s==v.charAt(d)){t+=s;}}
if(t.length==3){v=t;}
if(c=="t"){v="t";fat=' allowTransparency="true"';}}
if(v&&!(dv[n]==v)){u+="/"+n+v;}}
return u;}
function getsized(h,w,e){return h.replace("widthheight","width=\""+w+"\" height=\""+e+"\"");}
function gh(o,n){var u,v,s;if(o){sh=1;he("htmldiv",1);}u="";v=gc("b")+gc("i")+gc("u");fat="";u+=fga("i","n","tl","fn","fs","fc","tc","pc","ah","av");if(v){u+="/ft"+v;}
v=gv("bo");if(v>1){t2=(v==2)?fga("bas","bat","bac"):fga("bls","blt","blc","brs","brt","brc","bts","btt","btc","bbs","bbt","bbc");if(t2){u+=t2;}else{u+="/bo"+v;}}
v=gv("pd");if(v>1){t2=(v==2)?fga("pa"):fga("pl","pr","pt","pb");if(t2){u+=t2;}else{u+="/pd"+v;}}
v=gv("tt");u+=fga("tt");if(v!=2){u+=fga("tw","tm","td");}
if(v!=1){u+=fga("th","ts","ta");}
if(v==0){u+=fga("tb");}
u+='" frameborder="0" widthheight'+fat+"></iframe>\n";s=(gv("dpt")==1)?"https://freesecure":"http://free";lastt="<iframe src=\""+s+".timeanddate.com/clock"+u;if(prevhtml==lastt){return;}
prevhtml=lastt;document.f.html.value=getsized(lastt,prevw,prevh);h='<iframe id="exmpfr" name="exmpfr" src="onlyforusebyconfiguration.php';iH("exmp",getsized(h+u,prevw,prevh));}
function setsize(w,h){var f=gf("exmpfr");if(f){prevw=w;prevh=h;f.style.width=w;f.style.height=h;document.f.html.value=getsized(lastt,w,h);}}
function ncfgs(t,n,v){var o,i,l,c,e;if(t==2){for(i=0;i<v.length;i++){c=v.charAt(i);e=document.f["f"+c];if(e){e.checked=true;}}
return;}
e=document.f[n];if(e){if(t==3||t==4){ncfgs(1,"bo",t-1);t=1;}
if(t==5||t==6){ncfgs(1,"pd",t-3);t=1;}
if(t==1){o=e.options;if(o){l=o.length;for(i=0;i<l;i++){if(o[i].value==v){o[i].selected=true;break;}}}else{e.value=v;}
if(e.onchange){e.onchange();}else if(e.onblur){e.onblur();}}else{}}}
function ncfg(c){var i,p,n,a=c.match(/\/[^\/]+/g);document.f.reset();var k={i:1,n:1,tl:1,fn:1,fs:1,fc:1,tc:1,pc:1,ah:1,av:1,ft:2,bo:1,bas:3,bat:3,bac:3,bls:4,blt:4,blc:4,brs:4,brt:4,brc:4,bts:4,btt:4,btc:4,bbs:4,bbt:4,bbc:4,pd:1,pa:5,pl:6,pr:6,pt:6,pb:6,tt:1,tw:1,tm:1,td:1,th:1,ts:1,tb:1,ta:1,dpt:1};if(a){for(i=0;i<a.length;i++){p=a[i];n=p.substring(1,2);if(k[n]){ncfgs(k[n],n,p.substring(2));}else{n=p.substring(1,3);if(k[n]){ncfgs(k[n],n,p.substring(3));}else{n=p.substring(1,4);if(k[n]){ncfgs(k[n],n,p.substring(4));}}}}}
cinit();fsu();return false;}
function impbutclk(){he("impbut",0);he("impmsg",0);document.f2.srccode.value="";he("imparea",1);}
function impbut(n){var h,m,a,e,f="";if(n==1){h=document.f2.srccode.value;m="";if(h.length<20){m="Please paste the HTML in the field below";}else{a=h.match(/http(.?)\:\/\/free\w*\.timeanddate\.com\/clock(\/[^\"\']+)/);if(a){f=a[2];if(a[1]=="s"){f+="/dpt1";}}else{m="Was not able to find clock from timeanddate.com in supplied HTML";}}
if(m){e=gf("impmsg");if(e){ih(e,"Error: "+m);sd(e,1);return;}}}
he("impbut",1);he("imparea",0);if(f){ncfg(f);}}
function init(){cinit();ic("pc","tc","fc","bac","blc","btc","brc","bbc");ffl();fdpt();gh();}