
vjo.ctype("vjo.darwin.pres.page.dealsdestcommon.DealsDestCommon").needs("vjo.dsf.utils.Handlers").needs("vjo.dsf.Element","E").needs("vjo.dsf.EventDispatcher","ED").protos({currentPos:null,widgetIds:null,objRef:null,intervalId:null,isOnLoad:null,isMouseEvent:null,stopId:null,selectedId:null,constructs:function(_1){objRef=this;var p=_1;this.oModel=_1;intervalId=null;this.highLytSelection();var i=0;currentPos=0;widgetIds=new Array();isMouseEvent=false;var _4=this.oModel.selectionId;for(var _5 in _4){widgetIds[i]=_5;i++;}
this.pgeLoad();},pgeLoad:function(){isOnLoad=true;this.rotateWidget();},rotateWidget:function(){isMouseEvent=false;if(currentPos==widgetIds.length-1){var _6=widgetIds[currentPos];e=objRef.vj$.E.get(_6);if(e){var _7=objRef.oModel.selectionId;var _8=_7[_6];for(var _9 in _8){objRef.showSelection(_9,_8[_9]);objRef.resetRotation();}}
currentPos=0;}else{var _6=widgetIds[currentPos];e=objRef.vj$.E.get(_6);if(e){var _7=objRef.oModel.selectionId;var _8=_7[_6];for(var _9 in _8){objRef.showSelection(_9,_8[_9]);objRef.resetRotation();}}
currentPos++;}},showSelection:function(_a,_b){if(intervalId!=null&&intervalId){window.clearInterval(intervalId);intervalId=null;}
var t=objRef;var _d=t.oModel.selectBdrId;if(_d){for(var _e in _d){e=t.vj$.E.get(_e);e.style.display="none";e=t.vj$.E.get(_d[_e]);e.style.display="none";}}
e=t.vj$.E.get(_b);e.style.display="block";e=t.vj$.E.get(_a);e.style.display="block";},highLytSelection:function(){var t=this;var _10=t.oModel.selectionId;if(_10){var i=0;for(var _12 in _10){e=t.vj$.E.get(_12);if(e){var _13=_10[_12];for(var _14 in _13){this.vj$.ED.addEventListener(e,"mouseover",vjo.curry(this.showWidget,i,_14,_13[_14]),t);this.vj$.ED.addEventListener(e,"click",vjo.curry(this.stopRotation),t);e1=t.vj$.E.get(_13[_14]);this.vj$.ED.addEventListener(e1,"click",vjo.curry(this.stopRotation),t);this.vj$.ED.addEventListener(e1,"mouseover",vjo.curry(this.showWidget,i,_14,_13[_14]),t);this.vj$.ED.addEventListener(e1,"mouseout",vjo.curry(this.removeSelection),t);e2=t.vj$.E.get(_14);this.vj$.ED.addEventListener(e2,"mouseover",vjo.curry(this.showWidgetOnDetl,i,_14,_13[_14]),t);this.vj$.ED.addEventListener(e2,"mouseout",vjo.curry(this.removeSelection),t);}}
i++;}}},showWidget:function(_15,_16,_17){var t=this;currentPos=_15;isMouseEvent=true;this.showSelection(_16,_17);},showWidgetOnDetl:function(_19,_1a,_1b){var t=this;currentPos=_19;isMouseEvent=true;this.showSelection(_1a,_1b);intervalId=window.setInterval(this.resetRotation,20000);},removeSelection:function(){if(intervalId){window.clearInterval(intervalId);intervalId=null;}
var t=objRef;if(t.oModel.ddNotPresent){if(isMouseEvent){intervalId=window.setInterval(t.rotateWidget,t.oModel.onMouseOutDelay);}else{intervalId=window.setInterval(t.rotateWidget,t.oModel.rotationWeeklyDeal);}}else{if(isOnLoad){if(isMouseEvent){intervalId=window.setInterval(t.rotateWidget,t.oModel.onMouseOutDelay);}else{intervalId=window.setInterval(t.rotateWidget,t.oModel.waitTimeOnload);}}else{if(currentPos==0){if(isMouseEvent){intervalId=window.setInterval(t.rotateWidget,t.oModel.onMouseOutDelay);}else{intervalId=window.setInterval(t.rotateWidget,t.oModel.rotationDailyDeal);}}else{if(isMouseEvent){intervalId=window.setInterval(t.rotateWidget,t.oModel.onMouseOutDelay);}else{intervalId=window.setInterval(t.rotateWidget,t.oModel.rotationWeeklyDeal);}}}}
if(currentPos==widgetIds.length-1){currentPos=0;}else{currentPos++;}
isMouseEvent=false;},stopRotation:function(){var t=this;if(intervalId){window.clearInterval(intervalId);intervalId=null;}
var _1f=t.oModel.selectionId;if(_1f){for(var _20 in _1f){e=t.vj$.E.get(_20);if(e){var _21=_1f[_20];for(var _22 in _21){this.vj$.ED.detachHandlers(_20,"mouseover");this.vj$.ED.detachHandlers(_20,"click");this.vj$.ED.detachHandlers(_21[_22],"click");this.vj$.ED.detachHandlers(_21[_22],"mouseover");this.vj$.ED.detachHandlers(_21[_22],"mouseout");}}}
stopId=window.setInterval(t.reattachSelection,t.oModel.onClickDelay);this.resetClickRotation();}},reattachSelection:function(){var t=objRef;var _24=t.oModel.selectionId;if(_24){var i=0;for(var _26 in _24){e=t.vj$.E.get(_26);if(e){var _27=_24[_26];for(var _28 in _27){objRef.vj$.ED.addEventListener(e,"mouseover",vjo.curry(objRef.showWidget,i,_28,_27[_28]),t);objRef.vj$.ED.addEventListener(e,"click",vjo.curry(objRef.stopRotation),t);e1=t.vj$.E.get(_27[_28]);objRef.vj$.ED.addEventListener(e1,"click",vjo.curry(objRef.stopRotation),t);objRef.vj$.ED.addEventListener(e1,"mouseover",vjo.curry(objRef.showWidget,i,_28,_27[_28]),t);objRef.vj$.ED.addEventListener(e1,"mouseout",vjo.curry(objRef.removeSelection),t);}}
i++;}}
if(stopId){window.clearInterval(stopId);stopId=null;}},removeSelectionDelay:function(){if(isMouseEvent){window.setTimeout(this.removeSelection,t.oModel.onMouseOutDelay);}else{window.setTimeout(this.removeSelection,t.oModel.onClickDelay);}},resetRotation:function(){if(intervalId){window.clearInterval(intervalId);intervalId=null;}
var t=objRef;if(t.oModel.ddNotPresent){if(isMouseEvent){intervalId=window.setInterval(t.rotateWidget,t.oModel.onMouseOutDelay);}else{intervalId=window.setInterval(t.rotateWidget,t.oModel.rotationWeeklyDeal);}}else{if(isOnLoad){if(isMouseEvent){intervalId=window.setInterval(t.rotateWidget,t.oModel.onMouseOutDelay);}else{intervalId=window.setInterval(t.rotateWidget,t.oModel.waitTimeOnload);}}else{if(currentPos==0){if(isMouseEvent){intervalId=window.setInterval(t.rotateWidget,t.oModel.onMouseOutDelay);}else{intervalId=window.setInterval(t.rotateWidget,t.oModel.rotationDailyDeal);}}else{if(isMouseEvent){intervalId=window.setInterval(t.rotateWidget,t.oModel.onMouseOutDelay);}else{intervalId=window.setInterval(t.rotateWidget,t.oModel.rotationWeeklyDeal);}}}}
isOnLoad=false;},resetClickRotation:function(){if(intervalId){window.clearInterval(intervalId);intervalId=null;}
var t=objRef;if(t.oModel.ddNotPresent){intervalId=window.setInterval(t.rotateWidget,t.oModel.onClickDelay);}else{if(isOnLoad){intervalId=window.setInterval(t.rotateWidget,t.oModel.onClickDelay);}else{if(currentPos==0){intervalId=window.setInterval(t.rotateWidget,t.oModel.onClickDelay);}else{intervalId=window.setInterval(t.rotateWidget,t.oModel.onClickDelay);}}}
isOnLoad=false;}}).props({show:function(_2b){var frm=document.getElementById(_2b);if(frm){frm.style.display="block";}},hide:function(_2d){var frm=document.getElementById(_2d);if(frm){frm.style.display="none";}},trackClkThru:function(_2f,_30,_31,_32){var _33=_rover.createClickThruEvent(_2f,_30);_33.setLoc(_31);_33.track();},disableSelection:function(_34){if(typeof _34.onselectstart!="undefined"){_34.onselectstart=function(){return false;};}else{if(typeof _34.style.MozUserSelect!="undefined"){_34.style.MozUserSelect="none";}else{_34.onmousedown=function(){return false;};}}
_34.style.cursor="default";},enableSelection:function(_35){if(typeof _35.onselectstart!="undefined"){_35.onselectstart=function(){return true;};}else{if(typeof _35.style.MozUserSelect!="undefined"){_35.style.MozUserSelect="";}else{_35.onmousedown=function(){return true;};}}
_35.style.cursor="default";},navigateTo:function(url){window.location.href=url;},isImageOk:function(_37){var img=document.getElementById(_37);if((!img.complete)||(img.naturalWidth!="undefined"&&img.naturalWidth==0)){img.style.visibility="hidden";(img.parentNode).removeChild(img);}else{var _39=navigator.appName;if(_39=="Netscape"){img.style.visibility="";}else{img.style.visibility="visible";}}},changeImg:function(_3a,_3b){var _3c=document.getElementById(_3a);var _3d=document.getElementById(_3b);if(_3c){_3d.className="tggleDv";}},retainImg:function(_3e,_3f){var _40=document.getElementById(_3e);var _41=document.getElementById(_3f);if(_40){_41.className="scrllDv";}}}).endType();

