function _datetime_init(f,o,r,m){var g=new _IG_Prefs(f),k;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 j=a.z[g.getString("color")]||a.z.blue;a.a=function(b,c){b=document.createElementNS(a.Q,b);c.appendChild(b);return b};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(b,c){for(var d in c)b.setAttribute(d,c[d])};function a(){}a.V=function(b,c,d){var e=b[0]-c[0];b=b[1]-c[1];var i=[];i.push(e*Math.cos(d)-b*Math.sin(d)+c[0]);i.push(e*Math.sin(d)+b*Math.cos(d)+c[1]);return i};a.K=function(b,c,d,e){for(var i=[],h=0;h<b.length;++h)i.push(a.V(b[h],
c,e));b=["m "];b.push(Math.round(i[0][0]));b.push(",");b.push(Math.round(i[0][1]));b.push(" l ");for(h=1;h<i.length;++h){h!=1&&b.push(",");b.push(Math.round(i[h][0]));b.push(",");b.push(Math.round(i[h][1]))}d.v=b.join("")};a.prototype.J=function(){this.H(_gel("dt_v"+f),_gel("dt_ss"+f),_gel("dt_sb"+f),_gel("dt_cn"+f));this.G(_gel("dt_md"+f))};a.prototype.L=function(b,c){var d,e;if(a.s()){d=_gel("dt_vhh"+f);e=_gel("dt_vmh"+f)}else{d=_gel("gdt_svg_hour_hand"+f);e=_gel("gdt_svg_min_hand"+f)}if(d&&e){b=
180+(60*b+c)/2;c=180+6*c;var i=b*Math.PI/180,h=c*Math.PI/180;if(a.s()){a.K(a.S,a.F,e,h);a.K(a.R,a.F,d,i)}else{e.setAttribute("transform","rotate("+c+" "+a.j+" "+a.k+")");d.setAttribute("transform","rotate("+b+" "+a.j+" "+a.k+")")}}};a.prototype.w=function(){var b=new Date,c=b.getHours(),d=b.getMinutes(),e=b.getDay(),i=b.getMonth(),h=b.getDate();b=b.getFullYear();this.L(c,d);this.I(e,i,h,b);this.M(e,i,h)};a.prototype.o=function(b,c){if(c||a.l()&&m=="rtl"){c=0;if(a.l()&&m=="rtl")c=4000-_gel("gdt_svg_outer_section"+
f).clientWidth;b.innerHTML="";for(var d=1;d<=12;++d){var e=(d>=10?-3:0)+a.j-4+(m=="rtl"?1:-1)*a.D*Math.sin(-30*d*Math.PI/180);if(a.l()&&m=="rtl")e+=c;b.innerHTML+='<div class="dt_cd'+f+'" style="top:'+(a.k-6-a.D*Math.cos(-30*d*Math.PI/180))+"px;"+o+":"+e+'px">'+d+"</div>"}}};a.prototype.u=function(){var b=_gel("dt_c"+f),c=_gel("dt_md"+f),d=_gel("dt_on"+f);if(!(!b||!c||!d)){d=d.clientWidth;a.prototype.o(_gel("dt_cn"+f),false);m=="rtl"&&a.l()&&_gel("gdt_ch"+f).setAttribute("x",d-a.q+"px");if(!(d==0))if(d<
a.N){b.style.display="none";c.style.display="none"}else if(d<a.n){b.style.display="none";c.style.display="block";c.style[o]=a.p+"px"}else if(d<a.m){d=d-a.n;b.style.display="block";c.style.display="block";b.style[o]=a.A-a.m+a.n+d+"px";c.style[o]=a.p-(a.m-a.n)/2+d/2+"px"}else if(d>=a.m){b.style.display="block";c.style.display="block";b.style[o]=a.A+"px";c.style[o]=a.p+"px"}}};a.prototype.M=function(b,c,d){var e=_gel("dt_d"+f),i=_gel("dt_m"+f),h=_gel("dt_dt"+f);if(!(!e||!i||!h)){var q=[g.getMsg("sun"),
g.getMsg("mon"),g.getMsg("tue"),g.getMsg("wed"),g.getMsg("thu"),g.getMsg("fri"),g.getMsg("sat")],l=[g.getMsg("jan"),g.getMsg("feb"),g.getMsg("mar"),g.getMsg("apr"),g.getMsg("may"),g.getMsg("jun"),g.getMsg("jul"),g.getMsg("aug"),g.getMsg("sep"),g.getMsg("oct"),g.getMsg("nov"),g.getMsg("dec")];e.innerHTML=q[b];i.innerHTML=l[c];h.innerHTML=d}};a.prototype.I=function(b,c,d,e){var i=_gel("dt_c"+f);if(i){var h=[g.getMsg("sun_a"),g.getMsg("mon_a"),g.getMsg("tue_a"),g.getMsg("wed_a"),g.getMsg("thu_a"),g.getMsg("fri_a"),
g.getMsg("sat_a")],q=[31,28,31,30,31,30,31,31,30,31,30,31],l=[];l.push('<table style="border-collapse:collapse;font-size:12px;color:',j.f,'">','<tr align="right" style="font-weight:900">');for(var p=g.getInt("firstDay"),n=0;n<7;++n)l.push('<td style="padding-'+r+':4px;">',h[(p+n)%7],"</td>");l.push("</tr>");h=q[c];if(c==1&&e%4==0)if(e%100!=0||e%400==0)h=29;c=1;b=(b-p+7-d%7+1+7)%7;for(n=0;n<6;++n){l.push('<tr align="right">');for(p=0;p<7;++p){e=c;if(n==0&&p<b||c>h)e="&nbsp;";else c++;l.push("<td ");
e==d&&l.push('style="font-weight:900;color:',j.i,'" ');l.push('class="dt_ct'+f+'">',e,"</td>")}l.push("</tr>")}l.push("</table>");i.innerHTML=l.join("")}};a.prototype.H=function(b,c,d,e){if(!(!b||!c||!d||!e)){this.o(e,true);e=j.e;_gel("dt_on"+f).style.color=j.f;if(a.s()){c.style.display="none";_gel("dt_vfg"+f).fillcolor=e[1];_gel("gdt_vml_first_gradient_top"+f).color2=e[0];_gel("dt_vsg"+f).fillcolor=e[2];_gel("gdt_vml_second_gradient_top"+f).color2=e[1];_gel("dt_vtg"+f).fillcolor=e[3];_gel("gdt_vml_third_gradient_top"+
f).color2=e[2];_gel("gdt_vml_hour_hand_rect"+f).fillcolor=j.d;_gel("gdt_vml_hour_hand_rect"+f).strokecolor=j.c;_gel("gdt_vml_min_hand_rect"+f).fillcolor=j.d;_gel("gdt_vml_min_hand_rect"+f).strokecolor=j.c;_gel("dt_vp"+f).fillcolor=j.h;_gel("dt_vp"+f).strokecolor=j.g;_gel("dt_v"+f).style.display="block"}else{b.style.display="none";b=a.a("svg",c);a.b(b,{width:"4000px",height:"140px",viewbox:"0 0 1 140"});d=a.a("svg",d);a.b(d,{width:"4000px",height:"140px",viewbox:"0 0 1 140"});d=a.a("rect",d);a.b(d,
{fill:"url(#gdt_GadgetGradient"+f+")",x:"0",y:"0",width:"100%",height:"141"});d=a.a("svg",b);a.b(d,{id:"gdt_ch"+f,x:(m=="ltr"?0:4000-a.q)+"px",width:"200px",height:"200px",viewbox:"0 0 200 200"});m=="rtl"&&a.l()&&_gel("gdt_ch"+f).setAttribute("x",_gel("gdt_svg_outer_section"+f).clientWidth-a.q+"px");b=a.a("defs",d);b=a.a("linearGradient",b);a.b(b,{id:"gdt_GadgetGradient"+f,x1:"100%",y1:"0%",x2:"100%",y2:"100%"});c=a.a("stop",b);a.b(c,{offset:"0%","stop-color":e[0]});c=a.a("stop",b);a.b(c,{offset:"32%",
"stop-color":e[1]});c=a.a("stop",b);a.b(c,{offset:"52%","stop-color":e[2]});b=a.a("stop",b);a.b(b,{offset:"100%","stop-color":e[3]});e=a.a("g",d);a.b(e,{fill:"yellow"});b=a.a("rect",e);a.b(b,{id:"gdt_svg_min_hand"+f,x:a.j-a.C/2,y:a.k,width:a.C,height:a.P,fill:j.d,stroke:j.c,rx:"2",ry:"2","stroke-width":"0.666"});e=a.a("rect",e);a.b(e,{id:"gdt_svg_hour_hand"+f,x:a.j-a.B/2,y:a.k,width:a.B,height:a.O,fill:j.d,stroke:j.c,rx:"2",ry:"2","stroke-width":"0.666"});e=a.a("circle",d);a.b(e,{cx:a.j,cy:a.k,r:"10",
"stroke-width":"1",stroke:j.g,fill:j.h})}}};a.prototype.G=function(b){var c='<div id="dt_m'+f+'"></div>',d='<div id="dt_dt'+f+'"></div>',e='<div id="dt_d'+f+'"></div>';switch(g.getString("dateFormat")){case "dmw":c=d+c+e;break;case "mdw":c=c+d+e;break;case "wdm":c=e+d+c;break;default:c=e+c+d}b.innerHTML=c};a.prototype.t=function(b){k._updateGadget();if(!b){b=_gel("dt_on"+f);if(!(!b||!b.parentNode||!b.parentNode.parentNode)){var c=b.parentNode.parentNode;c.className+=" modbox_nopadding ";c.style.padding=
"0";var d=c.parentNode.childNodes;c=null;for(var e=0;e<d.length;++e)if(d[e].className&&d[e].className.match(/rnd_modboxin/)){c=d[e];break}if(a.U())b.parentNode.style.width="101%";if(c)for(b=0;b<c.childNodes.length-1;++b)c.childNodes[b].style.backgroundColor=j.e[3]}}};a.prototype._startInterval=function(){k._updateGadget();window.setInterval(k._updateGadget,60000)};a.prototype._updateGadget=function(){k.w()};a.T=function(){k=new a;k.J();k.w();k.t(false);k.u();window.setTimeout(k._startInterval,(60-
(new Date).getSeconds())*1000+5);_IG_AddDOMEventHandler(window,"resize",k.u);_IG_RegisterMaximizeHandler(f,k.t)};_IG_RegisterOnloadHandler(a.T)}