//resxclsa.js v3.2 Copyright 2004-2010 Certona Corporation www.certona.com
var certonaResx=function(){var an=false,bu=null,a="undefined",df=location.protocol.toLowerCase()=="https:"?"https://":"http://",ck="www.res-x.com",cj="/ws/r2/Resonance.aspx",ct="3.2",f="RES_TRACKINGID",l="RES_SESSIONID",m="ResonanceSegment",c="",k="",j="",au="",ad="",r=false,y=false,aj=false,s=0;function g(de){return parseInt(de,10);}function b(dk){try{if(dk!=null&&dk!="null"&&dk!=""){return true;}}catch(ex){}return false;}function ao(){return resx.rrelem;}function af(cg){try{var bf=null;if(b(cg)){bf=new Array();if(b(document.getElementById(cg))){bf[0]=cg;}else{var cb=cg.replace(/[,;\-:]/g,".").split(".");for(var aa=0;aa<cb.length;aa++){if(b(document.getElementById(cb[aa]))){bf[aa]=cb[aa];}else{bf[aa]="";}}}}return bf;}catch(ex){d("",ex);}return null;}function n(){try{if(typeof(resx.rrelem)!=a){var e=af(ao());if(e!=null){var p=null;for(var aa=0;aa<e.length;aa++){p=document.getElementById(e[aa]);if(b(p)){p.style.visibility="visible";}}}}}catch(ex){}}function d(dd,z){try{if(!an){an=true;bu=escape(dd+"|"+((typeof(z.number)!=a)?z.number:a)+"|"+((typeof(z.name)!=a)?z.name:a)+"|"+((typeof(z.description)!=a)?z.description:a));}}catch(ex){}finally{n();}}function i(ab){try{if(document.cookie.length>0){var w=document.cookie.indexOf(ab+"=");if(w!=-1){w+=ab.length+1;var bm=document.cookie.indexOf(";",w);if(bm==-1){bm=document.cookie.length;}return unescape(document.cookie.substring(w,bm));}}}catch(ex){d("",ex);}return null;}function o(ab,dq,aq,dl,cv){try{var aw=new Date();if(aq!=null){aw.setTime(aw.getTime()+(aq*3600*1000));}document.cookie=ab+"="+escape(dq)+((b(aq))?"; expires="+aw.toGMTString():"")+((b(dl))?"; path="+dl:"; path=/")+((b(cv))?"; domain="+cv:"");}catch(ex){d("",ex);}}function bz(dp,dn){try{if(typeof(dn)!=a&&dn!=null){for(var aa=0;aa<dn.length;aa++){if((dn[aa]+"")==dp){return true;}}}}catch(ex){}return false;}function by(){try{var v=typeof(resx.rrec)!=a&&(resx.rrec==true||resx.rrec=="true")&&i(m)=="1"&&!an;if(v){v=false;if(typeof(resx.rrelem)!=a){var e=af(ao());if(e!=null){for(var aa=0;aa<e.length;aa++){if(b(e[aa])){v=true;break;}}}}if(v){v=false;if(typeof(resx.rrnum)!=a){var dr=resx.rrnum+"";dr=dr.replace(/,/g,";");var co=dr.split(";");for(var aa=0;aa<co.length;aa++){if(!isNaN(co[aa])&&g(co[aa])>0){v=true;break;}}}}}return v;}catch(ex){}return false;}function dj(de){try{var dh="";de+="";for(var aa=de.length-1;aa>=0;aa--){dh+=de.charAt(aa);}return dh;}catch(ex){}return"";}function q(){try{var dm="";if(navigator.userAgent.toLowerCase().indexOf("mac")==-1){dm=Math.floor(Math.random()*1000000000000000);dm+="";}else{var bt=Math.floor(Math.random()*1000000),dg=new Date(),cf=dg.getTime();cf+="";var cn=dj(cf);bt+="";dm=bt+cn.substring(0,11);}return dm;}catch(ex){d("guid",ex);}return"";}function bi(bh,bq,ay,dc,db,di){try{var be="",ae=null,cx="";if(typeof(bh)=="object"){ae=document.getElementsByTagName("a");}else{var bs=document.getElementById(bh);if(b(bs)){ae=bs.getElementsByTagName("a");cx=bh;}}if(typeof(ae)!=a&&ae!=null){var ai=null,bp=null,bo=null,cm=0,bl="",al="",ca="",bk="",cl="",as=null;if(b(bq)){bo=-1;bp=new Array();for(var aa=0;aa<bq.length;aa++){ai=document.getElementById(bq[aa]);if(b(ai)){as=ai.getElementsByTagName("a");for(var dt=0;dt<as.length;dt++){bo++;bp[bo]=as[dt]+"";}}}}for(var aa=0;aa<ae.length;aa++){if(cm==di){break;}bl=ae[aa]+"";if(b(bl)){al=escape(bl);bk="";if(b(ay)){al=al.match(ay)+"";}if(b(al)){bk=al.match(dc)+"";}if(b(bk+"")){if(!bz(bl,bp)){cl=al.match(db)+"";ca=bk+escape("|")+cx+escape("|")+(b(cl)?cl:"")+";";if(be.indexOf(ca)==-1){be+=ca;cm++;}}}}}}return be;}catch(ex){d("gpl",ex);}return"";}function cu(x){try{y=true;if(!aj){var p=null;for(var aa=0;aa<x.Resonance.Response.length;aa++){if(x.Resonance.Response[aa].display=="yes"){p=document.getElementById(x.Resonance.Response[aa].scheme);if(b(p)){p.innerHTML=x.Resonance.Response[aa].output;}}}}}catch(ex){}finally{n();}}function bx(){try{if(typeof(resx.rrcall)!=a&&b(resx.rrcall)){y=true;}if(!y){if(s<2000){s=s+50;window.setTimeout("certonaResx.checkCallback()",50);}else{aj=true;n();}}}catch(ex){n();}}function cs(){try{var ce="",am="certonaResx.showResponse";if(typeof(resx.rrcall)!=a&&b(resx.rrcall)){am=resx.rrcall;}ce="&no="+resx.rrnum+((typeof(resx.exitemid)!=a&&b(resx.exitemid))?"&ex="+resx.exitemid:"")+((typeof(resx.rrqs)!=a)?"&"+resx.rrqs:"")+"&cb="+am;return ce;}catch(ex){}return"";}function bw(){try{var u=location.hostname;if(b(u)){if(!u.match(/(\d{1,3}\.){3}\d{1,3}/)){var cd=u.split(".");if(cd.length>1){u="."+cd[cd.length-2]+"."+cd[cd.length-1];var ds=/\.(co|com)\.\w{2}$/;if(u.toLowerCase().match(ds)&&cd.length>2){u="."+cd[cd.length-3]+u;}}}return u;}}catch(ex){d("gcd",ex);}return null;}function ax(cr){try{var at=location.search,w=at.indexOf("?"+cr+"=");if(w==-1){w=at.indexOf("&"+cr+"=");}if(w>-1){w=w+cr.length+2;var bm=at.indexOf("&",w);if(bm==-1){return at.substring(w);}else{return at.substring(w,bm);}}}catch(ex){}return null;}function bv(ah){try{if(i(m)==ah){return"";}var bj="",ar=0,ag=g(resx.top1),ac=g(resx.top2),ak=g(resx.top3),ch=100000;if(isNaN(ag)){ag=0;}if(isNaN(ac)){ac=ag;}if(isNaN(ak)){ak=ac;}if(ah=="1"){ar=ag-1;}if(ah=="2"){if((ac-ag)>0){ar=ac-1;}}if(ah=="3"){if((ak-ac)>0){ar=ak-1;}}if(ah=="4"){if((ch-ak)>0){ar=ch-1;}}if(ar>0){ar+="";while(ar.length<5){ar="0"+ar;}bj=q();if(b(bj)){bj=bj.substr(0,1)+ar+bj.substr(1,11);}}return bj;}catch(ex){}return"";}function bg(){try{var br="",da="";for(var aa=0;aa<51;aa++){if(eval("typeof(resx.cv"+aa+")")!=a){da=eval("resx.cv"+aa)+"";da=da.replace(/\+/g,"%2B");br+="&cv"+aa+"="+escape(da);}}return br;}catch(ex){d("gcv",ex);}return"";}function bn(){try{var h=bw();if(location.search.indexOf("resxseg=")>0){c=bv(ax("resxseg"));}if(location.search.indexOf("resxtrack=")>0){c=ax("resxtrack");}if(b(c)&&!isNaN(g(c))){o(f,c,87648,null,h);if(!b(i(f))){o(f,c,null,null,h);}o(l,"",-1,null,h);}else{c=i(f);if(!b(c)){c=q();o(f,c,87648,null,h);if(!b(i(f))){o(f,c,null,null,h);}}}k=i(l);if(!b(k)){k=q();}o(l,k,.5,null,h);if(!b(i(l))){o(l,k,null,null,h);}c=i(f);var t=g(c);if(!isNaN(t)&&t>0){t+="";t=t.substring(1,6);t=g(t);var ag=g(resx.top1),ac=g(resx.top2),ak=g(resx.top3),ch=100000;if(isNaN(ag)){ag=0;}if(isNaN(ac)){ac=ag;}if(isNaN(ak)){ak=ac;}if(t<ag){j="1";}else if(t<ac){j="2";}else if(t<ak){j="3";}else if(t<ch){j="4";}}o(m,j,1440,null,h);if(!b(i(m))){o(m,j,null,null,h);}if(typeof(resx.pageid)!=a&&b(resx.pageid)){au=resx.pageid;}else{au=q();}k=i(l);j=i(m);var bd=((typeof(resx.links)!=a)?resx.links+"":"");if(b(bd)){var ap=bd.replace(/\,/g,";").replace(/\|/g,"%7C").split(";",50);for(var aa=0;aa<ap.length;aa++){ad+=ap[aa]+";";}}var bc=(typeof(resx.maxl)!=a&&!isNaN(resx.maxl)?g(resx.maxl):20),bb=((typeof(resx.lkmatch)!=a)?resx.lkmatch:""),cc=((typeof(resx.ltmatch)!=a)?resx.ltmatch:"");if(b(bb)){var ba=((typeof(resx.plkmatch)!=a)?resx.plkmatch:""),e=null;if(typeof(resx.rrelem)!=a){e=af(ao());}if(e!=null){for(var aa=0;aa<e.length;aa++){if(b(e[aa])){ad+=bi(e[aa],null,ba,bb,cc,50);}}}if(bc>0){ad+=bi(document,e,ba,bb,cc,bc);}}r=by()&&b(c)&&b(k)&&b(au);if(!r){n();}}catch(ex){d("pv",ex);}}function cq(){try{if(j=="1"||j=="2"||j=="3"){if(r){window.setTimeout("certonaResx.checkCallback();",50);}var az="?appid="+((typeof(resx.appid)!=a)?resx.appid:"")+"&tk="+(b(c)?c:"")+"&ss="+(b(k)?k:"")+"&sg="+(b(j)?j:"")+"&pg="+(b(au)?au:"")+"&vr="+ct+"&bx="+r,cw="";if(typeof(resx.rrelem)!=a){var cz=af(ao());if(cz!=null){for(var aa=0;aa<cz.length;aa++){cw+="&sc="+cz[aa];}}}az+=cw+((typeof(resx.event)!=a)?"&ev="+resx.event:"")+((typeof(resx.itemid)!=a)?"&ei="+resx.itemid:"")+((typeof(resx.qty)!=a)?"&qt="+resx.qty:"")+((typeof(resx.price)!=a)?"&pr="+resx.price:"")+((typeof(resx.shipping)!=a)?"&sh="+resx.shipping:"")+((typeof(resx.total)!=a)?"&tt="+resx.total:"")+((typeof(resx.currencycode)!=a)?"&cc="+resx.currencycode:"")+((typeof(resx.customerid)!=a)?"&cu="+resx.customerid:"")+((typeof(resx.transactionid)!=a)?"&tr="+resx.transactionid:"")+((r)?cs():"")+bg()+"&ur="+escape(location.href.substring(0,400))+"&plk="+(b(ad)?ad:"")+"&rf="+escape(document.referrer)+((an)?"&er="+an+"&em="+bu:"");var ci=ck;if(typeof(resx.host)!=a&&b(resx.host)){ci=resx.host;}var cy=df+ci+cj+az;return(cy.substring(0,2083));}}catch(ex){d("",ex);}return"";}function cp(src){try{var av=document.createElement('script');av.type='text/javascript';av.src=src;document.body.appendChild(av);}catch(ex){d("",ex);}}return{checkCallback:function(){bx();},showResponse:function(x){cu(x);},getUrl:function(){bn();return cq();},run:function(){bn();var src=cq();cp(src);}}}();certonaResx.run();
