function getCookieForPrivacyPolicy(name){var matches = document.cookie.match(new RegExp("(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)"));return matches ? decodeURIComponent(matches[1]) : undefined;}function crossDomainPost(){var xhr = new XMLHttpRequest();xhr.open('GET', 'https://privacypolicy.lider-poiska.ru/text.php?site=' + window.location.hostname, false);xhr.send();if(xhr.status!=200){alert(xhr.status + ': ' + xhr.statusText);}else{if (getCookieForPrivacyPolicy('privacy_policy') !== 'ok') {var privacy_policy_style = document.createElement("style");var style = new XMLHttpRequest();style.open('GET', 'https://privacypolicy.lider-poiska.ru/style.php?1232', false);style.send();privacy_policy_style.innerHTML = style.responseText;document.body.appendChild(privacy_policy_style);var privacy_policy = document.createElement("div");privacy_policy.setAttribute('class', 'cookiesb');privacy_policy.setAttribute('id', 'privacy_policy');privacy_policy.innerHTML = '
' + xhr.responseText + '
';document.body.appendChild(privacy_policy);setTimeout(function () {var privacy_policy_select = document.getElementById('privacy_policy');privacy_policy_select.classList.add("cookies_show");}, 1000);}}}function closePrivacyPolicy() {var privacy_policy_select = document.getElementById('privacy_policy');privacy_policy_select.classList.remove("cookies_show");document.cookie = "privacy_policy=ok; path=/;";return false;};crossDomainPost();