(function(){ var div=document.getElementById("adrek_8531"); var scripts=document.querySelectorAll("script"); var thisScript=scripts[scripts.length-1]; if(!div || div.tagName != 'DIV'){var div=document.createElement("div"); div.id="adrek_8531"; thisScript.parentNode.insertBefore(div, thisScript);} window.addEventListener("DOMContentLoaded", function(){ if((self.parent&&!(self.parent===self))&&(self.parent.frames.length!=0)){var fr='y';}else{var fr='n';} if(document.querySelectorAll("div[id^='adrek_']").length<=10){var t=div.getBoundingClientRect().top+window.pageYOffset; t=t.toFixed(); var h=window.innerHeight; h=h.toFixed(); var html=div.innerHTML; html=html.replace(/\s+/g,''); if(html.length>5){fr=fr+"&html=y";} var script=document.createElement('script'); script.src="https://adrek.ru/view_b.php?ref="+document.referrer+"&id=8531&h="+h+"&t="+t+"&fr="+fr; div.appendChild(script);} });})();