(function(){var c=window,d=document;function h(a,b){return a.cursor=b}function i(a,b){return a.onmouseover=b}function j(a,b){return a.display=b}var l="appendChild",m="length",p="style",r;
function s(a){this.P=a.adsContainer;this.L=a.nextAdIndex||0;this.z=a.linksContainer;this.b=a.previousLink;this.a=a.nextLink;this.v=a.linkArrowColor;this.q=a.linkActiveBgColor;this.w=a.linkInactiveBgColor;this.H=a.linkActiveCursor;this.I=a.linkInactiveCursor;this.J=a.loading;this.j=a.requestToken;this.fa=a.renderAds;this.T=a.getNextAdRequestUrl;this.ca=a.maxAds;this.V=a.handlerUrl;this.ha=a.requestUrl;this.S=a.formatParams;this.d=a.pages;this.c=0;this.i=false;this.o={};this.n={};this.da=a.nextAdsMessage;
this.ea=a.previousAdsMessage;this.f=a.arrowHeight;this.g=a.arrowWidth;this.l=a.arrowSize;this.Q=a.arrowGap;this.G=a.isRtl;this.Y();this.ja();j(this.z[p],"block")}r=s.prototype;r.ba=function(a){this.W();if(a.ads[m]==0){this.j=null;this.c=0;this.A()}else{this.j=a.token&&a.token[m]>0?a.token:null;for(var b=0;b<a.ads[m];++b){var f=a.ads[b];f.id=this.L;f.isRtl=this.G;++this.L}this.Z(a.ads)}this.p();this.i=false};r.F=function(){for(var a=0;a<this.d[m];++a)j(this.d[a][p],"none")};
r.ka=function(){this.F();j(this.J[p],"")};r.W=function(){j(this.J[p],"none")};r.B=function(a){if(a==0&&this.c>0)this.aa();else if(a==1&&(this.j||this.c<this.d[m]-1))this.$()};r.C=function(a){j((a==0?this.o:this.n)[2][p],"none");this.p()};r.D=function(a){if(a==0&&this.c>0||a==1&&(this.j||this.c<this.d[m]-1))this.ia(a)};r.Z=function(a){a=this.fa(this.c,a,this.S);this.d.push(a);this.P[l](a)};
r.$=function(){if(!this.i){this.i=true;++this.c;if(this.c==this.d[m]){this.ka();this.ga()}else{this.A();this.p();this.i=false}}};r.aa=function(){if(!this.i){this.i=true;--this.c;this.A();this.p();this.i=false}};r.A=function(){this.F();j(this.d[this.c][p],"")};r.ga=function(){var a=this.R();d.getElementsByTagName("head")[0][l](a)};r.R=function(){var a=this.U(),b=d.createElement("script");b.setAttribute("src",a);return b};r.s=function(a,b){this.u(a);j((a==0?this.o:this.n)[b][p],"block")};
r.u=function(a){a=a==0?this.o:this.n;for(var b=0;b<=2;b++)j(a[b][p],"none")};r.U=function(){return this.T({handlerUrl:this.V,maxAds:this.ca,requestToken:this.j,requestUrl:this.ha})};r.ia=function(a){if(a==0)h(this.b[p],this.b.r);else h(this.a[p],this.a.r);this.s(a,2)};r.N=function(a){if(a==0)h(this.b[p],this.b.m);else h(this.a[p],this.a.m);this.s(a,1)};r.M=function(a){if(a==0)h(this.b[p],this.b.m);else h(this.a[p],this.a.m);this.s(a,0)};
r.p=function(){if(this.c>0){i(this.b,this.b.k);this.o[2][p].display=="none"&&this.M(0)}else{i(this.b,null);this.N(0)}if(this.j||this.c<this.d[m]-1){i(this.a,this.a.k);this.n[2][p].display=="none"&&this.M(1)}else{i(this.a,null);this.N(1)}};
r.ja=function(){this.b.O=this.q;this.b.X=this.w;this.b.e=this;this.b.r=this.H;this.b.m=this.I;this.b.onmousedown=function(){this.e.B(0)};this.b.k=function(){this.e.D(0)};this.b.onmouseout=function(){this.e.C(0)};i(this.b,this.b.k);this.a.O=this.q;this.a.X=this.w;this.a.e=this;this.a.r=this.H;this.a.m=this.I;this.a.onmousedown=function(){this.e.B(1)};this.a.k=function(){this.e.D(1)};this.a.onmouseout=function(){this.e.C(1)};i(this.a,this.a.k);this.p()};
r.h=function(a,b,f,g,n){var k=d.createElement("div"),e="position:absolute;overflow:hidden;left:";e+=a;e+="px;top:";e+=b;e+="px;width:";e+=f;e+="px;height:";e+=g;e+="px;";e+="background-color:";e+=n;k[p].cssText=e;return k};
r.t=function(a,b,f,g){f=f?this.h(0,0,this.g,this.f,a):this.h(0,0,this.g,this.f,b);b=this.h(1,1,this.g-2,this.f-2,b);f[l](b);var n=this.f/2-1,k=Math.floor((this.g-3-this.l)/2),e,q;if(g==0){b[l](this.h(k-1,n-1,2,2,a));g=-2;e=0;q=-1}else{b[l](this.h(k+this.l,n-1,2,2,a));g=-this.l-1;e=this.l-1;q=1}for(var o=0;o<this.l;o++){b[l](this.h(k+o,n+g+q*o,2,2,a));b[l](this.h(k+o,n+e-q*o,2,2,a))}return f};
r.K=function(a,b,f){var g=false;b[1]=this.t(this.v,this.w,g,f);a[l](b[1]);b[0]=this.t(this.v,this.q,g,f);a[l](b[0]);g=true;b[2]=this.t(this.q,this.v,g,f);a[l](b[2])};r.Y=function(){var a=0,b=1;if(this.G){a=1;b=0}this.K(this.b,this.o,a);this.K(this.a,this.n,b);this.a.title=this.da;this.b.title=this.ea;this.z[p].width=2*this.g+this.Q+"px";this.z[p].height=this.f+"px";this.b[p].width=this.g+"px";this.b[p].height=this.f+"px";this.a[p].width=this.g+"px";this.a[p].height=this.f+"px";this.u(0);this.u(1)};
if(!Array.prototype.indexOf)Array.prototype.indexOf=function(a){for(var b=0;b<this[m];b++)if(this[b]==a)return b;return-1};if(c.sma){c.smaSlotManager=new s(c.sma);c.handleAdsRequestDone=function(a){c.smaSlotManager.ba(a)}};})();
