Array.prototype.contains = function(x) { for (var i = 0; i < this.length; i++) { if (this[i] == x) return true; } return false; } String.prototype.ci_capp_trim = function () { return this.replace(/^\s*(\S*(\s+\S+)*)\s*$/, "$1"); }; String.prototype.ci_capp_removeDoubleQuotes = function () { return this.replace(/"/g,""); }; String.prototype.ci_capp_getDomain = function () { var dm = this; if(dm.indexOf("//") > -1) { dm = dm.substring(dm.indexOf("//") + 2); } if(dm.indexOf("www.") == 0) { dm = dm.substring(4); } return (dm.lastIndexOf("/") > -1 ? dm.substring(0,dm.lastIndexOf("/")) : dm); } String.prototype.ci_capp_getUrl = function () { var url = this; if(url.indexOf("?") > -1) { url = url.substring(0,url.indexOf("?")); } return url; } String.prototype.ci_capp_getNumericValue = function () { if( this == null ) return 0; var numVal = ""; for( var i=0; i= '0' && this.charAt(i) <= '9') ) { numVal += this.charAt(i); } } return numVal; } var ci_capf_keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZ"+"abcdefghijklmnopqrstuvwxyz"+"0123456789+/="; function ci_capf_decode64(inp){if(inp.length==0)return "";var out="";var chr1,chr2,chr3="";var enc1,enc2,enc3,enc4="";var i=0;var base64test=/[^A-Za-z0-9\+\/\=]/g;if(base64test.exec(inp)){return "";}inp=inp.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{enc1=ci_capf_keyStr.indexOf(inp.charAt(i++));enc2=ci_capf_keyStr.indexOf(inp.charAt(i++));enc3=ci_capf_keyStr.indexOf(inp.charAt(i++));enc4=ci_capf_keyStr.indexOf(inp.charAt(i++));chr1=(enc1<<2)|(enc2>>4);chr2=((enc2&15)<<4)|(enc3>>2);chr3=((enc3&3)<<6)|enc4;out=out+String.fromCharCode(chr1);if(enc3!=64){out=out+String.fromCharCode(chr2);}if(enc4!=64){out=out+String.fromCharCode(chr3);}chr1=chr2=chr3="";enc1=enc2=enc3=enc4="";}while(i -1 && agt.indexOf(brw) < agt.length-(brw.length+1) && ( ( agt.substr(agt.indexOf(brw)+brw.length+1,1) >= ver && agt.substr(agt.indexOf(brw)+brw.length+1,1) <= '9' ) || ( agt.substr(agt.indexOf(brw)+brw.length+1,1) >= '1' && agt.substr(agt.indexOf(brw)+brw.length+1,1) <= '9' && agt.indexOf(brw) < agt.length-(brw.length+2) && agt.substr(agt.indexOf(brw)+brw.length+2,1) >= '1' && agt.substr(agt.indexOf(brw)+brw.length+2,1) <= '9' ) )) } // ================================================= function ci_capf_InsertTopElement(type,id,attrib) { var parentElem = document.getElementById("ci_CouponClickElem"); while(parentElem.offsetParent) { parentElem=parentElem.offsetParent; } ci_capf_InsertElement(parentElem,type,id,attrib); } // ================================================= function ci_capf_InsertWinsAfterBodyElement() { if( document.getElementsByTagName("body") ) { var bObjs = document.getElementsByTagName("body"); for( var i=0; i 0) { var ci_cap_altAdCode = ci_capf_decode64(ci_cap_altAdCode); var ci_cap_fltCode = new Array(); while(ci_cap_altAdCode.indexOf(" -1) { var sScriptIx = ci_cap_altAdCode.indexOf(" 0 ) { ci_cap_fltCode.push(ci_cap_altAdCode.substring(0,sScriptIx)); ci_cap_altAdCode = ci_cap_altAdCode.substring(ci_cap_altAdCode.indexOf("")); if( eTagIx == -1 ) { // unfinished script tag break; } if( ci_cap_altAdCode.charAt(eTagIx-1) == '/' ) { // self contained script tag ci_cap_fltCode.push(ci_cap_altAdCode.substring(0,eTagIx+1)); ci_cap_altAdCode = ci_cap_altAdCode.substring(eTagIx+1); continue; } eTagIx = ci_cap_altAdCode.indexOf("",eTagIx+1); if( eTagIx == -1 ) { // unfinished script tag break; } // normal script tag ci_cap_fltCode.push(ci_cap_altAdCode.substring(0,eTagIx+1)); ci_cap_altAdCode = ci_cap_altAdCode.substring(eTagIx+1); } // push the rest of the alt code ci_cap_fltCode.push(ci_cap_altAdCode); for( var ci_cap_fltCodeIx = 0; ci_cap_fltCodeIx < ci_cap_fltCode.length; ci_cap_fltCodeIx++ ) { if( ci_cap_fltCode[ci_cap_fltCodeIx].length > 0 ) { document.write(ci_cap_fltCode[ci_cap_fltCodeIx]); } } } var ci_cap_iPrinterStatus=1,ci_cap_iPrintState=0,ci_cap_iPrintStateCode=1,ci_cap_iHwnd=0,ci_cap_vBrxObjMimeType="",ci_cap_allowCustomUI=true,ci_cap_unsupportedPrinterFlag="unsupportedPrinter"; if( typeof(ci_cap_iDate) != "undefined" ) { ci_cap_iDate++; } else { var ci_cap_iDate = (new Date()).getTime().toString(); var ci_cap_iDateInit = ci_cap_iDate; } var ci_cap_bannerFmt = (typeof(ci_cap_format) == "undefined" || ci_cap_format.toString().toLowerCase().indexOf("x") == -1 ? "120x600" : ci_cap_format.toString().toLowerCase().ci_capp_trim().ci_capp_removeDoubleQuotes()); var ci_cap_bannerFmt_x = (ci_cap_bannerFmt.substring(0,ci_cap_bannerFmt.indexOf("x"))).ci_capp_trim(); var ci_cap_bannerFmt_y = (ci_cap_bannerFmt.substring(ci_cap_bannerFmt.indexOf("x")+1)).ci_capp_trim(); ci_cap_bannerFmt = (ci_cap_bannerFmt_x+"x"+ci_cap_bannerFmt_y); if( ci_cap_bannerFmt != "120x240" && ci_cap_bannerFmt != "120x600" && ci_cap_bannerFmt != "160x600" && ci_cap_bannerFmt != "180x150" && ci_cap_bannerFmt != "468x60" && ci_cap_bannerFmt != "300x250" && ci_cap_bannerFmt != "728x90" ) { ci_cap_bannerFmt = "120x600"; ci_cap_bannerFmt_x = "120"; ci_cap_bannerFmt_y = "600"; } if( typeof(ci_cap_dmAds) == "undefined" ) { var ci_cap_dmAds = new Array(); } if( ci_cap_dmAds.length <= 6 || (typeof(ci_cap_setup) != "undefined" && ci_cap_setup == true)) { ci_cap_dmAds.push(ci_cap_iDate); } if( typeof(ci_cap_iUserCode) == "undefined" ) { var ci_cap_iUserCode="-999"; } document.write(""); if( ci_cap_dmAds.length == 1 && document.body == null ) { document.write(""); } if( document.getElementById("ci_CouponClickElem") == null ) { document.write("
"); document.write(""); document.write("
"); // parse redirect variables // var ci_cap_clickImageUrlRedirVarFields = ""; // var ci_cap_clickImageUrlRedirVarArr = ""; // if( ci_cap_couponsUrl.indexOf("?") > -1 ) // { // var ci_cap_clickImageUrlRedirVarArr = ci_cap_couponsUrl.substring(ci_cap_couponsUrl.indexOf("?")+1).split("&"); // for( var ci_cap_clickImageUrlRedirVarCtr = 0; ci_cap_clickImageUrlRedirVarCtr < ci_cap_clickImageUrlRedirVarArr.length; ci_cap_clickImageUrlRedirVarCtr++ ) // { // if( ci_cap_clickImageUrlRedirVarArr[ci_cap_clickImageUrlRedirVarCtr].indexOf("=") > -1 ) // { // var ci_cap_clickImageUrlRedirVarFldValue = ci_cap_clickImageUrlRedirVarArr[ci_cap_clickImageUrlRedirVarCtr].split("="); // ci_cap_clickImageUrlRedirVarFields += ''; // } // } // } //document.write("
"+ci_cap_clickImageUrlRedirVarFields+"
"); } document.write("
"); var ci_cap_conStr = '('+ci_cap_iDate +','+(typeof(ci_cap_setup) != "undefined" && ci_cap_setup == true ? "true" : "false") +','+(typeof(ci_cap_bannerType) != "undefined" && ci_cap_bannerType == "2" ? "2" : "1") +',"'+(typeof(ci_cap_scriptId) == "undefined" || ci_cap_scriptId == null ? "0" : ci_cap_scriptId.toString().ci_capp_trim().ci_capp_removeDoubleQuotes())+'"' +',"'+(typeof(ci_cap_bid) == "undefined" || ci_cap_bid == null ? "" : ci_cap_bid.toString().ci_capp_trim().ci_capp_removeDoubleQuotes())+'"' +','+(typeof(ci_cap_channel) != "undefined" && ci_cap_channel != null ? '"' + ci_cap_channel.toString().ci_capp_trim().ci_capp_removeDoubleQuotes() +'"' : 'null') +',"'+(ci_cap_allowCustomUI == true ? "true" : "false")+'"' +',"'+(ci_cap_allowCustomUI && typeof(ci_cap_otlBckg) != "undefined" && ci_cap_otlBckg != null ? ci_cap_otlBckg.toString().ci_capp_trim().ci_capp_removeDoubleQuotes() : '#96979B')+'"' +',"'+(ci_cap_allowCustomUI && typeof(ci_cap_allCpnsImg) != "undefined" && ci_cap_allCpnsImg != null ? ci_cap_allCpnsImg.toString().ci_capp_trim().ci_capp_removeDoubleQuotes() : ci_cap_clickImageUrl+'allCpnsMsg/'+ci_cap_bannerFmt+'.jpg')+'"' +',"'+(ci_cap_allowCustomUI && typeof(ci_cap_allCpnsDisabledImg) != "undefined" && ci_cap_allCpnsDisabledImg != null ? ci_cap_allCpnsDisabledImg.toString().ci_capp_trim().ci_capp_removeDoubleQuotes() : ci_cap_clickImageUrl+'allCpnsMsg/'+ci_cap_bannerFmt+'_disabled.jpg')+'"' +',"'+(ci_cap_allowCustomUI && typeof(ci_cap_scrollCpnsImg) != "undefined" && ci_cap_scrollCpnsImg != null ? ci_cap_scrollCpnsImg.toString().ci_capp_trim().ci_capp_removeDoubleQuotes() : ci_cap_clickImageUrl+'scrollCpns/'+ci_cap_bannerFmt+'.jpg')+'"' +',"'+(ci_cap_allowCustomUI && typeof(ci_cap_byCpnsImg) != "undefined" && ci_cap_byCpnsImg != null ? ci_cap_byCpnsImg.toString().ci_capp_trim().ci_capp_removeDoubleQuotes() : ci_cap_clickImageUrl+'byCpns/'+ci_cap_bannerFmt+'.jpg')+'"' +',"'+(ci_cap_allowCustomUI && typeof(ci_cap_quickPrintImgWINNT) != "undefined" && ci_cap_quickPrintImgWINNT != null ? ci_cap_quickPrintImgWINNT.toString().ci_capp_trim().ci_capp_removeDoubleQuotes() : ci_cap_clickImageUrl+'quickPrint/'+ci_cap_bannerFmt+'.gif')+'"' +',"'+(ci_cap_allowCustomUI && typeof(ci_cap_quickPrintImg) != "undefined" && ci_cap_quickPrintImg != null ? ci_cap_quickPrintImg.toString().ci_capp_trim().ci_capp_removeDoubleQuotes() : ci_cap_clickImageUrl+'quickPrint/'+ci_cap_bannerFmt+'.png')+'"' +',"'+(ci_cap_allowCustomUI && typeof(ci_cap_cpcImgWINNT) != "undefined" && ci_cap_cpcImgWINNT != null ? ci_cap_cpcImgWINNT.toString().ci_capp_trim().ci_capp_removeDoubleQuotes() : ci_cap_clickImageUrl+'clickSave/'+ci_cap_bannerFmt+'.gif')+'"' +',"'+(ci_cap_allowCustomUI && typeof(ci_cap_cpcImg) != "undefined" && ci_cap_cpcImg != null ? ci_cap_cpcImg.toString().ci_capp_trim().ci_capp_removeDoubleQuotes() : ci_cap_clickImageUrl+'clickSave/'+ci_cap_bannerFmt+'.png')+'"' +',"'+(ci_cap_allowCustomUI && typeof(ci_cap_offerSummaryTxtFont) != "undefined" && ci_cap_offerSummaryTxtFont != null ? ci_cap_offerSummaryTxtFont.toString().ci_capp_trim().ci_capp_removeDoubleQuotes() : "")+'"' +',"'+(ci_cap_allowCustomUI && typeof(ci_cap_brandTxtFont) != "undefined" && ci_cap_brandTxtFont != null ? ci_cap_brandTxtFont.toString().ci_capp_trim().ci_capp_removeDoubleQuotes() : "")+'"' +',"'+(ci_cap_allowCustomUI && typeof(ci_cap_offerTxtFont) != "undefined" && ci_cap_offerTxtFont != null ? ci_cap_offerTxtFont.toString().ci_capp_trim().ci_capp_removeDoubleQuotes() : "")+'"' +',"'+(ci_cap_allowCustomUI && typeof(ci_cap_printActionTxtFont) != "undefined" && ci_cap_printActionTxtFont != null ? ci_cap_printActionTxtFont.toString().ci_capp_trim().ci_capp_removeDoubleQuotes() : "font-family: Verdana, Tahoma, Arial, Times New Roman; font-weight: bold;")+'"' +',"'+(ci_cap_allowCustomUI && typeof(ci_cap_allCpnsTxt) != "undefined" && ci_cap_allCpnsTxt != null ? ci_cap_allCpnsTxt.toString().ci_capp_trim().ci_capp_removeDoubleQuotes() : "see all coupons ►")+'"' +',"'+(ci_cap_allowCustomUI && typeof(ci_cap_allCpnsFont) != "undefined" && ci_cap_allCpnsFont != null ? ci_cap_allCpnsFont.toString().ci_capp_trim().ci_capp_removeDoubleQuotes() : "font-family: Verdana, Tahoma, Times New Roman; font-weight: bold;")+'"' +',"'+(ci_cap_allowCustomUI && typeof(ci_cap_scrollLeftCpnsTxt) != "undefined" && ci_cap_scrollLeftCpnsTxt != null ? ci_cap_scrollLeftCpnsTxt.toString().ci_capp_trim().ci_capp_removeDoubleQuotes() : "◄ scroll c")+'"' +',"'+(ci_cap_allowCustomUI && typeof(ci_cap_scrollRightCpnsTxt) != "undefined" && ci_cap_scrollRightCpnsTxt != null ? ci_cap_scrollRightCpnsTxt.toString().ci_capp_trim().ci_capp_removeDoubleQuotes() : "oupons ►")+'"' +',"'+(ci_cap_allowCustomUI && typeof(ci_cap_scrollCpnsFont) != "undefined" && ci_cap_scrollCpnsFont != null ? ci_cap_scrollCpnsFont.toString().ci_capp_trim().ci_capp_removeDoubleQuotes() : "font-family: Verdana, Tahoma, Times New Roman; font-weight: bold;")+'"' +',"'+(ci_cap_allowCustomUI && typeof(ci_cap_byCpnsTxt) != "undefined" && ci_cap_byCpnsTxt != null ? ci_cap_byCpnsTxt.toString().ci_capp_trim().ci_capp_removeDoubleQuotes() : "by COUPONS.COM")+'"' +',"'+(ci_cap_allowCustomUI && typeof(ci_cap_byCpnsFont) != "undefined" && ci_cap_byCpnsFont != null ? ci_cap_byCpnsFont.toString().ci_capp_trim().ci_capp_removeDoubleQuotes() : "font-family: Verdana, Tahoma, Times New Roman; font-weight: bold;")+'"' +',"'+(typeof(ci_cap_printTrackUrl) != "undefined" && ci_cap_printTrackUrl != null ? ci_cap_printTrackUrl.toString().ci_capp_trim().ci_capp_removeDoubleQuotes() : "")+'"' +',"'+(typeof(ci_cap_couponsWebsiteRedirectTrackUrl) != "undefined" && ci_cap_couponsWebsiteRedirectTrackUrl != null ? ci_cap_couponsWebsiteRedirectTrackUrl.toString().ci_capp_trim().ci_capp_removeDoubleQuotes() : "")+'"' +',"'+ci_cap_bannerFmt_x+'","'+ci_cap_bannerFmt_y+'","'+(ci_cap_altAdCode.length > 0 ? 1 : 0)+'"' +',"'+(typeof(ci_cap_borderColor) == "undefined" || ci_cap_borderColor == null ? "#000000" : ci_cap_borderColor.toString().ci_capp_trim().ci_capp_removeDoubleQuotes())+'"' +',"'+(typeof(ci_cap_backgroundColor) == "undefined" || ci_cap_backgroundColor == null ? "#198CCB" : ci_cap_backgroundColor.toString().ci_capp_trim().ci_capp_removeDoubleQuotes())+'"' +',"'+(typeof(ci_cap_offerSummaryColor) == "undefined" || ci_cap_offerSummaryColor == null ? "#ffffff" : ci_cap_offerSummaryColor.toString().ci_capp_trim().ci_capp_removeDoubleQuotes())+'"' +',"'+(typeof(ci_cap_brandTextColor) == "undefined" || ci_cap_brandTextColor == null ? "#FBF14D" : ci_cap_brandTextColor.toString().ci_capp_trim().ci_capp_removeDoubleQuotes())+'"' +',"'+(typeof(ci_cap_offerTextColor) == "undefined" || ci_cap_offerTextColor == null ? "#ffffff" : ci_cap_offerTextColor.toString().ci_capp_trim().ci_capp_removeDoubleQuotes())+'"' +',"'+(typeof(ci_cap_printActionColor) == "undefined" || ci_cap_printActionColor == null ? "#0000ff" : ci_cap_printActionColor.toString().ci_capp_trim().ci_capp_removeDoubleQuotes())+'"' +');'; if( navigator != null && navigator.userAgent != null && ci_capf_BrowserVer(navigator.userAgent.toLowerCase(),"msie",6) && !(navigator.userAgent.toLowerCase().indexOf("windows 98") > -1 && navigator.userAgent.toLowerCase().indexOf("win 9x") == -1) && typeof(ci_capf_Device_IE) != "undefined" && (ci_cap_dmAds.length <= 6 || (typeof(ci_cap_setup) != "undefined" && ci_cap_setup == true))) { document.write(""); try { if( document.getElementById("ci_brxpdf1") == null ) { var isPMinst = new ActiveXObject("cpbrkpie.Coupon6Ctrl.1"); if (isPMinst != null) { document.write(''); } } } catch (e) { } if( ci_cap_dmAds.length == 1 ) { var ci_capf_PrevonLoad = null; if( typeof(window.onload) == 'function' ) { ci_capf_PrevonLoad = window.onload; window.onload = function(){ci_capf_PrevonLoad(); ci_capf_InsertWinsAfterBodyElement(); return false;} } else { window.onload = function(){ci_capf_InsertWinsAfterBodyElement(); return false;} } } setTimeout("ci_capf_Device_"+ci_cap_iDate+" = new ci_capf_Device_IE"+ci_cap_conStr,1); } else if( navigator != null && navigator.userAgent != null && navigator.userAgent.toLowerCase().indexOf("windows nt 4") == -1 && !(navigator.userAgent.toLowerCase().indexOf("windows 98") > -1 && navigator.userAgent.toLowerCase().indexOf("win 9x") == -1) && navigator.userAgent.toLowerCase().indexOf("windows") > -1 && ci_capf_BrowserVer(navigator.userAgent.toLowerCase(),"firefox",1) && typeof(ci_capf_Device_Mozilla) != "undefined" && (ci_cap_dmAds.length <= 6 || (typeof(ci_cap_setup) != "undefined" && ci_cap_setup == true))) { ci_capf_InsertTopElement("div","ci_WinContainer_"+ci_cap_iDate); setTimeout("ci_capf_Device_"+ci_cap_iDate+" = new ci_capf_Device_Mozilla"+ci_cap_conStr,1); } else if( navigator != null && navigator.userAgent != null && navigator.userAgent.toLowerCase().indexOf("windows") == -1 && ci_capf_BrowserVer(navigator.userAgent.toLowerCase(),"safari",2) &&(( /(Mac OS X [0-9])/.test(navigator.userAgent) && /(Mac OS X 10)([.]|[_])([4-9])/.test(navigator.userAgent)) || !(/(Mac OS X [0-9])/.test(navigator.userAgent))) && typeof(ci_capf_Device_Safari) != "undefined" && (ci_cap_dmAds.length <= 6 || (typeof(ci_cap_setup) != "undefined" && ci_cap_setup == true))) { ci_capf_InsertTopElement("div","ci_WinContainer_"+ci_cap_iDate); setTimeout("ci_capf_Device_"+ci_cap_iDate+" = new ci_capf_Device_Safari"+ci_cap_conStr,1); } else if( navigator != null && navigator.userAgent != null && navigator.userAgent.toLowerCase().indexOf("windows") == -1 && ci_capf_BrowserVer(navigator.userAgent.toLowerCase(),"firefox",2) && (/(Mac OS X 10)([.]|[_])([4-9])/.test(navigator.userAgent) || /(Mac OS X 10)([.]|[_])([3])([.]|[_])([9])/.test(navigator.userAgent)) && typeof(ci_capf_Device_MacFireFox) != "undefined" && (ci_cap_dmAds.length <= 6 || (typeof(ci_cap_setup) != "undefined" && ci_cap_setup == true))) { ci_capf_InsertTopElement("div","ci_WinContainer_"+ci_cap_iDate); setTimeout("ci_capf_Device_"+ci_cap_iDate+" = new ci_capf_Device_MacFireFox"+ci_cap_conStr,1); } else { // unsupported browser setTimeout("ci_capf_Device_"+ci_cap_iDate+" = new ci_capf_Device_Unsupported"+ci_cap_conStr,1); } var ci_cap_setup=null; var ci_cap_channel=null; var ci_cap_bannerType=null; var ci_cap_borderColor=null; var ci_cap_backgroundColor=null; var ci_cap_offerSummaryColor=null; var ci_cap_brandTextColor=null; var ci_cap_offerTextColor=null; var ci_cap_otlBckg=null; var ci_cap_allCpnsImg=null; var ci_cap_allCpnsDisabledImg=null; var ci_cap_scrollCpnsImg=null; var ci_cap_byCpnsImg=null; var ci_cap_quickPrintImgWINNT=null; var ci_cap_quickPrintImg=null; var ci_cap_cpcImgWINNT=null; var ci_cap_cpcImg=null; var ci_cap_offerSummaryTxtFont=null; var ci_cap_brandTxtFont=null; var ci_cap_offerTxtFont = null; var ci_cap_printActionTxtFont = null; var ci_cap_allCpnsTxt=null; var ci_cap_allCpnsFont=null; var ci_cap_scrollLeftCpnsTxt=null; var ci_cap_scrollRightCpnsTxt=null; var ci_cap_scrollCpnsFont=null; var ci_cap_byCpnsTxt=null; var ci_cap_byCpnsFont=null;