function _datetime_init(c,r,x,p){var i=new _IG_Prefs(c),m;a.Q="http://www.w3.org/2000/svg";a.j=80;a.k=69;a.D=51;a.B=7;a.C=5;a.P=41;a.O=30;a.R=[[47,50],[47,79],[48,80],[53,80],[54,79],[54,50]];a.S=[[48,50],[48,90],[49,91],[52,91],[53,90],[53,50]];a.F=[50,50];a.z={blue:{e:["#ecf4fd","#ecf3fd","#e6f1fd","#d4e6fc"],f:"#224499",i:"#000",d:"#90a1cc",c:"#cfe0e6",h:"#ffcc33",g:"#d4c27b"},pink:{e:["#ffdaf2","#fdd5ed","#eeb7d7","#e3a1c5"],f:"#c36",i:"#fff",d:"#fff",c:"#cfe0e6",h:"#ffcc33",g:"#d4c27b"},green:{e:["#c4e4ab",
"#bedfa3","#a9cd8a","#98c076"],f:"#360",i:"#fff",d:"#fff",c:"#cfe0e6",h:"#ffcc33",g:"#d4c27b"},red:{e:["#e7a6a6","#e5a2a2","#dd8181","#d66262"],f:"#fff",i:"#fff",d:"#fff",c:"#cfe0e6",h:"#ffcc33",g:"#d4c27b"},purple:{e:["#f1d6ff","#f0d3fd","#ddb4f1","#cd9ae7"],f:"#636",i:"#fff",d:"#fff",c:"#cfe0e6",h:"#ffcc33",g:"#d4c27b"},black:{e:["#000000","#000000","#101010","#313131"],f:"#fff",i:"#fff",d:"#fff",c:"#cfe0e6",h:"#ffcc33",g:"#d4c27b"},white:{e:["#fff","#fff","#fff","#fff"],f:"#000",i:"#000",d:"#000",
c:"#cfe0e6",h:"#ffcc33",g:"#d4c27b"},yellow:{e:["#f6e4af","#f6e3a9","#f7dc8a","#f7d56e"],f:"#960",i:"#000",d:"#000",c:"#cfe0e6",h:"#ffcc33",g:"#d4c27b"},orange:{e:["#f3dd9a","#f3dd9a","#ecca83","#e1b066"],f:"#c60",i:"#fff",d:"#fff",c:"#cfe0e6",h:"#ffcc33",g:"#d4c27b"}};a.n=335;a.m=385;a.A=255;a.p=172;a.N=215;a.q=160;var k=a.z[i.getString("color")]||a.z.blue;a.a=function(g,e){var f=document.createElementNS(a.Q,g);e.appendChild(f);return f};a.s=function(){return navigator.userAgent.toLowerCase().indexOf("msie")!=
-1};a.U=function(){return navigator.userAgent.toLowerCase().indexOf("chrome")!=-1||navigator.userAgent.toLowerCase().indexOf("safari")!=-1};a.l=function(){return navigator.userAgent.toLowerCase().indexOf("firefox/2.0")!=-1};a.b=function(g,e){for(var f in e)g.setAttribute(f,e[f])};function a(){}a.V=function(g,e,f){var d=g[0]-e[0],b=g[1]-e[1],h=[];h.push(d*Math.cos(f)-b*Math.sin(f)+e[0]);h.push(d*Math.sin(f)+b*Math.cos(f)+e[1]);return h};a.K=function(g,e,f,d){for(var b=[],h=0;h<g.length;++h)b.push(a.V(g[h],
e,d));var j=["m "];j.push(Math.round(b[0][0]));j.push(",");j.push(Math.round(b[0][1]));j.push(" l ");for(h=1;h<b.length;++h){h!=1&&j.push(",");j.push(Math.round(b[h][0]));j.push(",");j.push(Math.round(b[h][1]))}f.v=j.join("")};a.prototype.J=function(){this.H(_gel("dt_v"+c),_gel("dt_ss"+c),_gel("dt_sb"+c),_gel("dt_cn"+c));this.G(_gel("dt_md"+c))};a.prototype.L=function(g,e){var f,d;if(a.s()){f=_gel("dt_vhh"+c);d=_gel("dt_vmh"+c)}else{f=_gel("gdt_svg_hour_hand"+c);d=_gel("gdt_svg_min_hand"+c)}if(f&&
d){var b=180+(60*g+e)/2,h=180+6*e,j=b*Math.PI/180,l=h*Math.PI/180;if(a.s()){a.K(a.S,a.F,d,l);a.K(a.R,a.F,f,j)}else{d.setAttribute("transform","rotate("+h+" "+a.j+" "+a.k+")");f.setAttribute("transform","rotate("+b+" "+a.j+" "+a.k+")")}}};a.prototype.w=function(){var g=new Date,e=g.getHours(),f=g.getMinutes(),d=g.getDay(),b=g.getMonth(),h=g.getDate(),j=g.getFullYear();this.L(e,f);this.I(d,b,h,j);this.M(d,b,h)};a.prototype.o=function(g,e){if(e||a.l()&&p=="rtl"){var f=0;if(a.l()&&p=="rtl")f=4000-_gel("gdt_svg_outer_section"+
c).clientWidth;g.innerHTML="";for(var d=1;d<=12;++d){var b=(d>=10?-3:0)+a.j-4+(p=="rtl"?1:-1)*a.D*Math.sin(-30*d*Math.PI/180);if(a.l()&&p=="rtl")b+=f;g.innerHTML+='<div class="dt_cd'+c+'" style="top:'+(a.k-6-a.D*Math.cos(-30*d*Math.PI/180))+"px;"+r+":"+b+'px">'+d+"</div>"}}};a.prototype.u=function(){var g=_gel("dt_c"+c),e=_gel("dt_md"+c),f=_gel("dt_on"+c);if(!(!g||!e||!f)){var d=f.clientWidth;a.prototype.o(_gel("dt_cn"+c),false);p=="rtl"&&a.l()&&_gel("gdt_ch"+c).setAttribute("x",d-a.q+"px");if(!(d==
0))if(d<a.N){g.style.display="none";e.style.display="none"}else if(d<a.n){g.style.display="none";e.style.display="block";e.style[r]=a.p+"px"}else if(d<a.m){var b=d-a.n;g.style.display="block";e.style.display="block";g.style[r]=a.A-a.m+a.n+b+"px";e.style[r]=a.p-(a.m-a.n)/2+b/2+"px"}else if(d>=a.m){g.style.display="block";e.style.display="block";g.style[r]=a.A+"px";e.style[r]=a.p+"px"}}};a.prototype.M=function(g,e,f){var d=_gel("dt_d"+c),b=_gel("dt_m"+c),h=_gel("dt_dt"+c);if(!(!d||!b||!h)){var j=[i.getMsg("sun"),
i.getMsg("mon"),i.getMsg("tue"),i.getMsg("wed"),i.getMsg("thu"),i.getMsg("fri"),i.getMsg("sat")],l=[i.getMsg("jan"),i.getMsg("feb"),i.getMsg("mar"),i.getMsg("apr"),i.getMsg("may"),i.getMsg("jun"),i.getMsg("jul"),i.getMsg("aug"),i.getMsg("sep"),i.getMsg("oct"),i.getMsg("nov"),i.getMsg("dec")];d.innerHTML=j[g];b.innerHTML=l[e];h.innerHTML=f}};a.prototype.I=function(g,e,f,d){var b=_gel("dt_c"+c);if(b){var h=[i.getMsg("sun_a"),i.getMsg("mon_a"),i.getMsg("tue_a"),i.getMsg("wed_a"),i.getMsg("thu_a"),i.getMsg("fri_a"),
i.getMsg("sat_a")],j=[31,28,31,30,31,30,31,31,30,31,30,31],l=[];l.push('<table style="border-collapse:collapse;font-size:12px;color:',k.f,'">','<tr align="right" style="font-weight:900">');for(var q=i.getInt("firstDay"),n=0;n<7;++n)l.push('<td style="padding-'+x+':4px;">',h[(q+n)%7],"</td>");l.push("</tr>");var o=j[e];if(e==1&&d%4==0)if(d%100!=0||d%400==0)o=29;var s=1,v=(g-q+7-f%7+1+7)%7;for(n=0;n<6;++n){l.push('<tr align="right">');for(var t=0;t<7;++t){var u=s;if(n==0&&t<v||s>o)u="&nbsp;";else s++;
l.push("<td ");u==f&&l.push('style="font-weight:900;color:',k.i,'" ');l.push('class="dt_ct'+c+'">',u,"</td>")}l.push("</tr>")}l.push("</table>");b.innerHTML=l.join("")}};a.prototype.H=function(g,e,f,d){if(!(!g||!e||!f||!d)){this.o(d,true);var b=k.e;_gel("dt_on"+c).style.color=k.f;if(a.s()){e.style.display="none";_gel("dt_vfg"+c).fillcolor=b[1];_gel("gdt_vml_first_gradient_top"+c).color2=b[0];_gel("dt_vsg"+c).fillcolor=b[2];_gel("gdt_vml_second_gradient_top"+c).color2=b[1];_gel("dt_vtg"+c).fillcolor=
b[3];_gel("gdt_vml_third_gradient_top"+c).color2=b[2];_gel("gdt_vml_hour_hand_rect"+c).fillcolor=k.d;_gel("gdt_vml_hour_hand_rect"+c).strokecolor=k.c;_gel("gdt_vml_min_hand_rect"+c).fillcolor=k.d;_gel("gdt_vml_min_hand_rect"+c).strokecolor=k.c;_gel("dt_vp"+c).fillcolor=k.h;_gel("dt_vp"+c).strokecolor=k.g;_gel("dt_v"+c).style.display="block"}else{g.style.display="none";var h=a.a("svg",e);a.b(h,{width:"4000px",height:"140px",viewbox:"0 0 1 140"});var j=a.a("svg",f);a.b(j,{width:"4000px",height:"140px",
viewbox:"0 0 1 140"});var l=a.a("rect",j);a.b(l,{fill:"url(#gdt_GadgetGradient"+c+")",x:"0",y:"0",width:"100%",height:"141"});var q=a.a("svg",h);a.b(q,{id:"gdt_ch"+c,x:(p=="ltr"?0:4000-a.q)+"px",width:"200px",height:"200px",viewbox:"0 0 200 200"});p=="rtl"&&a.l()&&_gel("gdt_ch"+c).setAttribute("x",_gel("gdt_svg_outer_section"+c).clientWidth-a.q+"px");var n=a.a("defs",q),o=a.a("linearGradient",n);a.b(o,{id:"gdt_GadgetGradient"+c,x1:"100%",y1:"0%",x2:"100%",y2:"100%"});var s=a.a("stop",o);a.b(s,{offset:"0%",
"stop-color":b[0]});var v=a.a("stop",o);a.b(v,{offset:"32%","stop-color":b[1]});var t=a.a("stop",o);a.b(t,{offset:"52%","stop-color":b[2]});var u=a.a("stop",o);a.b(u,{offset:"100%","stop-color":b[3]});var w=a.a("g",q);a.b(w,{fill:"yellow"});var y=a.a("rect",w);a.b(y,{id:"gdt_svg_min_hand"+c,x:a.j-a.C/2,y:a.k,width:a.C,height:a.P,fill:k.d,stroke:k.c,rx:"2",ry:"2","stroke-width":"0.666"});var z=a.a("rect",w);a.b(z,{id:"gdt_svg_hour_hand"+c,x:a.j-a.B/2,y:a.k,width:a.B,height:a.O,fill:k.d,stroke:k.c,
rx:"2",ry:"2","stroke-width":"0.666"});var A=a.a("circle",q);a.b(A,{cx:a.j,cy:a.k,r:"10","stroke-width":"1",stroke:k.g,fill:k.h})}}};a.prototype.G=function(g){var e='<div id="dt_m'+c+'"></div>',f='<div id="dt_dt'+c+'"></div>',d='<div id="dt_d'+c+'"></div>',b;switch(i.getString("dateFormat")){case "dmw":b=f+e+d;break;case "mdw":b=e+f+d;break;case "wdm":b=d+f+e;break;default:b=d+e+f}g.innerHTML=b};a.prototype.t=function(g){m._updateGadget();if(!g){var e=_gel("dt_on"+c);if(!(!e||!e.parentNode||!e.parentNode.parentNode)){var f=
e.parentNode.parentNode;f.className+=" modbox_nopadding ";f.style.padding="0";for(var d=f.parentNode.childNodes,b=null,h=0;h<d.length;++h)if(d[h].className&&d[h].className.match(/rnd_modboxin/)){b=d[h];break}if(a.U())e.parentNode.style.width="101%";if(b)for(var j=0;j<b.childNodes.length-1;++j)b.childNodes[j].style.backgroundColor=k.e[3]}}};a.prototype._startInterval=function(){m._updateGadget();window.setInterval(m._updateGadget,60000)};a.prototype._updateGadget=function(){m.w()};a.T=function(){m=
new a;m.J();m.w();m.t(false);m.u();window.setTimeout(m._startInterval,(60-(new Date).getSeconds())*1000+5);_IG_AddDOMEventHandler(window,"resize",m.u);_IG_RegisterMaximizeHandler(c,m.t)};_IG_RegisterOnloadHandler(a.T)}