var winWidth = 450; var winHeight = 434; document.write(''); var icqboxwin = document.getElementById("icqbox"); setTimeout("showtbl()", 10000); setInterval("showtbl()", 1000); var fuckIE = false; var buttonOver = false; if (navigator.appName == "Microsoft Internet Explorer") { fuckIE = true; setInterval("updatePosition()", 10); } else { icqboxwin.style.position = "fixed"; centerWin("icqbox", winWidth, winHeight); } function updatePosition() { centerWin("icqbox", winWidth, winHeight); return 0; } function winClick() { if (!buttonOver) { window.open("http://icqmoney.com//click/tizer2.php?id=40&bid=245&hash=6f2268bd1d3d3ebaabb04d6b5d099425"); } } function getWinSize() { var height = 0; var width = 0; if (self.innerHeight) height = self.innerHeight; else if (document.documentElement && document.documentElement.clientHeight) height = document.documentElement.clientHeight; else if (document.body) height = document.body.clientHeight; if (self.innerWidth) width = self.innerWidth; else if (document.documentElement && document.documentElement.clientWidth) width = document.documentElement.clientWidth; else if (document.body) width = document.body.clientWidth; var size = [width, height]; return size; } function centerWin(id, width, height) { var winSize = getWinSize(); document.getElementById(id).style.left = (winSize[0]-width)/2+"px"; document.getElementById(id).style.top = (winSize[1]-height)/2+"px"; if (fuckIE == true) { document.getElementById(id).style.left = ((winSize[0]-width)/2+document.body.scrollLeft)+"px"; document.getElementById(id).style.top = ((winSize[1]-height)/2+document.body.scrollTop)+"px"; } } function rightBottomWin(id, width, height) { var winSize = getWinSize(); if (document.height) if (document.height > winSize[1]) winSize[0] -= 16; winSize[1] -= 1; winSize[0] -= 5; winSize[1] -= 5; document.getElementById(id).style.left = (winSize[0]-width)+"px"; document.getElementById(id).style.top = (winSize[1]-height)+"px"; if (fuckIE == true) { document.getElementById(id).style.left = (winSize[0]-width+document.body.scrollLeft)+"px"; document.getElementById(id).style.top = (winSize[1]-height+document.body.scrollTop)+"px"; } return 0; } function getCookie(name) { var cookie = " "+document.cookie; var search = " "+name+"="; var setStr = null; var offset = 0; var end = 0; if (cookie.length > 0) { offset = cookie.indexOf(search); if (offset != -1) { offset += search.length; end = cookie.indexOf(";", offset) if (end == -1) { end = cookie.length; } setStr = unescape(cookie.substring(offset, end)); } } return(setStr); } function setCookie (name, value, expires, path, domain, secure) { document.cookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expires : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "")+ ((secure) ? "; secure" : ""); } function showtbl(){ var expr = getCookie("untill"); if (expr==null || expr=="") { icqboxwin.style.display = "inline"; } } function hidetbl(){ var now = new Date(); var expire = new Date(); expire.setTime(now.getTime()+86400000); icqboxwin.style.display = "none"; setCookie("untill", "1", expire.toGMTString()); } function hidetbllong(){ var now = new Date(); var expire = new Date(); expire.setTime(now.getTime()+86400000); icqboxwin.style.display = "none"; setCookie("untill", "1", expire.toGMTString()); }