(function(){
var c=window;function d(a,b){return a.onmouseover=b}function e(a,b){return a.display=b}var f="length",g="style",h;
function i(a){this.B=a.adsContainer;this.A=a.nextAdIndex||0;this.J=a.linksContainer;this.b=a.previousLink;this.a=a.nextLink;this.t=a.linkActiveBgColor;this.v=a.linkInactiveBgColor;this.u=a.linkActiveCursor;this.w=a.linkInactiveCursor;this.z=a.loading;this.g=a.requestToken;this.P=a.renderAds;this.F=a.getNextAdRequestUrl;this.O=a.maxAds;this.H=a.handlerUrl;this.R=a.requestUrl;this.D=a.formatParams;this.d=a.pages;this.c=0;this.f=false;this.T();e(this.J[g],"block")}h=i.prototype;
h.N=function(a){this.I();if(a.ads[f]==0){this.g=null;this.c=0;this.i()}else{this.g=a.token&&a.token[f]>0?a.token:null;var b=0;for(;b<a.ads[f];++b){a.ads[b].id=this.A;++this.A}this.K(a.ads)}this.k();this.f=false};h.q=function(){var a=0;for(;a<this.d[f];++a)e(this.d[a][g],"none")};h.U=function(){this.q();e(this.z[g],"")};h.I=function(){e(this.z[g],"none")};h.n=function(a){if(a==0&&this.c>0)this.M();else if(a==1&&(this.g||this.c<this.d[f]-1))this.L()};h.o=function(a){this.j(a)};
h.p=function(a){if(a==0&&this.c>0||a==1&&(this.g||this.c<this.d[f]-1))this.S(a)};h.K=function(a){var b=this.P(this.c,a,this.D);this.d.push(b);this.B.appendChild(b)};h.L=function(){if(!this.f){this.f=true;++this.c;if(this.c==this.d[f]){this.U();this.Q()}else{this.i();this.k();this.f=false}}};h.M=function(){if(!this.f){this.f=true;--this.c;this.i();this.k();this.f=false}};h.i=function(){this.q();e(this.d[this.c][g],"")};h.Q=function(){var a=this.C();document.getElementsByTagName("head")[0].appendChild(a)};
h.C=function(){var a=this.G(),b=document.createElement("script");b.setAttribute("src",a);return b};h.G=function(){return this.F({handlerUrl:this.H,maxAds:this.O,requestToken:this.g,requestUrl:this.R})};h.S=function(a){var b=a==0?this.b:this.a;b[g].backgroundColor=b.l;b[g].cursor=b.m};h.j=function(a){var b=a==0?this.b:this.a;b[g].backgroundColor=b.r;b[g].cursor=b.s};
h.k=function(){if(this.c>0)d(this.b,this.b.h);else{d(this.b,null);this.j(0)}if(this.g||this.c<this.d[f]-1)d(this.a,this.a.h);else{d(this.a,null);this.j(1)}};
h.T=function(){this.b.l=this.t;this.b.r=this.v;this.b.e=this;this.b.m=this.u;this.b.s=this.w;this.b.onmousedown=function(){this.e.n(0)};this.b.h=function(){this.e.p(0)};this.b.onmouseout=function(){this.e.o(0)};d(this.b,this.b.h);this.b.onmouseout();this.a.l=this.t;this.a.r=this.v;this.a.e=this;this.a.m=this.u;this.a.s=this.w;this.a.onmousedown=function(){this.e.n(1)};this.a.h=function(){this.e.p(1)};this.a.onmouseout=function(){this.e.o(1)};d(this.a,this.a.h);this.a.onmouseout()};
if(!Array.prototype.indexOf)Array.prototype.indexOf=function(a){var b=0;for(;b<this[f];b++)if(this[b]==a)return b;return-1};if(c.sma){c.smaSlotManager=new i(c.sma);c.handleAdsRequestDone=function(a){c.smaSlotManager.N(a)}};
})();
