var stagedPopFrequency = "600"; var stagedCookieName = "views_clickos123"; var theadurl="http://ad.clickosmedia.com/www/delivery/afr.php?zoneid=855&cb=INSERT_RANDOM_NUMBER_HERE&ct0=INSERT_CLICKURL_HERE"; var isclicked=false; if (!document.currentStage) document.currentStage = 0; document.currentStage++; if (document.currentStage == 1) { function stagedGetCookie(c_name) { if (document.cookie.length>0) { c_start=document.cookie.indexOf(c_name + "="); if (c_start!=-1) { c_start=c_start + c_name.length+1; c_end=document.cookie.indexOf(";",c_start); if (c_end==-1) c_end=document.cookie.length; return unescape(document.cookie.substring(c_start,c_end)); } } return ""; } function stagedSetCookie(c_name, value, expiresec) { var exdate=new Date(); exdate.setTime(exdate.getTime()+(expiresec*1000)); document.cookie=c_name+ "=" +escape(value)+((expiresec==null) ? "" : ";expires="+exdate.toGMTString()); } function stagedResetCookie(Name) { var expireDate = new Date(); expireDate.setDate(expireDate.getDate() - 10); document.cookie = Name+"=;path=/;expires=" + expireDate.toGMTString(); } function stagedPopUnder() { if (stagedGetCookie(stagedCookieName) == '') { var thisStage = 1; var stageFunc = eval('window.popUnderStage'+thisStage); if (stageFunc != undefined) { stageFunc(); stagedSetCookie(stagedCookieName, thisStage + 1, stagedPopFrequency); } } else { var thisStage = parseInt(stagedGetCookie(stagedCookieName)); var stageFunc = eval('window.popUnderStage'+thisStage); if (stageFunc != undefined) { stageFunc(); stagedSetCookie(stagedCookieName, thisStage + 1, stagedPopFrequency); } } } function stagedAttachBody() { if (document.body) { if (document.all) { document.body.attachEvent('onclick', stagedPopUnder); } else { document.body.addEventListener('click', stagedPopUnder, false); } } else { setTimeout('stagedAttachBody()', 200); } } stagedAttachBody(); } var stagedTmpFunc = function() { var pu = window.open(theadurl, stagedCookieName+"_win", "width="+screen.width+", height="+screen.height+", scrollbars=1,resizable=1,menubar=1,location=1"); pu.blur(); window.focus(); isclicked=true; } eval('window.popUnderStage'+document.currentStage+' = stagedTmpFunc;'); stagedTmpFunc = null;