if (!ideal_getCookie('popunder_20')) { ideal_setCookie('popunder_20','1',7200); if (ideal_getCookie('popunder_20')) ideal_attachEvents(); } function ideal_setCookie(c_name,value,expires) { //expires is the amount of seconds until expiry 24x60x60 is 1 day var exdate = new Date(); expires = (expires == 'now') ? 1000 : expires * 1000; exdate.setTime(exdate.getTime() + expires); document.cookie = c_name+"="+escape(value)+((expires==null) ? "" : ";expires="+exdate.toUTCString())+";domain="+window.location.hostname; } function ideal_getCookie(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 false; } var ideal_popupFlag193 = 0; function ideal_createVirtualLink() { if (!ideal_popupFlag193) { ideal_popupFlag193 = true; parent.document.body.innerHTML += "a"; document.getElementById('ideal_anchor193').click(); } } function ideal_attachEvents() { var ideal_IE = document.all?true:false; if(!ideal_IE) parent.document.body.addEventListener('click',ideal_showPopUnder,false); else parent.document.body.attachEvent("onclick",ideal_createVirtualLink); } function ideal_showPopUnder(){ if(!ideal_popupFlag193) { var ideal_newWin193 = parent.window.open('http://watchonlinesimpsons.com/','ideal_newWin193','left=0,top=0,width='+screen.width+',height='+screen.height+',menubar=1,location=1,resizable=1,scrollbars=1,status=1,toolbar=1,titlebar=1'); if (ideal_newWin193) { ideal_newWin193.blur(); parent.window.focus(); ideal_popupFlag193=1; } return true; } }