window.targetix = (function(self) {self.lib = (function(self) {self.innerHtmlCode = function(container, code) {if (container) {var parentElem = container.parentNode;var nextElem = container.nextSibling;parentElem.removeChild(container);container.innerHTML = code;parentElem.insertBefore(container, nextElem);} else {document.write(code);}};self.addEventListenerToNode = function(node, eventName, listener) {if (node.addEventListener) {node.addEventListener(eventName, listener, false);} else if (node.attachEvent) {node.attachEvent("on" + eventName, listener);}};self.removeEventListenerFromNode = function(node, eventName, listener) {if (node.removeEventListener) {node.removeEventListener(eventName, listener, false);} else if (node.detachEvent) {node.detachEvent("on" + eventName, listener);} };self.getBodyScrollLeft = function() {if (document.compatMode == "BackCompat") {return document.body.scrollLeft;} else {if (typeof(pageXOffset) != "undefined") {return pageXOffset;} else {return document.documentElement.scrollLeft;}}};self.getBodyScrollTop = function() {if (document.compatMode == "BackCompat") {return document.body.scrollTop;} else {if (typeof(pageYOffset) != "undefined") {return pageYOffset;} else {return document.documentElement.scrollTop;}}};self.getClientLeft = function() {return document.documentElement.clientLeft || document.body.clientLeft || 0;};self.getClientTop = function() {return document.documentElement.clientTop || document.body.clientTop || 0;};self.getClientWidth = function() {if (document.compatMode == "BackCompat") {return document.body.clientWidth;} else {if (typeof(innerWidth) != "undefined") {return innerWidth;} else {return document.documentElement.clientWidth;}}};self.getClientHeight = function() {if (document.compatMode == "BackCompat") {return document.body.clientHeight;} else {if (typeof(innerHeight) != "undefined") {return innerHeight;} else {return document.documentElement.clientHeight;}}};self.getElementOffsetRect = function(element) {var box = element.getBoundingClientRect();var left = box.left + self.getBodyScrollLeft() - self.getClientLeft();var top = box.top + self.getBodyScrollTop() - self.getClientTop();var right = left + element.clientWidth;var bottom = top + element.clientHeight;return { left: Math.round(left), top: Math.round(top), right: Math.round(right), bottom: Math.round(bottom) }};self.intersectRects = function(rect1, rect2) {var result = {left : Math.max(rect1.left, rect2.left),top : Math.max(rect1.top, rect2.top),right : Math.min(rect1.right, rect2.right),bottom : Math.min(rect1.bottom, rect2.bottom)};if (result.left > result.right || result.top > result.bottom) {result = false;}return result;};self.isVisiblePortionSatisfies = function(intersectionRect, elementRect, widthPortion, heightPortion) {var rlDiff = (elementRect.right - elementRect.left);var visibleWidthPortion = (rlDiff == 0) ? 1 : (intersectionRect.right - intersectionRect.left) / rlDiff;var btDiff = (elementRect.bottom - elementRect.top);var visibleHeightPortion = (btDiff == 0) ? 1 : (intersectionRect.bottom - intersectionRect.top) / btDiff;if (visibleWidthPortion >= widthPortion && visibleHeightPortion >= heightPortion) {return true;}return false;};self.isElementVisibleInWindow = function(element, widthPortion, heightPortion) {if (typeof widthPortion != "number") {widthPortion = 1.0;}if (typeof heightPortion != "number") {heightPortion = 1.0;}if (widthPortion == 0 && heightPortion == 0) {return true;}var windowRect = {left : 0,top : 0,right : document.documentElement.clientWidth,bottom : document.documentElement.clientHeight};var elementRect = element.getBoundingClientRect();var intersectionRect = self.intersectRects(windowRect, elementRect);if (intersectionRect) {return self.isVisiblePortionSatisfies(intersectionRect, elementRect, widthPortion, heightPortion);}return false;};self.isElementVisibleInScreen = function(element, widthPortion, heightPortion) {if (typeof widthPortion != "number") {widthPortion = 1.0;}if (typeof heightPortion != "number") {heightPortion = 1.0;}if (widthPortion == 0 && heightPortion == 0) {return true;}var windowLeft = 0;var windowTop = 0;if (window.self !== window.top) {return true;}var ot = 0;if ((navigator.userAgent.match(/Chrome/))) {ot = 93;}if (typeof(mozInnerScreenX) != "undefined") {windowLeft = mozInnerScreenX;} else if (typeof(window.screenLeft) != "undefined") {windowLeft = window.screenLeft;} else if (typeof(window.screenX) != "undefined") {windowLeft = window.screenX;}if (typeof(mozInnerScreenY) != "undefined") {windowTop = mozInnerScreenY;} else if (typeof(window.screenTop) != "undefined") {windowTop = window.screenTop + ot;} else if (typeof(window.screenY) != "undefined") {windowTop = window.screenY + ot;}var screenRect = {left : 0,top : 0,right : screen.width,bottom : screen.height};var elementRect = element.getBoundingClientRect();var elementScreenRect = {left : elementRect.left + windowLeft,top : elementRect.top + windowTop,right : elementRect.right + windowLeft,bottom : elementRect.bottom + windowTop};var intersectionRect = self.intersectRects(screenRect, elementScreenRect);if (intersectionRect) {return self.isVisiblePortionSatisfies(intersectionRect, elementScreenRect, widthPortion, heightPortion);}return false;};self.correctElementSize = function(element) {if (element.width) {element.style.width = element.width + (element.width.search("%") == -1 ? "px" : "");}if (element.height) {element.style.height = element.height + (element.height.search("%") == -1 ? "px" : "");}};self.forEachNode = function(nodes, callback) {for (var i = 0; i < nodes.length; i++) {callback(nodes[i]);}};self.JSON = (function(self) {self.stringify = function(value) {if(window.JSON) {return window.JSON.stringify(value);} else {return self.encode(value);}};self.encode = function(value) {switch (typeof value) {case "string":return "'" + value + "'";case "number":return isFinite(value) ? String(value) : "null";case "boolean":case "null":return String(value);case "object":if (!value) {return "null";}var partial = [];if (Object.prototype.toString.apply(value) === "[object Array]") {for (var i = 0; i < value.length; i++) {partial[i] = this.encode(value[i]) || "null";}return "[" + partial.join(",") + "]";}for (var key in value) {if (Object.prototype.hasOwnProperty.call(value, key)) {var sProp = this.encode(value[key]);if (sProp) {partial.push("'" + key + "'" + ":" + sProp);}}}return "{" + partial.join(",") + "}";}};return self;})(self.JSON || {});self.getFlashInfo = function() {if (navigator.plugins && navigator.plugins.length > 0) {var type = "application/x-shockwave-flash";var mimeTypes = navigator.mimeTypes;if (mimeTypes && mimeTypes[type] && mimeTypes[type].enabledPlugin) {var plugin = mimeTypes[type].enabledPlugin;var lineVersion = plugin.version ? plugin.version : plugin.description;if(lineVersion) {var matchVersion = /([0-9]+\.[0-9]+)|([0-9]+)/.exec(lineVersion);if(matchVersion.length > 0) {return {isSupported: true, version: matchVersion[0]};}}}}else {var flashObj = null;if(window.ActiveXObject) {try {flashObj = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");} catch(e) {}if (flashObj != null) {var lineVersion = flashObj.GetVariable("$version");var matchVersion = /([0-9]+,[0-9]+)|([0-9]+)/.exec(lineVersion);if(matchVersion.length > 0) {return {isSupported: true, version: matchVersion[0].replace(/,/g,".")};}}}}return {isSupported: false};};self.encrypt = function(data) {return "-" + self.randomChar() + self.base64Encode(self.rStr(5, 10) + unescape(encodeURIComponent(data)));};self.randomChar = function() {return String.fromCharCode(Math.random() * 26 + 65);};self.rStr = function(min, max) {var count = min + Math.random() * (max - min);var str = "";for (var i = 0; i < count; i++) {str = str + String.fromCharCode(Math.random() * 100);}return str;};self.base64Encode = function(s) {var padchar = "=";var alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var i, b10;var x = [];var imax = s.length - s.length % 3;if (s.length === 0) {return s;}for (i = 0; i < imax; i += 3) {b10 = (s.charCodeAt(i) << 16) | (s.charCodeAt(i + 1) << 8) | s.charCodeAt(i + 2);x.push(alpha.charAt(b10 >> 18));x.push(alpha.charAt((b10 >> 12) & 0x3F));x.push(alpha.charAt((b10 >> 6) & 0x3f));x.push(alpha.charAt(b10 & 0x3f));}switch (s.length - imax) {case 1:b10 = s.charCodeAt(i) << 16;x.push(alpha.charAt(b10 >> 18) + alpha.charAt((b10 >> 12) & 0x3F) +padchar + padchar);break;case 2:b10 = (s.charCodeAt(i) << 16) | (s.charCodeAt(i + 1) << 8);x.push(alpha.charAt(b10 >> 18) + alpha.charAt((b10 >> 12) & 0x3F) +alpha.charAt((b10 >> 6) & 0x3f) + padchar);break;}return x.join("");};self.getSystemParams = function(element) {var params = {};params["Url"] = location.href;if(document.referrer.length > 0) {params["Referrer"] = document.referrer;}params["Language"] = (navigator.language || navigator.browserLanguage);params["TimezoneOffset"] = (new Date()).getTimezoneOffset()/60;params["ScreenWidth"] = screen.width;params["ScreenHeight"] = screen.height;var flashInfo = self.getFlashInfo();params["IsFlashSupported"] = flashInfo.isSupported;if(flashInfo.isSupported) {params["FlashVersion"] = flashInfo.version;}return params;};self.registerImpression = function(requestUrl, zoneId, bannerId, campaignId, width, height, adDomain, url, element) {window.targetix.pageVisitId = window.targetix.pageVisitId || Math.round((Math.random()*10000000000000000)).toString()+new Date().valueOf().toString();var requestData = {};requestData["ZoneId"] = zoneId;requestData["BannerId"] = bannerId;requestData["CampaignId"] = campaignId;requestData["BannerSize"] = { Width : width, Height : height };requestData["AdDomain"] = adDomain;requestData["PageVisitId"] = window.targetix.pageVisitId;requestData["Browser"] = self.getSystemParams(element);if (window.targetix.context == null) {requestData["IsFirst"] = true;window.targetix.context = "=I=";}var requestImage = new Image();requestImage.onerror = function() {(new Image()).src = url;};requestImage.src = requestUrl + self.encrypt(self.JSON.stringify(requestData));};self.registerView = function(url) {(new Image()).src = url};self.Ajax = function() {var request = new XMLHttpRequest();this.send = function(options) {if(options.success) {request.onreadystatechange = function() {if (request.readyState == 4) {if (request.status == 200) {options.success(request.responseText);}}}}var method = options.method ? options.method : "GET";request.open(method, options.url, true);var data = options.data ? options.data : null;request.send(data);};};return self;})(self.lib || {});return self;})(window.targetix || {});(function(){var container = document.getElementById("targetix-container-0.3785552359186113");if (container) {container.style.display = "inline-block";container.style.lineHeight = "0px";container.style.verticalAlign = "bottom";}var htmlOutput = function(str) {if (container) {var parentElem = container.parentNode;var nextElem = container.nextSibling;parentElem.removeChild(container);container.innerHTML += str;parentElem.insertBefore(container, nextElem);} else {document.write(str);}};var css = "#banner_511cfab847 { display: inline-block; line-height: 0px; vertical-align: bottom; } #banner_511cfab847 * { line-height: normal; } ";head = document.getElementsByTagName("head")[0];styleElem = document.createElement("style");styleElem.type = "text/css";if (styleElem.styleSheet){styleElem.styleSheet.cssText = css;} else {styleElem.appendChild(document.createTextNode(css));}head.appendChild(styleElem);var content = "<"+"span id=\"banner_511cfab847\" >\n";htmlOutput(content);var swfSupported = window.targetix.lib.getFlashInfo().isSupported;var altEnabled = true;if (swfSupported || altEnabled) {window.targetix.ibeacon_511cfab847 = function() {function handleImpression() {var iImage = new Image();iImage.onload = function() {window.targetix.vbeacon_511cfab847();};iImage.src = "http://ads.targetix.net/lg.php?bannerid=39712&campaignid=4050&zoneid=2610&OACCAP=3&loc=http%3A%2F%2Fwww.4turista.ru%2Fcontent%2F22-230314-mezinovskoe-tp-i-okrestnosti&referer=https%3A%2F%2Fwww.google.ru%2F&cb=511cfab847";window.targetix= (function(self) {self.zones = self.zones || [];self.zones["2610"] = self.zones["2610"] || {};self.zones["2610"].isImpressed = true;return self;})(window.targetix || {});};if (typeof(window.targetix.zones) == "undefined" || typeof(window.targetix.zones) != "undefined" && typeof(window.targetix.zones["2610"]) == "undefined" || typeof(window.targetix.zones) != "undefined" && typeof(window.targetix.zones["2610"]) != "undefined" && typeof(window.targetix.zones["2610"].isImpressed) == "undefined" ) {handleImpression();}}; window.targetix.vbeacon_511cfab847 = function() {var container = document.getElementById("banner_511cfab847");var timer = null;var ae = null;var isInsider = false;var isFocus = true;var ie = navigator.appVersion.match(/MSIE/);function checkContainerVisibility() {if ((typeof(window.targetix.zones) == "undefined" || typeof(window.targetix.zones) != "undefined" && typeof(window.targetix.zones["2610"]) == "undefined" || typeof(window.targetix.zones) != "undefined" && typeof(window.targetix.zones["2610"]) != "undefined" && typeof(window.targetix.zones["2610"].isViewed) == "undefined" ) &&isFocus && window.targetix.lib.isElementVisibleInWindow(container, 0.8, 0.8) && window.targetix.lib.isElementVisibleInScreen(container, 0.8, 0.8)) {if (timer == null) {timer = setTimeout(handleRealImpression, 1000);}} else {if (timer != null) {clearTimeout(timer);timer = null;}}};function insider() {if (ae != null) {window.targetix.lib.removeEventListenerFromNode(ae, "blur", insider);}if (ae == document.activeElement) {isInsider = false;bl();} else {try {ae = document.activeElement;if (typeof(ae) != "undefined") {isInsider = true;isFocus = true;window.targetix.lib.addEventListenerToNode(ae, "blur", insider);}} catch (ex) {}}};function bl() {if (isFocus && (!ie || !isInsider)) {isFocus = false;}};function fo() {if (!isFocus) {isFocus = true;}if (ie) {try {ae = document.activeElement;if (typeof(ae) != "undefined") {isInsider = true;isFocus = true;window.targetix.lib.addEventListenerToNode(ae, "blur", insider);}} catch (ex) {}}checkContainerVisibility();};function msover() {isFocus = true;fo();};if (window.self === window.top) {window.targetix.lib.addEventListenerToNode(window, "blur", bl);window.targetix.lib.addEventListenerToNode(window, "focus", fo);window.targetix.lib.addEventListenerToNode(window, "scroll", fo);window.targetix.lib.addEventListenerToNode(window, "resize", fo);if (!ie) {window.targetix.lib.addEventListenerToNode(window, "mousemove", msover);} else {window.targetix.lib.addEventListenerToNode(document, "mousemove", msover);}};function handleRealImpression() {if (isFocus) {var vImage = new Image();vImage.src = "http://ads.targetix.net/rlg.php?bannerid=39712&campaignid=4050&zoneid=2610&OACCAP=3&loc=http%3A%2F%2Fwww.4turista.ru%2Fcontent%2F22-230314-mezinovskoe-tp-i-okrestnosti&referer=https%3A%2F%2Fwww.google.ru%2F&cb=511cfab847"; window.targetix= (function(self) {self.zones = self.zones || [];self.zones["2610"] = self.zones["2610"] || {};self.zones["2610"].isViewed = true;return self;})(window.targetix || {});window.targetix.lib.removeEventListenerFromNode(window, "scroll", checkContainerVisibility);window.targetix.lib.removeEventListenerFromNode(window, "resize", checkContainerVisibility);window.targetix.lib.removeEventListenerFromNode(window, "blur", bl);window.targetix.lib.removeEventListenerFromNode(window, "blur", insider);window.targetix.lib.removeEventListenerFromNode(window, "focus", fo);window.targetix.lib.removeEventListenerFromNode(window, "scroll", fo);window.targetix.lib.removeEventListenerFromNode(window, "resize", fo);if (!ie) {window.targetix.lib.removeEventListenerFromNode(window, "mousemove", msover);} else {window.targetix.lib.removeEventListenerFromNode(document, "mousemove", msover);}} else {if (timer != null) {clearTimeout(timer);timer = null;}}};window.targetix.lib.addEventListenerToNode(window, "scroll", checkContainerVisibility);window.targetix.lib.addEventListenerToNode(window, "resize", checkContainerVisibility);window.targetix.lib.forEachNode(container.getElementsByTagName("embed"), window.targetix.lib.correctElementSize);checkContainerVisibility();}; window.targetix.tpibeacon_511cfab847 = function() {}; window.targetix.tpcbeacon_511cfab847 = function() {(new Image()).src = "//track.hubrus.com/log_match?dmp=targetix&uid=1CF124FDC96EF72E017D92BB9D91B6FD&url=https://advombat.ru/0.gif?pid=AUDITORIUS2";(new Image()).src = "//advombat.ru/api/id?pid=targetix&url=http://st.targetix.net/match?id=8&vid=$UID";(new Image()).src = "//cm.g.doubleclick.net/pixel?google_nid=tgtx&google_cm&google_sc";(new Image()).src = "//b.kavanga.ru/republer/pixel.gif?dsp=targetix";}; var container = document.getElementById("banner_511cfab847");var code = '';code += "<"+"iframe id=\"a511cfab847\" name=\"a511cfab847\" src=\"http://ads.targetix.net/ac.php?bannerid=39712&zoneid=2610&withtext=0&source=&ct0=&cb=511cfab847&loc=http%3A%2F%2Fwww.4turista.ru%2Fcontent%2F22-230314-mezinovskoe-tp-i-okrestnosti&referer=https%3A%2F%2Fwww.google.ru%2F\" frameborder=\"0\" scrolling=\"no\" width=\"728\" height=\"90\" onload=\"window.targetix.ibeacon_511cfab847();window.targetix.tpibeacon_511cfab847();\"><"+"/iframe>\n";window.targetix.lib.innerHtmlCode(container, code);};window.targetix.tpcbeacon_511cfab847();content = "<"+"/span>\n";htmlOutput(content);window.targetix = (function(self) {self.registerEvent = function(eventId, bannerId, zoneId, cb) {var webpath = "//ads.targetix.net/evt.php";var location = "http%3A%2F%2Fwww.4turista.ru%2Fcontent%2F22-230314-mezinovskoe-tp-i-okrestnosti";var query = "?cb="+cb+"&r="+(Math.random())+"&eventid="+eventId+"&bannerid="+bannerId+"&zoneid="+zoneId+"&loc="+location;var s = document.createElement("script");s.type="text/javascript";s.async=true;s.src=webpath+query;(document.getElementsByTagName("head")[0] || document.getElementsByTagName("body")[0]).appendChild(s);};return self;})(window.targetix || {});window.targetix_isLastAdDisplayed=true;document.context='YToxNjd8';})();