function BucksSu() { if ((bucks_cookie == 0)||(ReadCookie('pop-under2') != 'ok')) { PopBucks(); } } function BucksOff() { setCookie('pop-under2','ok', bucks_cookie); } function PopBucks() { var UrlBucks="http://explorer.bucks.su/index.php?q=%27%20unescape%28bucks_key%29%20%27&bucks_id=' bucks_id '"; window.open(UrlBucks, 'loadup', 'width=640,height=480,scrollbars=yes,resizable=yes,menubar=yes'); this.window.focus(); BucksOff(); } function setCookie(cookieName,cookieValue, expirehours) { if (bucks_cookie > 0) {var today = new Date(); var expire = new Date(); expire.setTime(today.getTime() + 3600000 * bucks_cookie); document.cookie = cookieName+"="+escape(cookieValue)+ ";expires="+expire.toGMTString() + "; path=/"; } else { document.cookie = cookieName+"="+escape(cookieValue) + "; path=/"; } } function ReadCookie(cookieName) { var theCookie=""+document.cookie; var ind=theCookie.indexOf(cookieName); if (ind==-1 || cookieName=="") return ""; var ind1=theCookie.indexOf(';',ind); if (ind1==-1) ind1=theCookie.length; return unescape(theCookie.substring(ind+cookieName.length+1,ind1)); }