vjo.ctype("vjo.darwin.core.utils.ServiceUtils").needs("vjo.dsf.ServiceEngine","SE").needs("vjo.dsf.Message","M").props({reg:new Array(),rgSv:function(_1,_2,_3){this.vj$.SE.registerSvcHdl(_1,_2);this.register(_1,_3);},rgSvRsp:function(_4,_5,_6){this.vj$.SE.registerSvcRespHdl(_4,_5);this.register(_4,_6);},sndM:function(_7){this.vj$.SE.handleRequest(typeof(_7)=="object"?_7:this.gM(_7));},gM:function(_8){return new this.vj$.M(_8);},register:function(_9,_a){if(!_9||!_a){return;}
var SE=vjo.darwin.core.utils.ServiceUtils;var _c;if(!SE.reg[_a]){_c=[];SE.reg[_a]=_c;}else{_c=(SE.reg[_a]);}
_c.push(_9);},unRegister:function(_d){var _e=this.reg[_d];if(_e){for(var i=0,l=_e.length;i<l;i++){delete(vjo.dsf.ServiceEngine.inProcHdl.svcHdls[_e[i]]);}}}}).endType();

vjo.ctype("vjo.darwin.core.utils.Slide").needs("vjo.dsf.ServiceEngine","SE").props({busy:false,slide:function(px,_2,tm,sp,_5,bV){var t=this,of=(t.getOffset(_2,bV))[0],ic=of+sp,dc=of-sp,v=px;if(ic<px&&of<px){v=ic;}else{if(dc>px&&of>px){v=dc;}else{t.busy=false;t.setStyle(_2,v,bV);if(_5!==null){t.sendMessage(px,of,_5);}
return;}}
setTimeout(function(){t.slide(px,_2,tm,sp,_5,bV);},tm);t.setStyle(_2,v,bV);return;},getOffset:function(_8,bV){var st=_8.style,ht=_8.offsetHeight,wd=_8.offsetWidth;if(bV){return(st.top!=="")?[parseInt(st.top,10),ht]:[0,ht];}else{return(st.left!=="")?[parseInt(st.left,10),wd]:[0,wd];}},setStyle:function(_b,_c,bV){(bV)?_b.style.top=_c+"px":_b.style.left=_c+"px";},sendMessage:function(_e,l,msg){var t=this;msg.request={px:_e,ofSt:l};t.vj$.SE.handleRequest(msg);return false;}}).endType();

