window.addEventListener('load', function() { var popunderCookie = ''; var cookieName = 'cpm_popped18763z15ee0'; var targetURL = '//lp.amateurcommunity.com/index.php?cp=18763z15ee0'; var days = 1; document.body.addEventListener('click', popunder); function popunder() { if (getCookie(cookieName) == 1) { return; } setCookie(cookieName, 1); var windowHandle = open(targetURL, '', 'height=768,width=1366'); setTimeout(function() { windowHandle.focus(); }, 40); } function setCookie(name, value) { var cookiePath = popunderCookie == 'perpage' ? window.location.pathname : '/'; var exdate = new Date(); exdate.setTime(exdate.getTime() + (1000 * 60 * 60 * 24 * days)); var value = escape(value) + '; expires=' + exdate.toUTCString() + '; path=' + escape(cookiePath) + '; SameSite=None'; document.cookie = name + '=' + value; } function getCookie(name) { var value = document.cookie; var start = value.indexOf(' ' + name + '='); if (start == -1) { start = value.indexOf(name + '='); } if (start == -1) { value = null; } else { start = value.indexOf('=', start) + 1; var end = value.indexOf(';', start); if (end == -1) { end = value.length; } value = unescape(value.substring(start, end)); } return value; } });