(function(){var j=[514,512],s=[514,512],y=[];var p=this,B=document,i=p.location,A=i.protocol,t=false,z=Math.round,k=Math.random,x=1000000,a=500,m="//an.yandex.ru/resource/",w="yandex_log_errors",v="setAttribute",n="insertBefore",r="createElement",h="getElementsByTagName";p.yandex_ad_is_displayed=false;p.y5_iR=p.y5_iR||z(k()*x);p.y5_iTestR=p.y5_iTestR||z(k()*x);p.y5_escape=f;p.y5_isEntry=l;p.y5_addScript=b;p.y5_linkStyle=g;if(!t){d();t=true}else{try{Ya.Context.init()}catch(u){}}function d(){var C=(p.yandex_partner_id||0)*1,H=i.href.match(/yandex_test_code=1/)||!(z(k()*x)%500)&&(!y.length||l(C,y)),F=H?j:s,I=A+m+"context_static_r"+F[0]+".js",E=A+m+"context_r"+F[1]+".css",e=p.navigator||{};e.y5_ver=F;if(p[w]===undefined&&H){p[w]=true}if(p.yandex_context_callbacks){var J=B[r]("script"),D=B[r]("link"),G=B[h]("head")[0];J[v]("type","text/javascript");J[v]("src",I);D[v]("rel","stylesheet");D[v]("type","text/css");D[v]("href",E);G[n](J,G.firstChild);G[n](D,G.firstChild)}else{setTimeout(function(){var K=B[h]("script"),L=K?K[K.length-1]:null;if(L&&(!p.Ya||!p.Ya.Context)&&L.getAttribute("yandex_load_check")=="yes"){L.parentNode.removeChild(L);c()}},8000);if(!q()){g(E);b(I)}}}function o(){return(new Date()).getTime()}function c(){if(!p.name){p.name='{"yandex_timeout":'+o()+"}"}}function q(){var e=(p.name+"").match(/"yandex_timeout":(\d+)/);if(e){return e[1]+1>o()-900000}}function l(E,D){for(var C=0,e=D.length;C<e;C++){if(E==D[C]){return true}}return false}function g(e){B.write('<link rel="stylesheet" type="text/css" href="'+e+'" />')}function b(e){B.write('<script type="text/javascript" src="'+e+'" yandex_load_check=yes><\/script>')}function f(C,e){if(!C){return""}C=C.substr(0,e||256);return encodeURIComponent(C)}})();