vjo.ctype("vjo.darwin.core.filmstrip3.FilmStrip").needs("vjo.dsf.Element","E").needs("vjo.Registry","R").needs("vjo.darwin.core.utils.ServiceUtils","SE").needs("vjo.dsf.ServiceEngine","SEN").needs("vjo.darwin.core.utils.Slide","SL").needs("vjo.dsf.Message","M").protos({m:null,jsr:null,o:null,n:null,p:null,obj:null,elms:null,fPg:null,tbl:null,wd:64,hg:64,busy:false,bLeft:false,tm:0,i:null,a:null,h:null,hglkpNm:null,pn:null,lkpNm:null,jsn:null,bEnd:false,hov:false,num:0,r:0,tp:0,pxMv:0,pb:null,scrl:false,constructs:function(_1,_2){var t=this,E=t.vj$.E,id,tp;t.jsr=_2;t.m=_1;t.vj$.R.put(t.m.jsId,t);id=t.m.id;t.o=E.get(id+"_s");t.n=E.get(id+"_na");t.p=E.get(id+"_pa");t.obj=[];t.elms=[];t.fPg=[];t.tbl=E.get(t.m.tblId);t.wd=64;t.hg=64;t.busy=false;t.bLeft=true;t.i="-i";t.a="-a";t.h="-h";t.pn=vjo.getType("vjo.darwin.core.filmstrip3.Pagination");t.init();},init:function(){var t=this,m=t.m,n,tot,tp;var _5=vjo.getType("vjo.darwin.core.filmstrip3.FilmStripResizer");if(m.rsz&&_5){_5.init(m.jsId);}
n=m.pgItmNo;t.tot=tot=m.totItms;if(t.tbl){t.tbl.style.left="0";}
t.currPos=0;t.bEnd=false;m.scrl=(tot<=n)?false:true;t.num=(tot<n)?n:tot;tp=Math.floor(tot/n);t.r=tot%n;t.tp=(t.r>0)?tp+1:tp;t.pxMv=20;t.pg=0;t.rszArr=m.rszArr;t.setTdStyle();m.pgn=m.pgn&&(t.tp>1)?true:false;t.pb=vjo.Registry.get(t.m.pbInstId);t.scrl=(m.type=="SCROLL")?true:false;t.chngBtns();t.destroy();t.clz(t.a,t.i,t.p);t.clz(t.a,t.i,t.n);if(tot>1&&t.n&&t.p&&t.tp>1){if(!t.evtAttached){t.attchEvts();}
t.evtAttached=true;t.attchClkEvts();t.clz(t.i,t.a,t.n);}
if(t.jsr){t.clz(t.a,t.i,t.n);t.clz(t.a,t.i,t.p);}
t.attchCntrEvts();var d=m.vert?m.imgWdt:m.imgHt,s=n*d,r=Math.ceil(d/300);t.pxMv=(r>1)?t.pxMv*r:t.pxMv;},destroy:function(){var t=this;t.n.onclick=null;t.p.onclick=null;},attchEvts:function(){var t=this,m=t.m,cl="click",hov=function(){t.arrHvr(this,1);},mo="mouseover",mt="mouseout",hou=function(){t.arrHvr(this,0);},pos=0;if(m.scrl){t.n.onmouseover=hov;t.p.onmouseover=hov;t.n.onmouseout=hou;t.p.onmouseout=hou;}
if(t.pn&&m.pgn){t.pn=new t.pn(m.jsId);}},attchCntrEvts:function(){var t=this,m=t.m,td,tb=t.tbl;for(var i=0;i<m.pgItmNo*2;i++){if(i<t.tot){td=m.vert?tb.rows[i].cells[0]:tb.rows[0].cells[i];td.onmouseover=function(_b){t.handleHover(this,_b);};td.onmouseout=function(_c){t.handleOut(this,_c);};if(m.imgData){td.onclick=function(){t.clickCntr(this);};}}else{break;}}},attchClkEvts:function(){var t=this;if(t.m.scrl){t.n.onclick=function(){t.nextArrClick(t);};t.p.onclick=function(){t.prevArrClick(t);};}},nextArrClick:function(t){var o=vjo.darwin.core.utils.ServiceUtils,m=o.gM(t.m.NCSI+t.m.id);m.cPos=t.currPos;if(t.bEnd){return;}
o.sndM(m);t.bLeft=true;t.hov=false;if(!t.scrl){var num=t.m.pgItmNo,c=+(t.currPos),cp=(t.bLeft)?c+num:c;t.bEnd=t.getEnd(cp,num);t.swap();t.chngBtns();}else{t.slide();}},prevArrClick:function(t){var o=vjo.darwin.core.utils.ServiceUtils,m=o.gM(t.m.PCSI+t.m.id);m.cPos=t.currPos;if(t.currPos==0){return;}
o.sndM(m);t.bLeft=false;t.hov=false;if(!t.scrl){t.swap();t.bEnd=false;t.chngBtns();}else{t.slide();}},clickCntr:function(o){var t=this,m=t.m,h,ind;if(t.busy){return;}
ind=o.getAttribute("idx");if(!m.imgData){return;}
h=m.imgData[+ind].href;if(h){window.location.href=h;}},arrHvr:function(o,b){var t=this,c=o;if(b){t.clz(t.a,t.h,c);}else{t.clz(t.h,t.a,c);}},slide:function(pos){var t=this,o=t.vj$,m=t.m,n=m.pgItmNo,wd=m.imgWdt+11,isBusy=t.busy,px=n*wd,msg=new o.M(m.clkSvcId),c=+(t.currPos);if(t.busy||t.hov){return;}
t.pg=pos;t.busy=true;var cp=(t.bLeft)?c+n:c;if(t.bLeft){t.bEnd=t.getEnd(cp,n);t.currPos=(t.bEnd)?(t.tot%n==0)?c+n:c+t.r:c;if(t.bEnd&&m.pgn&&t.pn){t.pn.updatePgn((Math.ceil((t.currPos+n)/n)-1)*n);}}
var _1b=t.getTotPx(t.bEnd),sldPx;if(!t.bLeft){if(!t.bEnd){t.swap(pos);t.setStyle(t.o,-_1b,m.vert);}else{t.currPos=(t.tot%n==0)?c-n:c-t.r;t.bEnd=false;}
if(m.pgn&&t.pn){t.pn.updatePgn(t.currPos);}
sldPx=0;}else{sldPx=-_1b;}
t.sndBusyMsg(t.busy);o.SL.slide(sldPx,t.o,m.speed,t.pxMv,msg,m.vert);},sndBusyMsg:function(b){var t=this,o=this.vj$,msg=new o.M(t.m.busySvcId);msg.request={busy:b};o.SEN.handleRequest(msg);},getTotPx:function(_1e){var t=this,m=t.m,n=m.pgItmNo,d=m.vert?m.imgHgt+11:m.imgWdt+11,px=n*d;return(_1e)?(t.tot%n==0)?n*d:t.r*d:px;},getEnd:function(c,n){var t=this,b=(c/n==t.tp-1)?true:false;return b;},getMsg:function(msg){var t=this;t.busy=false;t.sndBusyMsg(t.busy);if(t.bLeft&&!t.bEnd){t.swap(t.pg);}
t.chngBtns();},setStyle:function(cnt,val,bV){(bV)?cnt.style.top=val+"px":cnt.style.left=val+"px";},swap:function(pos){var t=this,n=t.m.pgItmNo;t.currPos=(pos)?pos:t.getCurrPos(t.currPos);var arr=t.genSeq(t.currPos);t.fPg=arr;t.swapObj(0,arr);var nxt=arr[0]+n;arr=t.genArr(nxt,t.tot);t.swapObj(n,arr,true);t.setStyle(t.o,0,t.m.vert);if(t.m.pgn&&t.pn){t.pn.updatePgn((Math.ceil((+t.currPos+n)/n)-1)*n);}},getCurrPos:function(pos){var t=this,l=t.tot,n=t.m.pgItmNo;pos=(!t.bLeft)?((+pos)-n)%l:((+pos)+n)%t.tot;return(pos<0)?0:pos;},swapObj:function(j,arr,b){var t=this,m=t.m,E=t.vj$.E,cmpId=m.id,imgOb=m.imgData,itmOb=m.itmData,tb=t.tbl,w=cmpId+m.wrpDivPrf,img;for(var i=0;i<arr.length;i++){var p=arr[i],id,td=m.vert?tb.rows[(j+i)].cells[0]:tb.rows[0].cells[j+i],im=imgOb?imgOb[p]:null,wrp=E.get(w+p);wrp=(wrp)?wrp:t.elms[p];if(td){t.sA(td,"idx",p);}
if(im){id=cmpId+m.imgPrfx+(j+i),img=E.get(id);if(img){t.sA(img,"idx",p);t.loadImg(id,im.src);}}else{if(t.jsr&&t.jsn){t.addTmpl(td,p);}else{if(wrp){t.wrpElm(td,p,wrp,b);}}}
if(itmOb){t.addItm((j+i),itmOb[p],p);}}},addTmpl:function(td,p){var t=this,o=t.obj[p];if(!o){o=t.render(p);}
if(o){var f=td.firstChild;if(f){td.removeChild(f);}
t.aC(td,o);}},addItm:function(j,itm,p){var t=this,m=t.m,itmDv=m.id+m.itmDivPrf,br="<br/>",str,prc,tm,dv=t.vj$.E.get(itmDv+j);if(!dv){return;}
if(itm){prc=itm.itemPrice,tm=itm.endTime,str=(prc)?(prc+br):"";str=tm?str+tm+br:str;if(!str&&str.length==0){dv.style.display="none";}else{dv.style.display="block";dv.innerHTML=str;}}
t.sA(dv,"idx",p);},isAdded:function(s){var t=this,a=t.fPg,b=false,mn=a[0],mx=a[a.length-1];return(s>=mn||s<=mx)?true:false;},getCln:function(e){if(!e){return;}
var cl=e.cloneNode(true);cl.id=e.id+"_c";return cl;},wrpElm:function(td,p,w,b){var t=this,f=td.firstChild,idx,n=t.m.pgItmNo;if(f){var ix=f.id.split("_");idx=ix[ix.length-1];if(idx!=="c"){t.elms[+idx]=f;}
td.removeChild(f);}
b=(b&&(t.tot>n&&t.tot<2*n));w=(b&&t.isAdded(p))?t.getCln(w):w;w.style.display="block";t.sA(w,"idx",p);t.aC(td,w);},genSeq:function(pos){var t=this,l=t.tot,d=l-pos,n=t.m.pgItmNo;if(d<n){pos-=(n-d);}
return t.genArr(pos,l);},genArr:function(pos,l){var t=this,arr=[];for(var i=0;i<t.m.pgItmNo;i++){arr[i]=pos%l;pos++;}
return arr;},handleHover:function(o,e){var t=this,elem,l,f=t.gNd(o);if(t.busy){return;}
e=e?e:event;var r=e.srcElement||e.target;if(f&&r==f){l=f.getAttribute("idx");if(t.pb){t.pb.show(f.id,l);}}},handleOut:function(o,e){var t=this;e=e?e:event;var r=e.toElement||e.relatedTarget;if(r){if(t.vj$.E.containsElement(o,r)){return;}}
if(t.pb){t.pb.hide();}},gNd:function(nd){var t=this,ch=nd.childNodes;return(ch[0]&&typeof ch[0].innerHTML=="undefined")?ch[1]:ch[0];},clz:function(p,c,o){var t=this;var pC=o.className;o.className=pC.replace(p,c);},loadImg:function(id,src){var t=this,m=t.m,IR=vjo.getType("vjo.darwin.core.utils.ImageLoader");var i=t.vj$.E.get(id);if(!IR){i.src=src;return;}
IR.loadImages(src,m.imgWdt,m.imgHgt,i,true,true,null,t.eH(id));var _5f=function(){if(IR.iA[src].getAttribute("err")){i.style.width=t.wd;i.style.height=t.wd;}};setTimeout(_5f,30);},eH:function(id){var t=this,E=t.vj$.E,i=E.get(id);i.src=t.m.errUrl;},chngBtns:function(){var t=this,m=t.m,nD=t.n,pD=t.p;t.n.title=(t.bEnd)?"":m.nextAlt;t.p.title=(t.currPos==0)?"":m.prevAlt;if(t.bEnd){t.clz(t.h,t.i,nD);t.clz(t.a,t.i,nD);t.clz(t.i,t.a,pD);}else{if(t.currPos==0){t.clz(t.a,t.i,pD);t.clz(t.h,t.i,pD);t.clz(t.i,t.a,nD);}else{t.clz(t.i,t.a,pD);t.clz(t.i,t.a,nD);}}},setTdStyle:function(){var t=this,m=t.m,E=t.vj$.E,p="px",nP=m.pgItmNo,tdN=nP*2,tot=m.totItms,hg=m.imgHgt,wd=m.imgWdt,tb=t.tbl,idx,i=m.id,bV=m.vert,imgD=m.imgData,bItm,trs=tb.rows,itmD=m.itmData;if(tot<nP){tdN=nP;}
for(var k=0;k<tdN;k++){var st,td=bV?m.shwItmDtls?trs[k].cells[0]:trs[k].cells[0]:trs[0].cells[k];if(!td){return;}
st=td.style;st.width=(bV)?((wd+10)+p):((wd+11)+p);st.height=(bV)?((hg+11)+p):((hg+10)+p);idx=(k==tot&&tot>nP)?0:k;var b=(k>nP)?true:false;t.setCntOnLoad(idx,tot,imgD,td,b);if(!bItm){bItm=(itmD&&itmD[k])?true:false;}
idx++;}
if(bV&&m.itmData){E.get(i+"_cntr").style.height=((hg+11)*nP)+p;}
var nD=E.get(m.id+"_na"),pD=E.get(m.id+"_pa");if(m.arrHgtFxd){nD.style.verticalAlign="middle";pD.style.verticalAlign="middle";}},setCntOnLoad:function(k,tot,_6b,td,b){var t=this,m=t.m,w=t.vj$.E.get(m.id+m.wrpDivPrf+k);if(k<tot){if(_6b){t.loadImg(m.id+m.imgPrfx+k,_6b[k].src);}else{if(t.jsr&&t.jsn){t.addTmpl(td,k);}else{if(w&&!m.jsr){if(k<m.pgItmNo){t.fPg[k]=k;}
t.wrpElm(td,k,w,b);}}}
if(m.itmData&&m.shwItmDtls){t.addItm(k,m.itmData[k],k);}}},addItmDt:function(e,itm,i){if(!e){return;}
var prc=itm.itemPrice,tm=itm.endTime,br="<br/>",str=(prc)?(prc+br):"";str=tm?str+tm+br:str;e.innerHTML=str;this.sA(e,"idx",i);},sA:function(e,k,v){e.setAttribute(k,v);},setImgDt:function(o){var t=this,m=t.m;m.totItms=o.length;m.imgData=o;},setItmDt:function(_78){var t=this;t.m.itmData=_78;},setDNodes:function(_7a){var t=this,m=t.m,w=m.id+m.wrpDivPrf,E=t.vj$.E,elm,l,wp;if(m.imgData){m.imgData=null;}
m.totItms=l=_7a.length;for(var i=0;i<l;i++){wp=E.get(w+i);if(!wp){wp=E.createElement("DIV");wp.style.display="none";wp.id=w+i;t.aC(document.body,wp);}
elm=E.get(_7a[i]);elm=(elm)?elm:_7a[i];if(typeof elm=="String"){wp.innerHTML=elm;}else{t.aC(document.body,wp);wp.innerHTML="";t.aC(wp,elm);}
wp.setAttribute("idx",i);}},aC:function(p,c){if(c){p.appendChild(c);}},setJson:function(_7f,_80){var t=this,m=t.m,tot,n;t.jsn=_7f,n=m.pgItmNo;t.lkpNm=_80;m.totItms=tot=_7f[_80].length;t.init();},render:function(i){var t=this,o=t.jsn,itm=o[t.lkpNm][i],js=t.jsr;if(itm){var cnt=js.render(itm,o);t.obj[i]=cnt;return cnt;}}}).endType();

