(function(e,o,i){var l=[581,581],r=581,t=[],s=1000000,b=50,j=8000,c="//an.yandex.ru/",p=c+"resource/",g=e.Ya=e.Ya||{};e.yandex_ad_is_displayed=false;var h=function(){if(!e.name){e.name='{"yandex_timeout":'+new Date()+"}"}},q=function(){var u=(e.name+"").match(/"yandex_timeout":(\d+)/);if(u){return u[1]+1>new Date()-900000}},d=(e.yandex_partner_id||0)*1,m=/yandex_test_code=(\d+)/.test(e.location.href.match)||!(Math.round(Math.random()*s)%b)&&(!t.length||y5_isEntry(d,t)),f=r,a;if(!g.jsVer){g.isTestVersion=m;if(m&&m.length){f=l[(m[1]-1)]}else{if(m){f=Math.random()<0.5?l[0]:l[1]}}if(typeof e.yandex_new_code=="number"){f=l[e.yandex_new_code-1]}g.jsVer=f}a=p+"context_static_r"+f+".js";if(e.yandex_context_callbacks||e.yandexContextAsyncCallbacks){var n=o.createElement("script"),k=o.getElementsByTagName("script")[0];n.type="text/javascript";n.src=a;k.parentNode.insertBefore(n,k)}else{setTimeout(function(){var u=o.getElementsByTagName("script"),v=u?u[u.length-1]:null;if(v&&(!e.Ya||!e.Ya.Context)&&v.getAttribute("yandex_load_check")=="yes"){h()}v.parentNode.removeChild(v)},j);if(!q()){o.write('<script type="text/javascript" src="'+a+'" yandex_load_check="yes"><\/script>')}}})(this,this.document);