/* FILE ARCHIVED ON 1:52:28 May 9, 2009 AND RETRIEVED FROM THE AN OPENWAYBACK INSTANCE ON 23:33:36 Jul 6, 2024. JAVASCRIPT APPENDED BY OPENWAYBACK, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */ /* * @version ecomfw.js v2.31.1852 04.01.2009 * @author Paul Bronshteyn * @comment Built by a geek loaded on caffeine ... * @copyright (c) Conde Nast Publications DD+S */ if(typeof CNP==="undefined"||!CNP){var CNP={}}CNP.ecom=(function(){var Y="ecom",U=null,q=null,k=true,O=false,L={idx:0},p=[],G=document,x=location,s=x.search,ah=Y+"_test",R="ecommerce_test_site",T="nojoy",S=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i,af=/(^\d{5}$)|(^\d{5}-\d{4}$)/,P=navigator.userAgent.toLowerCase(),e={safari:/webkit/.test(P),opera:!!window.opera,msie:!!(window.attachEvent&&!window.opera),mozilla:/mozilla/.test(P)&&!/(compatible|webkit)/.test(P)},D=((e.mozilla||e.safari)?"offset":"scroll")+"Height",E=function(aj,ai){if(!aj){return}ai=ai||Y;var ak=window.open(aj,ai);if(ak){ak.focus()}},aa=function(ai){var ak=z("div"),aj=z("iframe");ak.id=Y+"usc";W(ak.style,{width:G.body.scrollWidth+"px",height:G.body.scrollHeight+"px",filter:"alpha(opacity = 80)",opacity:0.8,zIndex:110000000,position:"absolute",left:"0px",top:"0px",background:"#000000"});G.body.appendChild(ak);G.body.style.overflow="hidden";X(true);W(aj,{id:Y+"usf",src:h(ai,"iframe","true"),width:749,height:601,scrolling:"no"});W(aj.style,{background:"#ffffff",border:"0px",position:"absolute",zIndex:120000000,left:(parseInt(ak.style.width)/2-aj.width/2)+"px",top:(G.documentElement.scrollTop||G.body.scrollTop)+50+"px"});G.body.appendChild(aj);return true},z=function(aj,ai){return(ai||G).createElement(aj)},d=function(aj,ai){return(ai||G).getElementById(aj)},l=function(ai,aj){return(aj||G).getElementsByTagName(ai)||[]},X=function(al){var ak=l("select"),aj=0,ai=ak.length;for(;ajPlease try again.";ay.style.display="block"},5000)}return false})},r=function(am){var al=l("input",L[am].p),ai=h(s,"as"),ak=0,aj=al.length,an;for(;ak>16,(al&65280)>>8,al&255)}if(am.charCodeAt(ak-2)===61){return(ai.substring(0,ai.length-2))}else{if(am.charCodeAt(ak-1)===61){return(ai.substring(0,ai.length-1))}else{return(ai)}}}},ab=function(){var aj=z("div"),ai=z("a");aj.id=ah;aj.innerHTML="!!! ATTENTION !!! YOU ARE USING ECOM PREVIEW SERVER !!! ATTENTION !!!
";W(aj.style,{zIndex:10000000,backgroundColor:"#FFD700",color:"#800000",padding:"4px",fontWeight:"bold",textAlign:"center",border:"1px solid #333333",marginBottom:"10px",position:"fixed",width:"100%"});ai.innerHTML="[ return to normal mode ]";ai.href="#";aj.appendChild(ai);G.body.insertBefore(aj,G.body.firstChild);j("click",ai,function(){N.set(ah,"");G.body.removeChild(aj);x.search=h(s,R,"");return false})},ae={pingPath:"status.jsp",offerPath:"targetedOffer.jsp",subPath:"embeddedForm.jsp",upsellPath:"ccUpsell.jsp",showPath:"showOffer.jsp",domain:w(),host:f(),path:"/ecom/",user:M(),section:C(),timeout:10,https:false,callback:null,params:{},enc:"xml",cdn:false},t=l("head")[0];return{start:function(ai){if(h(s,T)==="1"){return k=O=false}var ak;for(ak in ae){ae[ak]=h(s,Y+ak)||(ai||{})[ak]||ae[ak]}if(ae.cdn===false){var aj=h(s,R)||N.get(ah)||"";if(a(aj)){N.set(ah,"",{expires:-1})}else{if(!N.get(ah)){N.set(ah,aj,{})}j("load",self,ab);ae.host=aj}}else{N.set(ah,"",{expires:-1})}document.domain=ae.domain;ae.host=y()+ae.host.replace(/^https*:\/\/|\/+$/g,"")+ae.path;Z();if(h(s,"ecomupsell")==="true"){j("load",self,function(){aa(ae.host+ae.upsellPath)})}},mbox:function(aj,ai){if(typeof aj.getUID==="function"){v(aj.getUID(),ae.showPath,{placementId:ai},"mbox")}},closeiframe:function(){G.body.style.overflow="auto";d(Y+"usf").style.display="none";d(Y+"usc").style.display="none";X(false);setTimeout(function(){G.body.removeChild(d(Y+"usf"));G.body.removeChild(d(Y+"usc"))},2000)},request:function(aj){if(!k&&!O){return}aj=aj||{};aj.doc=(aj.fid)?aj.fid.document:G;aj.p=d(aj.pid,aj.doc);if(!aj.p){return}aj.enc=aj.enc||ae.enc;var ai=++L.idx;L[ai]=aj;if(!O){return p.push(ai)}ag(ai)},response:function(at,ak){if(typeof L[at]==="undefined"||a(ak)){return}L[at].code=ak;var ao=b(A.d(ak)),au=null;if(a(ao)){return}if(L[at].enc==="xml"){if(typeof DOMParser==="function"||typeof DOMParser==="object"){au=(new DOMParser()).parseFromString(ao,"text/xml");if(au.documentElement.tagName==="parsererror"){return}}else{au=new ActiveXObject("Microsoft.XMLDOM");au.async="false";au.loadXML(ao);if(au.parseError.errorCode!==0){return}}if(!au){return}if(l("targetedOffer",au)[0]){var an=b(o(l("content",au)[0])),aj=b((an.match(/]*>([\s\S]*?)<\/script>/i)||[null,null])[1]);if(a(an)){return}L[at].p.innerHTML=an.replace(//g,"");switch(o(l("placementType",au)[0])){case"Banner":case"Link":if(!aj){break}var aq=z("script");aq.type="text/javascript";aq.id=Y+"js"+at;if(e.msie){aq.text=aj}else{aq.appendChild(G.createTextNode(aj))}t.insertBefore(aq,t.firstChild);t.removeChild(aq);break;case"embeddedForm":B(at);break;case"autoSub":r(at);break;case"testPlacement":case"testPlacement_Banner":case"testPlacement_Link":u(at,aj);break;case"testPlacement_autoSub":u(at,aj);r(at);break;case"testPlacement_embeddedForm":u(at,aj);B(at);break}if(L[at].callafter){V(L[at].callafter,L[at].fid)}}else{if(l("response",au)[0]){clearTimeout(L[at].frmto);var am=d("frm_error_"+at,L[at].doc);if(l("errors",au)[0]){var ai="",ar=l("error",au),ap=0,al=ar.length;for(;ap"}am.innerHTML=ai;am.style.display="block"}else{am.style.display="none";am.innerHTML="";if(l("ccUpsellPage",au)[0]){aa(o(l("ccUpsellPage",au)[0]))}l("form",L[at].p)[0].reset()}L[at].btn.disabled="";L[at].btn.value="Submit"}}}else{L[at].p.innerHTML=ak}ad(at);n(at)}}})();