vjo.ctype("vjo.darwin.pres.page.landingpage.kvi.Kvi").needs("vjo.dsf.Element","E").needs("vjo.dsf.EventDispatcher","ED").needs("vjo.dsf.utils.Handlers","HD").needs("vjo.darwin.pres.page.dealsdestcommon.DealsDestCommon","DDC").protos({startX:[],offsetX:[],conLeftPos:0,currentPosition:0,constructs:function(_1){var t=this,e,p=_1;t.scrollerTrack=null;t.scrollerTrackArr=[];t.scrollerHandle=null;t.scrollerHandleArr=[];t.dragElement=null;t.dragElementArr=[];t.containerElement=null;t.containerElementArr=[];t.innerContainer=null;t.innerContainerArr=[];t.hidedWidthArr=[];t.kviTdArr=[];for(var i=0;i<p.segmentSize;i++){t.scrollerTrackArr[i]=p.scrollId+i;t.scrollerHandleArr[i]=p.scrollerId+i;t.dragElementArr[i]=p.scrollerId+i;t.containerElementArr[i]=p.widjetId+i;t.innerContainerArr[i]=p.innerWidjetId+i;t.kviTdArr[i]=p.kviTd+i;t.hidedWidthArr[i]=0;this.startX[i]=0;this.offsetX[i]=0;e=this.vj$.E.get(t.scrollerHandleArr[i]);e4=this.vj$.E.get(t.kviTdArr[i]);if(e){this.vj$.ED.addEventListener(e,"mousedown",vjo.curry(this.dragElem,i),t);this.vj$.ED.addEventListener(this.vj$.E.get(t.scrollerTrackArr[i]),"click",vjo.curry(this.clickElem,i),t);t.containerElement=this.vj$.E.get(t.containerElementArr[i]);t.innerContainer=this.vj$.E.get(t.innerContainerArr[i]);t.hidedWidthArr[i]=this.getNumber(t.innerContainer.style.width)-this.getNumber(t.containerElement.style.width);this.vj$.ED.addEventListener(e4,"mouseover",vjo.curry(this.changeClrImg,i),t);this.vj$.ED.addEventListener(e4,"click",vjo.curry(this.changeClrImg,i),t);this.vj$.ED.addEventListener(e4,"mouseup",vjo.curry(this.changeClrImg,i),t);this.vj$.ED.addEventListener(e4,"mousemove",vjo.curry(this.changeClrImg,i),t);this.vj$.ED.addEventListener(e4,"dblclick",vjo.curry(this.changeClrImg,i),t);this.vj$.ED.addEventListener(e4,"mouseout",vjo.curry(this.retainClrImg,i),t);}}},changeClrImg:function(_4){this.vj$.DDC.changeImg(this.kviTdArr[_4],this.dragElementArr[_4]);},retainClrImg:function(_5){this.vj$.DDC.retainImg(this.kviTdArr[_5],this.dragElementArr[_5]);},dragElem:function(_6,e){if(e==null){e=window.event;}
with(this){scrollerTrack=this.vj$.E.get(scrollerTrackArr[_6]);scrollerHandle=this.vj$.E.get(scrollerHandleArr[_6]);dragElement=this.vj$.E.get(dragElementArr[_6]);containerElement=this.vj$.E.get(containerElementArr[_6]);innerContainer=this.vj$.E.get(innerContainerArr[_6]);this.currentPosition=_6;this.startDrag(e);}},clickElem:function(_8,e){if(e==null){e=window.event;}
with(this){scrollerTrack=this.vj$.E.get(scrollerTrackArr[_8]);scrollerHandle=this.vj$.E.get(scrollerHandleArr[_8]);dragElement=this.vj$.E.get(dragElementArr[_8]);containerElement=this.vj$.E.get(containerElementArr[_8]);innerContainer=this.vj$.E.get(innerContainerArr[_8]);this.currentPosition=_8;this.moveSlider(e);}},startDrag:function(e){var t=this;this.vj$.ED.addEventListener(document.body,"mouseup",vjo.curry(this.stopDrag),this);if(e==null){e=window.event;}
var _c=e.target!=null?e.target:e.srcElement;if((e.button==1&&window.event!=null||e.button==0)){this.startX[this.currentPosition]=e.clientX;this.offsetX[this.currentPosition]=this.getNumber(_c.style.left);this.vj$.ED.addEventListener(document.body,"mousemove",vjo.curry(this.moveSlider),t);this.vj$.ED.stopEvent(e);}},getNumber:function(_d){var n=parseInt(_d);n=((n==null)||(isNaN(n)))?0:n;return n;},moveSlider:function(e){if((e.type)=="mousemove"){this.vj$.DDC.disableSelection(document.body);this.changeClrImg(this.currentPosition);}
var t=this;if(e==null){var e=window.event;}
if(this.startX[this.currentPosition]==0){var obj=this.scrollerTrack;var _12=0;if(obj.offsetParent){while(1){_12+=obj.offsetLeft;if(!obj.offsetParent){break;}
obj=obj.offsetParent;}}else{if(obj.x){_12+=obj.x;}}
this.startX[this.currentPosition]=_12+86;}
var _13=(this.offsetX[this.currentPosition]+e.clientX-this.startX[this.currentPosition]);var _14=this.getNumber(_13);if(_14<0){_14=0;}
if(_14>259){_14=259;}
var _15=t.hidedWidthArr[this.currentPosition]-2;this.conLeftPos=-((_14/262)*_15);this.dragElement.style.left=_14+"px";this.innerContainer.style.position="relative";this.innerContainer.style.left=this.conLeftPos+"px";},stopDrag:function(e){var t=this,e8;this.vj$.DDC.enableSelection(document.body);this.retainClrImg(this.currentPosition);this.vj$.ED.detachHandlers("docbody","mousemove");}}).props({}).endType();

// fr_FR/9/DealsEuAppSpec_LandingPageView_914205889_3_fr_FR
// b=14205889
