(function(i,p){var q="stat.sputnik.ru",o="cnt.sputnik.ru",d="sputnikCounter",w="sputnik_session",z=i[d]||i["_"+d]||{},b,y,a;if(z.loaded){return}z.loaded=true;function r(B,A,C){if(B.addEventListener){B.addEventListener(A,C,true)}else{if(B.attachEvent){B.attachEvent("on"+A,C)}}}function e(C){var D=[],F,E,B,A;while(C){F=C.nodeName.toLowerCase();if(F==="html"){break}E=C.getAttribute("id");if(E){D.unshift("#"+E);break}B=C.getAttribute("name");A=C.getAttribute("class");if(B){F+='[name="'+B+'"]'}else{if(A){F+="."+A.trim().replace(/\s+/g,".")}}D.unshift(F);C=C.parentNode}return D.join(">")}function j(C,B){var A;for(A in B){if(B.hasOwnProperty(A)&&B[A]!==undefined){C[A]=String(B[A])}}return C}function c(){var B=new Date().getTime(),A="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(D){var C=(B+Math.random()*16)%16|0;B=Math.floor(B/16);return(D==="x"?C:(C&3|8)).toString(16)});return A}function x(){var B="",A;B+=i.HTMLCanvasElement?"1":"0";B+=(i.navigator&&i.navigator.geolocation)?"1":"0";A=false;try{A=i.localStorage}catch(C){}B+=A?"1":"0";B+=i.HTMLVideoElement?"1":"0";B+=i.HTMLAudioElement?"1":"0";B+=i.performance?"1":"0";return B}function v(A){var D=A+"=",C=decodeURIComponent(p.cookie).split(";"),B,E;for(B=0;B<C.length;B++){E=C[B];while(E.charAt(0)===" "){E=E.substring(1)}if(E.indexOf(D)===0){return E.substring(D.length,E.length)}}return""}function f(){var B=(new Date()).getTime(),A={behaviorStart:B,behaviorLastHit:B,behaviorDuration:0,behaviorHits:0};A.update=function(F){var D=v(w),E=new Date(),C=E.getTime(),G;if(D===""){A.pageviewStart=C;A.pageviewHits=0}else{G=D.split("|");if(G.length===2){A.pageviewStart=isNaN(G[0])?C:G[0];A.pageviewHits=isNaN(G[1])?0:G[1]}else{A.pageviewStart=isNaN(D)?C:D;A.pageviewHits=0}}A.pageviewDuration=C-A.pageviewStart;if(F==="pageview"){A.pageviewHits++}E.setTime(C+900000);p.cookie=w+"="+b.pageviewStart+"|"+A.pageviewHits+"; Path=/; Expires="+E.toUTCString();if(C-A.behaviorLastHit>900000){A.behaviorStart=C}A.behaviorLastHit=C;A.behaviorDuration=C-A.behaviorStart;if(F==="behavior"){A.behaviorHits++}};return A}function n(B){var D={},A,C;D.location=i.location.href;D.title=p.title;D.timezone=(new Date()).getTimezoneOffset();D.java=i.navigator.javaEnabled();D.html5=x();if(parent!==i){try{D.referrer=parent.document.referrer||""}catch(E){}}if(D.referrer||D.referrer===""){D.frameReferrer=B||p.referrer||""}else{D.referrer=B||p.referrer||""}if(p.cookie){D.cookie=true}else{p.cookie="sp_test=1; path=/";D.cookie=!!p.cookie}if(screen.width&&screen.height){D.screen=screen.width+"x"+screen.height}if(screen.colorDepth){D.colorDepth=screen.colorDepth}else{if(screen.pixelDepth){D.colorDepth=screen.pixelDepth}}if(i.navigator.plugins&&i.navigator.plugins["Shockwave Flash"]){D.flash=i.navigator.plugins["Shockwave Flash"].description.split(" ")[2]}else{if(i.ActiveXObject){for(A=19;A>=2;A-=1){try{C=new i.ActiveXObject("ShockwaveFlash.ShockwaveFlash."+A);if(C){D.flash=A+".0";break}}catch(E){}}}}return D}function s(){var C={},B=i.performance.timing,E=B.navigationStart,D,A;D={ues:B.unloadEventStart,uee:B.unloadEventEnd,rds:B.redirectStart,rde:B.redirectEnd,fs:B.fetchStart,dls:B.domainLookupStart,dle:B.domainLookupEnd,cs:B.connectStart,ce:B.connectEnd,rqs:B.requestStart,rss:B.responseStart,rse:B.responseEnd,dl:B.domLoading,di:B.domInteractive,dcs:B.domContentLoadedEventStart,dce:B.domContentLoadedEventEnd,dc:B.domComplete,les:B.loadEventStart,lee:B.loadEventEnd};for(A in D){if(D.hasOwnProperty(A)){if(D[A]>0){D[A]-=E}else{delete D[A]}}}C.performance=D;C.location=i.location.href;return C}function g(D){var A=new Image(),C,B;C=(p.location.protocol==="https:"?"https:":"http:")+"//"+q+"/cnt?";for(B in D){if(D.hasOwnProperty(B)){C+=B+"="+encodeURIComponent(D[B])+"&"}}if(z.brand){C+="brand="+encodeURIComponent(z.brand)+"&"}C+="rn="+Math.random();A.src=C;A.onload=function(){return}}function u(A){b.update("pageview");var B={pg:A.location,r:A.referrer,title:A.title,t:A.timezone,wh:A.screen,px:A.colorDepth,h5:A.html5,psid:b.pageviewStart,psdur:b.pageviewDuration,psh:b.pageviewHits,bsid:b.behaviorStart,bsdur:b.behaviorDuration,bsh:b.behaviorHits};if(A.frameReferrer){B.r1=A.frameReferrer}if(A.cookie){B.c=1}if(A.java){B.j="Y"}if(A.flash){B.fl=A.flash}if(z.userVars){B.partname=JSON.stringify(j({},z.userVars))}g(B)}function l(B){var C={p:7,pg:B.location,},D=B.performance,A;for(A in D){if(D.hasOwnProperty(A)){C["p"+A]=D[A]}}g(C)}function t(A){b.update("behavior");var C={p:8,pg:A.location,pvid:A.pageview,psid:b.pageviewStart,psdur:b.pageviewDuration,psh:b.pageviewHits,bsid:b.behaviorStart,bsdur:b.behaviorDuration,bsh:b.behaviorHits},B;if(A.event){C.event=A.event}if(A.target){C.target=A.target}if(A.data){C.data=A.data}if(A.scancode){C.scancode=A.scancode}if(A.symbol){C.symbol=A.symbol}if(z.userVars||A.userVars){B={};if(z.userVars){j(B,z.userVars)}if(A.userVars){j(B,A.userVars)}C.partname=JSON.stringify(B)}g(C)}function h(E){var C=p.getElementById("non-point"),D,B,A;if(C&&C.getAttribute){D=C.getAttribute("data-p");B=C.getAttribute("data-u");if(D!==null&&D!==""&&B!==null&&B!==""){A=new Image();A.src=(p.location.protocol==="https:"?"https:":"http:")+"//"+q+"/cntm?p="+encodeURIComponent(D)+"&u="+encodeURIComponent(B);A.onload=function(){return}}}else{if(E<10){i.setTimeout(function(){h(E+1)},1000)}}}function k(){var C=p.getElementById("sputnik-informer"),B,E,A,D;if(C){B=i.location.hostname.replace(/^www\./,"");E=-(new Date()).getTimezoneOffset();A=new Image(88,31);A.src=(p.location.protocol==="https:"?"https:":"http:")+"//"+o+"/informer?domain="+encodeURIComponent(B)+"&tz="+E;A.title="Просмотры, визиты, посетители за текущие сутки";A.alt="Счетчик Спутника";A.onload=function(){D=p.createElement("a");D.href="https://"+o+"/public/"+encodeURIComponent(B);D.target="_blank";D.appendChild(A);C.appendChild(D)}}}function m(){b=f();y=c();a=n();u(a)}m();i.setInterval(function(){if(i.location.href!==a.location){m()}},500);if(i.performance&&i.performance.timing){r(i,"load",function(){setTimeout(function(){var A=s();l(A)},0)})}(function(){var I=("onload" in new XMLHttpRequest())?XMLHttpRequest:XDomainRequest,B=p.location.protocol,E=("https:"==B?"https:":"http:")+"//"+q+"/conf?host="+i.location.hostname,J=["click","contextmenu","dblclick","keypress","submit"],H=["mousemove","scroll"],D={},F;function K(M){t({location:i.location.href,pageview:y,event:M.type});delete (D[M.type])}function G(M){if(M.target){t({location:i.location.href,pageview:y,event:M.type,scancode:M.keyCode,symbol:M.key,target:e(M.target),data:M.target.getAttribute("data-sputnik-track")})}}function A(M){if(M.type){if(D[M.type]!==undefined){i.clearTimeout(D[M.type])}D[M.type]=i.setTimeout(function(){K(M)},500)}}function C(){for(F=0;F<J.length;F+=1){r(p,J[F],G)}for(F=0;F<H.length;F+=1){r(p,H[F],A)}}var L=new I();L.open("GET",E,true);L.onload=function(){var M=JSON.parse(this.responseText);if(M.conf!=undefined&&!M.conf){J=["click","contextmenu","dblclick","submit"]}C()};L.onerror=function(){C()};L.send()}());if(z.events){while(z.events.length>0){t({location:i.location.href,pageview:y,userVars:z.events.shift()})}}else{z.events=[]}z.events.push=function(A){t({location:i.location.href,pageview:y,userVars:A})};if(p.readyState==="interactive"||p.readyState==="complete"){h(0);k()}else{r(p,"readystatechange",function(){if(p.readyState==="interactive"){h(0);k()}})}i[d]=z}(window,document));