/* NOTE: This file uses functions defined in 'qs.js'. If you include this file in your HTML, then you need to include 'qs.js' as well. */ // ================================================== // Snippet from url.js for Secure Offer switch // Added 11/12/2007 - ang var window_url = window.location; var url_str = new String(window_url); if(url_str.indexOf("https://") === 0) { // Secure URL's var tx_url = "https://secure.adprofile.net/tx/r"; var cb_url = "https://secure.adprofile.net"; var imp_url = "https://secure.adprofile.net/tx/r"; } else { // Non-secure URL's var tx_url = "http://tx.adprofile.net/tx/r"; var cb_url = "http://cb.adprofile.net"; var imp_url = "http://imp.adprofile.net/imp"; } // ================================================== function exitPop(OID, CRID) { if(!OID || OID == "0") return; if(!getQueryValue("CID") || getQueryValue("CID") == "undefined" ) return; // these CIDs have the exitpop disabled. this functionality should // and eventually will be handled in midas. included here for backward compatibility // CID suppression list commented out 4/30/07 per Bug 843 //var cid = /CID=(18113|3|11007|19378|20004|22225|16999|18168|8129|22163|20522|19991|19772|9291|10168|18070|11151|9200|9244|9397|2381|2547|9476|2661|2671|6394|6238|2039|8226|9813|3250|8118)(\D|$)/; var state = /mail_stateprov=(TX|ID|SD|ND|WV|LA|UT|NV|NM|HI|NC|OH|IL)/; // current known exitpop disabling keys var exitpopkeys = /nopop=|exitpopped=|exitpop=/i; // current url query string var url_qs = window.location.search; // check to see if global var errmsg has been set var error = false; try { error = errmsg.match(/\w/); } catch(e) { error = true; } // Bug 843 - 4/30/07: cid.test taken out if(!exitpopkeys.test(url_qs) && !error) { var qs = replaceQSKeys(); // strip out any existing OID and CMP keys qs = removeKeyValue(qs,'JUMPOID'); //append HSID if it gets passed in //3-1-2006 qs += (CRID == "undefined" || !CRID)? "" : "&CRID="+CRID; var time = calcTime('-5'); //Temporarily commented out line 44-52 to let Ingenio exit pop traffic to come back //Bug#18705 - Changing all exitpops across all CFG offer pages 1/29/2007 if (!state.test(url_qs) && OID == 3673) { if ( (time.getDay() >= 1 && time.getDay() <= 4) && (time.getHours() >= 9 && time.getHours() < 21) ) { OID = 7621; } if ( (time.getDay() == 5 ) && (time.getHours() >= 9 && time.getHours() < 17) ) { OID = 7621; } } if (!state.test(url_qs) && OID == 6482) { if ( (time.getDay() >= 1 && time.getDay() <= 4) && (time.getHours() >= 9 && time.getHours() < 21) ) { OID = 7621; } if ( (time.getDay() == 5 ) && (time.getHours() >= 9 && time.getHours() < 17) ) { OID = 7621; } } if (OID !=7621) { OID =7284; } //Bug#18705 - Changing all exitpops across all CFG offer pages 1/25/2007 //Exit Pop 3587: replace with 7284 (Ingenio) from all offers //Exit Pop 6071: replace with 7284 (Ingenio) //Exit Pop 7297: replace with 7284 (Ingenio) //Replace all existing 7621 (SurePoint) with 7284 (Ingenio) /* if (OID == 3587 || OID == 6071 || OID == 7297 || OID == 7621) { OID = 7284; } */ /* Replace all existing 7621 (SurePoint) with 7284 (Ingenio) And change 7621 Surepoint to only show where 3673 is currently showing 1/25/07 */ /* else if (OID == 3673 || OID == 6482) { OID = 7621; } else { OID = 7284; } */ var exitpop_url = tx_url + "?M=1&OID=" + OID + "&nopop=1&" + qs; var wid = 800; var hei = 600; if (OID == 6071) { var wid = 730; var hei = 450; } else if(OID == 6482) { var wid = 550; var hei = 480; } else if(OID == 7284) { var wid = 750; var hei = 480; } else if(OID == 7621) { var wid = 630; var hei = 480; } else { var wid = 800; var hei = 600; } window.open(exitpop_url, "exitpop", "toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width="+wid+",height="+hei); } } //Consolidate exitpop using distribution set in Midas 02/2007 function exitPopMidas(OID, page) { if(!OID || OID == "0") return; if(!getQueryValue("CID") || getQueryValue("CID") == "undefined" ) return; // these CIDs have the exitpop disabled. this functionality should // and eventually will be handled in midas. included here for backward compatibility // CID suppression list commented out 4/30/07 per Bug 843 //var cid = /CID=(18113|3|11007|19378|20004|22225|16999|18168|8129|22163|20522|19991|19772|9291|10168|18070|11151|9200|9244|9397|2381|2547|9476|2661|2671|6394|6238|2039|8226|9813|3250|8118)(\D|$)/; // current known exitpop disabling keys var exitpopkeys = /nopop=|exitpopped=|exitpop=/i; // exitpop enabling key on Xsell var xsellpopkeys = /error.html/i; var urlPath = window.location; // current url query string var url_qs = window.location.search; // check to see if global var errmsg has been set var error = false; try { error = errmsg.match(/\w/); } catch(e) { error = true; } // Bug 843 - 4/30/07: cid.test taken out if(!exitpopkeys.test(url_qs) && !error) { var qs = replaceQSKeys(); // strip out any existing OID and CMP keys qs = removeKeyValue(qs,'JUMPOID'); var popOID = ''; if (page == "page1") { popOID=7566; } else if (page == "page2") { popOID=7676; } else if (page == "error") { popOID=7921; } if (popOID != "") { var exitpop_url = tx_url + "?M=1&OID=" + popOID + "&rpOID=" + OID + "&nopop=1&" + qs; window.open(exitpop_url, "exitpop", "toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=800,height=500"); } } // error xsell fall back removed 4/30/07 per Bug 496 } function calcTime(offset) { // create Date object for current location d = new Date(); // convert to msec // add local time zone offset // get UTC time in msec utc = d.getTime() + (d.getTimezoneOffset() * 60000); // create new Date object for different city // using supplied offset nd = new Date(utc + (3600000*offset)); // return time as an object return nd; } function popUnder(OID) { if (!OID || OID == "0") return; // current known exitpop disabling keys var exitpopkeys = /nopop=|exitpopped=|exitpop=/i; // current url query string var url_qs = new String(window.location.search); // check to see if global var errmsg has been set var error = errmsg.match(/\w/); var qs = replaceQSKeys(); // strip out any existing OID and CMP keys var popunder_url = tx_url + "?nopop=1&M=0&OID=" + OID + "&" + qs; if ( !exitpopkeys.test(url_qs) ) { var locx = ( screen.availWidth - 720 ) / 2; var locy = 0; //( screen.availHeight - 300 ) / 2; var popunder = window.open("","thisName","toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=800,height=600,left=" + screen.availWidth + ",top=" + screen.availHeight); popunder.blur(); popunder.location=popunder_url; //popunder.moveTo(locx,locy); focus(); } } function faqPop(comp, domain) { if (comp && domain) { var exitpop_url = cb_url + "/global/html/faq.html?comp=" + escape(comp) + "&domain=" + domain; window.open(exitpop_url, "Faq", "toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=600"); } } function termsPop(comp, domain) { if (comp && domain) { var exitpop_url = cb_url + "/global/html/term-services.html?comp=" + escape(comp) + "&domain=" + domain; window.open(exitpop_url, "TermsandServices", "toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=600"); } } function privacyPop(comp, listID, domain) { if (comp && listID) { var exitpop_url = cb_url + "/global/html/privacy.html?comp=" + escape(comp) + "&listID=" + listID + "&domain=" + domain; window.open(exitpop_url, "privacy", "toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=700,left=0,top=300"); } } function contactUsPop(comp, domain) { if (comp && domain) { var exitpop_url = cb_url + "/global/html/contactus.html?comp=" + escape(comp) + "&domain=" + domain; window.open(exitpop_url, "contactUs", "toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=600,left=0,top=300"); } } function aboutUsPop(comp, domain) { if (comp && domain) { var exitpop_url = cb_url + "/global/html/aboutus.html?comp=" + escape(comp) + "&domain=" + domain; window.open(exitpop_url, "aboutUs", "toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=330,left=0,top=350"); } } function faqPop_es(comp, domain) { if (comp && domain) { var exitpop_url = cb_url + "/global/html/faq_es.html?comp=" + escape(comp) + "&domain=" + domain; window.open(exitpop_url, "Faq", "toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=600"); } } function termsPop_es(comp, domain) { if (comp && domain) { var exitpop_url = cb_url + "/global/html/term-services_es.html?comp=" + escape(comp) + "&domain=" + domain; window.open(exitpop_url, "TermsandServices", "toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=600"); } } function privacyPop_es(comp, listID, domain) { if (comp && listID) { var exitpop_url = cb_url + "/global/html/privacy_es.html?comp=" + escape(comp) + "&listID=" + listID + "&domain=" + domain; window.open(exitpop_url, "privacy", "toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=700,left=0,top=300"); } } function contactUsPop_es(comp, domain) { if (comp && domain) { var exitpop_url = cb_url + "/global/html/contactus_es.html?comp=" + escape(comp) + "&domain=" + domain; window.open(exitpop_url, "contactUs", "toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=600,left=0,top=300"); } } function aboutUsPop_es(comp, domain) { if (comp && domain) { var exitpop_url = cb_url + "/global/html/aboutus_es.html?comp=" + escape(comp) + "&domain=" + domain; window.open(exitpop_url, "aboutUs", "toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=330,left=0,top=350"); } } function licensePop_es(comp, domain) { if (comp && domain) { var exitpop_url = cb_url + "/global/html/license_es.html?comp=" + escape(comp) + "&domain=" + domain; window.open(exitpop_url, "aboutUs", "toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=330,left=0,top=350"); } } function RQCaboutUsPop(comp, domain) { if (comp && domain) { var exitpop_url = cb_url + "/global/html/aboutus1.html?comp=" + escape(comp) + "&domain=" + domain; window.open(exitpop_url, "aboutUs", "toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=330,left=0,top=350"); } } function randomvalue(low, high) { return Math.floor(Math.random() * (1 + high - low) + low); } function licensePop(comp, domain) { if (comp && domain) { var exitpop_url = cb_url + "/global/html/license.html?comp=" + escape(comp) + "&domain=" + domain; window.open(exitpop_url, "LicenseAgreement", "toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=600,top=300,left=0"); } }