/** This file is generated by a compression script. Please DO NOT edit it directly or your changes may be lost. See General Javascript Guidelines on the techwiki for more information. Compressed by rmunson on Thu Sep 17 12:56:56 EDT 2009 */ /** START * File: ecom/ecomfw.js * Last Updated: Wed Sep 16 14:58:43 2009 */ /* * @version ecomfw.js v2.53.1457 09.16.2009 * @author Paul Bronshteyn * @comment Built by a geek loaded on caffeine ... * @copyright (c) Conde Nast Digital */ if(typeof CNP==="undefined"||!CNP){var CNP={};}CNP.ecom=(function(){var Y="ecom",U=null,s=null,l=true,P=false,M={idx:0},aa="",r=[],H=document,y=location,u=y.search,ai=Y+"_test",S="ecommerce_test_site",T=/^((([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,ag=/(^\d{5}$)|(^\d{5}-\d{4}$)/,Q=navigator.userAgent.toLowerCase(),f={safari:/webkit/.test(Q),opera:/opera/.test(Q),msie:/msie/.test(Q)&&!/opera/.test(Q),mozilla:/mozilla/.test(Q)&&!/(compatible|webkit)/.test(Q)},F=((f.mozilla||f.safari)?"offset":"scroll")+"Height",n={allure:[9,""],architecturaldigest:[9,""],bonappetit:[9,""],cookie:[9,""],details:[5,"condenet"],glamour:[12,"condeglamour"],gq:[5,"condenet"],golfdigest:[9,""],luckymag:[9,""],newyorker:[9,""],portfolio:[12,"condenastportfolio"],self:[12,"condenastgourmet"],style:[5,"condenet"],teenvogue:[12,"condeteenvogue"],traveler:[16,"condenasttraveler"],vanityfair:[12,"condevanityfair"],vogue:[5,"condenet"],wired:[9,"condewiredmag"]},ab=function(aj){var al=A("div"),ak=A("iframe");al.id=Y+"usc";W(al.style,{width:H.body.scrollWidth+"px",height:H.body.scrollHeight+"px",filter:"alpha(opacity = 80)",opacity:".80",zIndex:110000000,position:"absolute",left:"0px",top:"0px",background:"#000000"});H.body.appendChild(al);H.body.style.overflow="hidden";X(true);W(ak,{id:Y+"usf",src:i(aj,"iframe","true"),width:749,height:669,scrolling:"no"});W(ak.style,{background:"#ffffff",border:"0px",position:"absolute",zIndex:120000000,left:(H.body.scrollWidth/2-ak.width/2)+"px",top:(H.documentElement.scrollTop||H.body.scrollTop)+50+"px"});H.body.appendChild(ak);k("load",ak,function(){try{this.height=this.contentDocument.body[F]+"px";}catch(am){}});k("resize",window,function(){var an=d(Y+"usc"),am=d(Y+"usf");an.style.width=H.body.scrollWidth+"px";an.style.height=H.body.scrollHeight+"px";am.style.left=(H.body.scrollWidth/2-am.width/2)+"px";});al=ak=null;},A=function(ak,aj){return(aj||H).createElement(ak);},d=function(ak,aj){return(aj||H).getElementById(ak);},m=function(aj,ak){return(ak||H).getElementsByTagName(aj)||[];},X=function(am){var al=m("select"),ak=0,aj=al.length;for(;akPlease try again.";az.style.display="block";},5000);}return false;});},t=function(am){var al=m("input",M[am].p),ak=0,aj=al.length,an=i(u,"as"),ao;for(;ak>16,(am&65280)>>8,am&255);}if(an.charCodeAt(al-2)===61){return aj.substring(0,aj.length-2);}else{if(an.charCodeAt(al-1)===61){return aj.substring(0,aj.length-1);}else{return aj;}}}},ac=function(){var ak=A("div"),aj=A("a");ak.id=ai;ak.innerHTML="!!! ATTENTION !!! YOU ARE USING ECOM PREVIEW SERVER !!! ATTENTION !!!
";W(ak.style,{zIndex:100000000,backgroundColor:"#FFD700",color:"#800000",padding:"4px",fontWeight:"bold",textAlign:"center",border:"1px solid #333333",marginBottom:"10px",position:"fixed",width:"100%",top:"0px"});aj.innerHTML="[ return to normal mode ]";aj.href="#";ak.appendChild(aj);H.body.appendChild(ak);k("click",aj,function(){O.del(ai);H.body.removeChild((e.srcElement||e.target).parentNode);y.search=i(u,S,"");return false;});ak=aj=null;},af={pingPath:"status.jsp",offerPath:"targetedOffer.jsp",subPath:"embeddedForm.jsp",upsellPath:"ccUpsell.jsp",showPath:"showOffer.jsp",domain:x(),host:g(),path:"/ecom/",user:N(),section:E(),timeout:2,https:false,callback:null,params:{},cdn:false,onload:false,contentEnc:"xml",jsEnc:"true",mboxClient:"",pixelPath:"/images/global/spacer.gif"};return{start:function(aj){if(i(u,"nojoy")==="1"){return l=P=false;}for(var al in af){af[al]=i(u,Y+al)||(aj||{})[al]||af[al];}if(af.cdn===false){var ak=i(u,S)||O.get(ai)||"";if(ak){O.set(ai,ak);k("load",self,ac);af.host=ak;}else{O.del(ai);}}else{O.del(ai);}document.domain=af.domain;af.host=z()+af.host.replace(/^https*:\/\/|\/+$/g,"")+af.path;Z();k("load",self,function(){mboxCreate=function(){return false;};if(i(u,"ecomupsell")==="true"){ab(af.host+af.upsellPath);}if(af.onload){af.onload=false;for(var am;am=r.shift();){ah(am);}}});aa=i(u,"nojoytgt");},mbox:function(ak,aj){if(typeof ak.getUID==="function"){w(ak.getUID(),af.showPath,{placementId:aj},"mbox");}},closeiframe:function(){H.body.style.overflow="visible";d(Y+"usf").style.display="none";d(Y+"usc").style.display="none";X(false);setTimeout(function(){H.body.removeChild(d(Y+"usf"));H.body.removeChild(d(Y+"usc"));},2000);},request:function(aj){if((!l&&!P)||aa.indexOf(aj.pid)!==-1){return;}aj=aj||{};aj.doc=(aj.fid)?aj.fid.document:H;aj.p=d(aj.pid,aj.doc);aj.params=aj.params||{};if(!aj.p){return;}aj.enc=aj.enc||af.contentEnc;M[++M.idx]=aj;if(!P||af.onload){return r.push(M.idx);}ah(M.idx);},response:function(au,al){if(typeof M[au]==="undefined"||a(al)){return;}M[au].code=al;var ap=b((af.jsEnc==="jsesc"?unescape(al):B.d(al))),av=null;if(a(ap)){return;}if(M[au].enc==="xml"){if(typeof DOMParser==="function"||typeof DOMParser==="object"){av=(new DOMParser()).parseFromString(ap,"text/xml");if(av.documentElement.nodeName==="parsererror"){return;}}else{av=new ActiveXObject("Microsoft.XMLDOM");av.async="false";av.loadXML(ap);if(av.parseError.errorCode!==0){return;}}if(!av){return;}if(m("targetedOffer",av)[0]){var ao=b(q(m("content",av)[0])),ak=b((ao.match(/]*>([\s\S]*?)<\/script>/i)||[null,null])[1]);if(a(ao)){return;}M[au].p.innerHTML=ao.replace(//g,"");switch(q(m("placementType",av)[0])){case"Banner":case"Link":if(!ak){break;}var ar=A("script");ar.type="text/javascript";ar.id=Y+"js"+au;if(f.msie){ar.text=ak;}else{ar.appendChild(H.createTextNode(ak));}M[au].p.appendChild(ar);M[au].p.removeChild(ar);ar=null;break;case"embeddedForm":D(au);break;case"autoSub":t(au);break;case"testPlacement":case"testPlacement_Banner":case"testPlacement_Link":v(au,ak);break;case"testPlacement_autoSub":v(au,ak);t(au);break;case"testPlacement_embeddedForm":v(au,ak);D(au);break;}if(M[au].callafter){V(M[au].callafter,M[au].fid);}}else{if(m("response",av)[0]){clearTimeout(M[au].frmto);var an=d("frm_error_"+au,M[au].doc);if(m("errors",av)[0]){var aj="",at=m("error",av),aq=0,am=at.length;for(;aq";}an.innerHTML=aj;an.style.display="block";}else{an.style.display="none";an.innerHTML="";if(m("ccUpsellPage",av)[0]){ab(q(m("ccUpsellPage",av)[0]));}m("form",M[au].p)[0].reset();}M[au].btn.disabled="";M[au].btn.value="Submit";}}}else{M[au].p.innerHTML=al;}ae(au);p(au);}};})(); /** END ecom/ecomfw.js */