// LEGAL NOTICE // PATENT NOTE: This process and page delivery method are covered by Patent Pending USPTO Number 11/465,409 // For additional information about this service contact Steve Crim 251-990-9498 // This code is copyrighted by Steve Crim and James Bond 2009 // Use of this code in any form without authorization will be an encroachment of the copyright // stcrim@screencrafters.com var ads_domains = new String(" casalemedia.com zope.net newspaperproject.org "); var ads_urls = new String(" http://www.b96online.com/ad/click.asp "); String.prototype.getHostname = function() { var re = new RegExp('^(?:f|ht)tp(?:s)?\://([^/]+)', 'im'); return this.match(re)[1].toString(); } String.prototype.getDomain = function(){ var hostname = this.getHostname(); return (m = hostname.match(new RegExp("([a-z,A-Z,0-9,\-]+\.[a-z,A-Z]{2,6})$") )) ? m[1] : false; } var cookie_persistence_days = 1; popNotOpenedYet = true; function siteencore_window() { if (document.cookie.indexOf("popopened3=") != -1) { popNotOpenedYet = false; } if(popNotOpenedYet) { popwinOBJz = window.open('http://www.siteencore.com/cnhi/itemonline/rotate_popup.cgi', 'nameMe61', 'toolbar=1,menubar=1,scrollbars=1,status=1,location=1,resizable=1,top=0,left=0'); popwinOBJz.blur(); popNotOpenedYet = false; var expiry_date = new Date(); expiry_date.setDate(expiry_date.getDate() + cookie_persistence_days); document.cookie = "popopened3=1;expires=" + expiry_date.toGMTString(); } } document.onclick = function() { //non ie such as firefox if (!window.event) { siteencore_window(); } else { if (typeof window.event.srcElement.parentElement.href == 'undefined') { if (typeof window.event.srcElement.href == 'undefined') { //click on non link link = ''; target = ''; } else { //click on a link link = window.event.srcElement.href; target = window.event.srcElement.target; } } else { //click on an image with link link = window.event.srcElement.parentElement.href; target = window.event.srcElement.parentElement.target; } if (link) { newwindow = false; if (target) { target = new String(target).toLowerCase(); if (target == '_blank' || target == '_new') { newwindow = true; } } linkobj = new String(link); domain = linkobj.toLowerCase().getDomain(); if (ads_urls.indexOf(' ' + link + ' ') == -1 && ads_domains.indexOf(' ' + domain + ' ') == -1 && !newwindow) { siteencore_window(); } } else { siteencore_window(); } } } //-->