var _tmr=_tmr||[];
(function(){function v(a,r,b){a.addEventListener?a.addEventListener(r,b,!1):a.attachEvent&&a.attachEvent("on"+r,b)}function f(){}function w(a){return a||"https:"==g.location.protocol?"https:":"http:"}function K(a){return(a=!n?void 0:n[a])&&x?a-x:void 0}function m(a,r){var b="id"in a?a.id:k,e="url"in a?a.url:location.href,c="referrer"in a?a.referrer:g.referrer,f="title"in a?a.title:g.title,b=w(p)+"//top-fwz1.mail.ru"+(r?"/tracker":"/counter")+"?js=13"+(b?";id="+escape(b):"")+(e?";u="+escape(e):"")+
(c?";r="+escape(c):"")+("start"in a&&0<a.start?";st="+escape(a.start):"")+("gender"in a?";gender="+escape(a.gender):"")+("age"in a?";age="+escape(a.age):"")+("pid"in a?";pid="+escape(a.pid):"")+(f?";title="+encodeURIComponent(f):"")+((y=d.screen)?";s="+y.width+"*"+y.height:"")+";vp=",c=e=0;g.documentElement&&(g.documentElement.clientWidth||g.documentElement.clientHeight)?(e=g.documentElement.clientWidth,c=g.documentElement.clientHeight):"number"==typeof d.innerWidth&&(e=d.innerWidth,c=d.innerHeight);
b=b+(""+e+"*"+c)+";touch="+L+";hds="+M+";flash="+z+";sid="+D+";ver="+E+";nt=";if(!n||!A)e="";else{e=[];e.push(A.type);e.push(A.redirectCount);e.push(x);for(c=0;c<F.length;c++)e.push(K(F[c]));e=e.join("/")}return b+e+";_="+Math.random()}function G(a,b){return w(p)+"//top-fwz1.mail.ru/tracker?js=13;id="+a[0]+";e="+escape(b)+";sid="+D+";ids="+a.join()+";ver="+E+";_="+Math.random()}function N(){if(!H)for(var a=0;a<q.length;a++){var b=q[a];(new Image).src=m(b,!0)+";e="+escape("PVT/15")}}function B(){_tmr.onload()}
if("[object Array]"===Object.prototype.toString.call(_tmr)){var d=window,c=navigator,g=document,y,k=0,E=60,s=[],C=0,t=0,D="xxxxxxxx".replace(/[x]/g,function(a){return(16*Math.random()|0).toString(16)}),q=[],l=[],u=0,h="string"===typeof location.hostname&&(-1!=location.hostname.search(/^odnoklassniki\.ru$/)||-1!=location.hostname.search(/\.odnoklassniki\.ru$/)||-1!=location.hostname.search(/^ok\.ru$/)||-1!=location.hostname.search(/\.ok\.ru$/)),p="string"===typeof location.hostname&&(-1!=location.hostname.search(/^vk\.com$/)||
-1!=location.hostname.search(/\.vk\.com$/)),I=h||p,H=h||p,J=h||p,L="ontouchstart"in d||1<(c.maxTouchPoints||c.msMaxTouchPoints)?"1":"0",M=d.devicePixelRatio||0,z="";if(c.plugins&&c.plugins["Shockwave Flash"])z=c.plugins["Shockwave Flash"].description.split(" ")[2];else if(d.ActiveXObject)try{var b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"),b=b.GetVariable("$version"),b=b.split(" ")[1].split(","),z=b[0]+"."+b[1]}catch(O){}var c=d.performance||d.mozPerformance||d.msPerformance||d.webkitPerformance||
{},n=c.timing||{},A=c.navigation||{},F="unloadEventStart unloadEventEnd redirectStart redirectEnd fetchStart domainLookupStart domainLookupEnd connectStart connectEnd secureConnectionStart requestStart responseStart responseEnd domLoading domInteractive domContentLoadedEventStart domContentLoadedEventEnd domComplete loadEventStart loadEventEnd".split(" "),x=!n?void 0:n.navigationStart;f.prototype.pageView=function(a){"start"in a&&s.push(a);(new Image).src=m(a,!1);t=(new Date).getTime()};f.prototype.reachGoal=
function(a){if("goal"in a&&a.goal){var b="";"value"in a&&a.value&&(b=parseInt(a.value)||"");(new Image).src=m(a,!0)+(";e="+escape("RG:"+b+"/"+a.goal))}};f.prototype.itemView=function(a){if("id"in a||k)(new Image).src=w(0)+"//ad.mail.ru/retarget/?counter="+(a.id||k)+"&list="+(a.list||"")+"&productid="+(a.productid||"")+"&pagetype="+(a.pagetype||"")+"&totalvalue="+(a.totalvalue||0)+"&_="+Math.random()};f.prototype.sendEvent=function(a){if("category"in a&&a.category&&"action"in a&&a.action){var b=a.category.substr(0,
300),c=a.action.substr(0,300),e="";"label"in a&&a.label&&(e=a.label.substr(0,300));var d="";"value"in a&&a.value&&(d=parseInt(a.value)||"");b="CE:"+d+"/"+b.replace(/;/g," ")+";"+c.replace(/;/g," ")+";"+e.replace(/;/g," ");(new Image).src=m(a,!0)+(";e="+escape(b))}};f.prototype.processEvent=function(a){if("type"in a&&("pageView"!=a.type||"id"in a)){if(!k&&"id"in a&&"type"in a&&("pageView"==a.type||"reachGoal"==a.type||"sendEvent"==a.type))k=a.id;switch(a.type){case "pageView":this.pageView(a);break;
case "reachGoal":this.reachGoal(a);break;case "itemView":this.itemView(a);break;case "sendEvent":this.sendEvent(a)}}};f.prototype.push=function(a){this.processEvent(a)};f.prototype.onload=function(){if(0<s.length){u=(new Date).getTime();for(var a=0,b;b=s[a];a++)(new Image).src=m(b,!0)+";e="+escape("RT/load")+";et="+u;t=u;s=[]}H||setTimeout(N,15E3)};f.prototype.beat=function(){if(!I&&0!=l.length&&C){var a=(new Date).getTime(),b=a-C;if(!(12E4<b)){if(12E4<a-t)for(var c=0;c<q.length;c++){var d=q[c];(new Image).src=
m(d,!0)+";e="+escape("RT/resend")+";et="+u+";active="+(b?"1":"0")}else(new Image).src=G(l,"RT/beat");t=a}}};f.prototype.unload=function(){J||0==l.length||((new Image).src=G(l,"RT/unload"))};f.prototype.activity=function(a){C=(new Date).getTime()};c=new f;for(h=0;b=_tmr[h];h++)if(!k&&"id"in b&&"type"in b&&("pageView"==b.type||"reachGoal"==b.type))k=b.id;for(h=0;b=_tmr[h];h++)"id"in b&&("type"in b&&"pageView"==b.type&&5>l.length)&&(l.push(b.id),q.push(b)),c.processEvent(b);_tmr=c;if("complete"===g.readyState)_tmr.onload();
else d.addEventListener?d.addEventListener("load",B,!1):d.attachEvent?d.attachEvent("onload",B):d.onload=B;J||v(d,"beforeunload",_tmr.unload);if(!I&&0<l.length){setInterval(_tmr.beat,3E4);try{c=function(a){for(var b=0;b<a.length;b++)v(g,a[b],function(){_tmr.activity(a[b])})},c(["scroll","gesturechange","touchmove"]),c(["mousedown","mousemove","mouseup"]),v(d,"scroll",function(){_tmr.activity("scallback")})}catch(P){}}}})();

