
vjo.ctype("vjo.darwin.domain.finding.common.resultset.ResultSetCompareItem").needs("vjo.dsf.cookie.VjCookieJar").protos({constructs:function(_1){var vE=this.vE=vjo.dsf.Element;var c=this.model=_1||{};this.re=new RegExp("2","g");this.compareShopId=c.compareShopId;this.checkbxGrName=c.checkbxGrName;this.coCookieArr=this.getCookieArr();this.coDomain=null;this.coTotalSelected=0;this.coCurSelected=0;var eD=this.eD=vjo.dsf.EventDispatcher;var _5=c.linkList.length;for(var i=0;i<_5;i++){eD.add(c.linkList[i],"click",vjo.hitch(this,this.compareLimitTest));}},onCompareItems:function(){var _7=document.forms[this.model.compareItem];if(_7!=null){_7.submit();}
return false;},getCookieArr:function(){var _8=vjo.dsf.cookie.VjCookieJar.readCookie("ebay","compare-items");var _9;if(!_8||_8==""){_9=new Array("","");}else{_9=_8.split("$");}
if(_9.length<2){_9[1]="";}
return _9;},coGetDomain:function(){if(this.coCookieArr==null){this.coCookieArr=this.getCookieArr();}
var _a=this.coCookieArr[0].indexOf("domain=");if(_a!=-1){var _b=this.coCookieArr[0].indexOf("~",_a);if(_b==-1){_b=this.coCookieArr[0].indexOf("$",_a);}
if(_b==-1){_b=this.coCookieArr[0].length;}
var _c=this.coCookieArr[0].substring(_a+7,_b);if(_c!=""){this.coDomain=_c;}}},coOnLoad:function(_d){this.coForm=this.vE.get(_d);if(this.coCookieArr==null){this.coCookieArr=this.getCookieArr();}
var _e=this.ebGetKeyValuePairArray(this.coCookieArr[0],"~","=");if(typeof(_e)!="undefined"){if(typeof(_e["use"])!="undefined"){this.coCookieArr[1]="";_e=this.ebRemoveFromKeyValuePairs(_e,"~","=","use");this.coCookieArr[0]=this.ebBuildKeyValuePairString(_e,"~","=");var _f=this.coCookieArr[0]+"$"+this.coCookieArr[1];vjo.dsf.cookie.VjCookieJar.writeCookielet("ebay","compare-items",_f);}}
this.coGetDomain();var _10,_11;if(this.coForm){var _12=this.coGetStoredItemList();var _13=new Array("LineID",this.checkbxGrName);var _14=_12.length;for(var i=0;i<_14;i++){for(var q=0;q<_13.length;q++){var _17=false;var _18=_13[q];if(this.coForm.elements[_18]){if(this.coForm.elements[_18].length){for(var j=0;j<this.coForm.elements[_18].length;j++){if(this.coForm.elements[_18][j].value==_12[i]){this.coForm.elements[_18][j].checked=true;_17=true;}}}else{if(this.coForm.elements[_18].value==_12[i]&&this.coForm.elements[_18].type=="checkbox"){this.coForm.elements[_18].checked=true;_17=true;}}}}
if(!_17){this.coKeepValues+=_12[i]+"|";}else{this.coCurSelected++;}
if(_12[i]!=""){this.coTotalSelected++;}}
if(document.all||document.getElementById){this.coUpdatePrevSelText();this.coChangeDisplay();}}},ebGetKeyValuePairArray:function(_1a,_1b,_1c){if(typeof(_1a)=="undefined"){return;}
var kvp=_1a;var _1e=new Array();while(kvp.indexOf(_1b)!=-1){var _1f=kvp.indexOf(_1b);var _20=kvp.indexOf(_1c);if(_1f>_20){var key=kvp.substring(0,_20);var _22=kvp.substring(_20+1,_1f);if(key!=""){_1e[key]=_22;}}
kvp=kvp.substring(_1f+1);}
if(kvp!=""){var _20=kvp.indexOf(_1c);var key=kvp.substring(0,_20);var _22=kvp.substring(_20+1);if(key!=""){_1e[key]=_22;}
kvp="";}
return _1e;},ebAddToKeyValuePairs:function(_23,_24,_25){_23[_24]=_25;},ebBuildKeyValuePairString:function(_26,_27,_28){var str="";for(var i in _26){str+=_27+i+_28+_26[i];}
str+=_27;return str;},ebRemoveFromKeyValuePairs:function(_2b,_2c,_2d,_2e){var str="";for(var i in _2b){if(i!=_2e){str+=_2c+i+_2d+_2b[i];}}
str+=_2c;return this.ebGetKeyValuePairArray(str,_2c,_2d);},coSaveBTL:function(){var _31=this.coCookieArr[0].indexOf("BTL=");if(_31!=-1){this.coCookieArr[0]=this.coCookieArr[0].substring(0,_31+4)+escape(document.location+"")+this.coCookieArr[0].substring(this.coCookieArr[0].indexOf("~",_31));this.coSetStoredItemList();}else{this.coCookieArr[0]="BTL="+escape(document.location+"")+"~"+this.coCookieArr[0];this.coSetStoredItemList();}},coGetStoredItemList:function(){var _32=this.getCookieArr();return _32[1].split("|");},coSetStoredItemList:function(){var _33=this.coCookieArr[0]+"$"+this.coCookieArr[1];vjo.dsf.cookie.VjCookieJar.writeCookielet("ebay","compare-items",_33);},coAddToCookie:function(_34){if(this.coCookieArr[1].indexOf(_34)==-1){this.coCookieArr[1]=this.coCookieArr[1]+"|"+_34;this.coSetStoredItemList();return true;}
return false;},coRemoveFromCookie:function(_35){curLoc=this.coCookieArr[1].indexOf(_35);if(curLoc<0){return false;}
if(curLoc>0){this.coCookieArr[1]=this.coCookieArr[1].substring(0,curLoc-1)+this.coCookieArr[1].substring(curLoc+_35.length);}else{if(curLoc==0){this.coCookieArr[1]=this.coCookieArr[1].substring(_35.length);}}
this.coSetStoredItemList();return true;},coAlertMax:function(){var tmp=this.model.limit1.replace(this.re,this.model.max)+"\n";tmp+=this.model.limit2;alert(tmp);},coUpdatePrevSelText:function(){var tmp=this.coTotalSelected-this.coCurSelected;if(tmp==0&&this.coCurSelected==0&&this.model.usechbx!=""){this.model.prev=this.model.usechbx;}else{if(tmp==1){this.model.prev=this.model.prev1;}else{this.model.prev=this.model.prev2.replace(this.re,tmp);}}},coCurSelText:function(){var str="";var tmp=this.coTotalSelected-this.coCurSelected;if(tmp!=0||this.coCurSelected!=0||this.model.usechbx==""){this.coUpdatePrevSelText();}else{this.model.usechbx="";return str;}
this.model.usechbx="";return(this.coCurSelected==1)?this.model.select1:this.model.select2.replace(this.re,this.coCurSelected);},compareLimitTest:function(_3a){var ne,_3c;ne=_3a.nativeEvent;if(ne){_3c=ne.srcElement||ne.target;}
if(!_3c){return;}
var _3d=(this.model.max!=null)?this.model.max:25;if(_3c.checked){if(this.coTotalSelected+1>_3d){this.coAlertMax();_3c.checked=false;return false;}else{if(this.coAddToCookie(_3c.value)==true){this.coTotalSelected++;this.coCurSelected++;this.coChangeDisplay();}}}else{if(this.coRemoveFromCookie(_3c.value)==true){this.coTotalSelected=this.coTotalSelected-1;this.coCurSelected=this.coCurSelected-1;this.coChangeDisplay();}
if(this.coForm!=null){for(var i=0;i<this.coForm.elements.length;i++){var _3f=this.coForm.elements[i];if(_3f.name==this.checkbxGrName&&_3f.value==_3c.value&&_3f.checked){_3f.checked=false;}}}}},coChangeDisplay:function(){var _40=this.coCurSelText();if(_40&&this.model.prev){_40=_40.concat(", ",this.model.prev);}else{if(this.model.prev){_40=this.model.prev;}}
if(document.getElementById&&document.getElementById(this.compareShopId)){document.getElementById(this.compareShopId).innerHTML=_40;}else{if(document.all&&document.all[this.compareShopId]){document.all[this.compareShopId].innerHTML=_40;}}}}).endType();
vjo.ctype("vjo.component.sharedfindingpres.collagewidget.CollageWidgetManager").needs("vjo.dsf.EventDispatcher").protos({constructs:function(_1){this.model=_1;this.numRows=_1.numOfRows;this.numCols=_1.numOfColumns;this.itemList=_1.itemList;for(var _2=0;_2<_1.itemList.length;_2++){var _3=document.getElementById(_1.htmlPrefix+"CellAnchor"+_2);if(_3==null){continue;}
vjo.dsf.EventDispatcher.addEventListener(_3,"mouseover",this.onMouseOver,this);vjo.dsf.EventDispatcher.addEventListener(_3,"mouseout",this.onMouseOut,this);}},onMouseOver:function(_4){var _5=vjo.dsf.EventDispatcher.target(_4);_5.style.zIndex=15;_5.parentNode.style.zIndex=15;_5.parentNode.style.border="1px solid #ccc";this.makemebigger(_5.id);var _6=_5.id.split(this.model.htmlPrefix+"CellAnchor")[1];var _7=document.getElementById(this.model.htmlPrefix+"_"+"summary");var _8=document.getElementById(this.model.htmlPrefix+"SaleHolder"+_6);if(_8!=null){_8.style.visibility="visible";}
this.removeChildrenFromNode(_7);_7.innerHTML=this.itemList[_6].summary;return false;},onMouseOut:function(_9){var _a=vjo.dsf.EventDispatcher.target(_9);var _b=_a.id.split(this.model.htmlPrefix+"CellAnchor")[1];_a.style.zIndex=0;_a.parentNode.style.border="0px solid #ccc";_a.parentNode.style.zIndex=0;this.makemesmaller(_a.id);var _c=document.getElementById(this.model.htmlPrefix+"_"+"summary");this.removeChildrenFromNode(_c);_c.innerHTML=this.model.defaultTitle;var _d=document.getElementById(this.model.htmlPrefix+"SaleHolder"+_b);if(_d!=null){_d.style.visibility="hidden";}
return false;},removeChildrenFromNode:function(_e){if(_e===null){return;}
while(_e.childNodes.length>0){_e.removeChild(_e.childNodes[0]);}},check:function(_f,_10){_f=parseInt(_f);if((_f>=99&&_10)||(_f<=50&&!_10)){return false;}else{return true;}},makemebigger:function(id){var _12=document.getElementById(id);if(!_12.width){width=parseInt(_12.clientWidth);height=parseInt(_12.clientHeight);}else{width=parseInt(_12.style.width);height=parseInt(_12.style.height);}
_12.style.width=(width+1)+"px";_12.style.height=(height+1)+"px";if(this.check(_12.style.width,true)){this.makemebigger(id);}},makemesmaller:function(id){var _14=document.getElementById(id);if(!_14.width){width=parseInt(_14.clientWidth);height=parseInt(_14.clientHeight);}else{width=parseInt(_14.style.width);height=parseInt(_14.style.height);}
_14.style.width=(width-1)+"px";_14.style.height=(height-1)+"px";if(this.check(_14.style.width,false)){this.makemesmaller(id);}}}).endType();
vjo.ctype("vjo.darwin.domain.finding.filteroptions.FilterOptions").needs("vjo.darwin.domain.finding.ajax.AjaxUtils").protos({vAU:vjo.darwin.domain.finding.ajax.AjaxUtils,constructs:function(_1){var t=this;t.model=_1;t.urls=_1.urls;t.element=this.AjaxUtils.registerObject(this,_1.id);t.images=t.element.getElementsByTagName("img");t.vAU.addAjaxHandler(t,t.onPage,"Page.filterOptions");},click:function(id){this.vAU.sendRequest("Page",this.urls[id],true);return false;},onPage:function(_4){var _5=_4.response.filterOptions;if(_5){return this.loadState(_5);}},loadState:function(_6){var t=this,states=_6.states;var _8=states.length;for(var _9=0;_9<_8;_9++){var _a=states[_9];t.urls[_9]=_a.url;t.images[_9].src=(_a.selected)?t.model.onPics[_9]:t.model.offPics[_9];}}}).endType();
vjo.ctype("vjo.darwin.domain.finding.locationpopup.LocationForm").needs(["vjo.dsf.Element","vjo.dsf.utils.UriBuilder"]).protos({H:vjo.dsf.utils.Handlers,vAU:vjo.darwin.domain.finding.ajax.AjaxUtils,AjaxRequest:vjo.darwin.domain.finding.ajax.AjaxRequest,AjaxResponse:vjo.darwin.domain.finding.ajax.AjaxResponse,AjaxThrobber:vjo.darwin.domain.finding.ajax.AjaxThrobber,UriBuilder:vjo.dsf.utils.UriBuilder,constructs:function(_1){var t=this,vE=vjo.dsf.Element;t.mdl=_1;t.elem=vE.get(_1.cmpId);t.cncl=t.vAU.getTag(t.elem,"a","cncl");t.cl=t.vAU.getTag(t.elem,"select","slct");t.z=t.vAU.getTag(t.elem,"input","zip");t.zt=t.vAU.getTag(t.elem,"div","zipon");t.error=t.vAU.getTag(t.elem,"div","erroff");t.save=vE.get("loc_pop_sav_btn");t.ajaxUrl=t.mdl.baseUrl;t.vAU.addEventHandler(t,t.z,"keypress",t.onEnter);t.vAU.addEventHandler(t,t.z,"focus",t.clearZip);t.vAU.addEventHandler(t,t.cncl,"click",t.onCancel);t.vAU.addEventHandler(t,t.save,"click",t.onSave);t.vAU.addEventHandler(t,t.cl,"change",t.onChange);t.vAU.addRequestHandler(t,t.onClosed,t.mdl.closedPanelService);t.H.attachSvcReqt("POP_LOC_DLG",t.onOpen,t);},init:function(_3,_4){var ds=_3.selectedValue,ms=-1;if(_4){if(!_4.zip){this.z.className="zipgray";this.z.value=_4.defaultZipText||"";}else{this.z.value=_4.zip;}
ms=_4.country;}
var _6=_3.countries;var sv=(ds!=ms&&ms>0)?ms:(ds>0)?ds:1;if(_6&&_6.length>0){var _8=_6.length;for(var i=0;i<_8;i++){var _a=_6[i];var _b=new Option(_a.name,_a.value);if(i==0){this.setZip(_a.zipOn);}
if(_a.value==sv){_b.selected=true;this.setZip(_a.zipOn);}
this.cl.options[i]=_b;}}},setZip:function(_c){if(_c){this.z.disabled=false;this.zt.className="zipon";}else{this.z.value="";this.z.disabled=true;this.zt.className="zipoff";}
this.error.className="erroff";},onChange:function(){var _d=this.cl.selectedIndex;if(this.loadedData&&_d>-1){var _e=this.loadedData.countries[_d];this.setZip(_e.zipOn);}},onEnter:function(_f){if(_f.keyCode==13){this.onSave();return false;}},clearZip:function(_c){if(this.z&&this.z.className=="zipgray"){this.z.value="";this.z.className="zip";}},onSave:function(){var _11=new this.UriBuilder(this.ajaxUrl,true);delete _11.params["_fcid"];delete _11.params["_stpos"];delete _11.params["_localstpos"];_11.appendParam("_fcid",this.getCtry());_11.appendParam("_stpos",this.z.value);_11.appendParam("_localstpos",this.z.value);var _12=new this.AjaxRequest("Request",_11.getUri());var _13=new this.AjaxResponse(_12,this,this.onResponse).load();},getCtry:function(){var idx=this.cl.selectedIndex;if(idx>-1){var opt=this.cl.options[idx];if(opt){return opt.value;}}
return"";},onCancel:function(){this.H.handle(this.H.newMsg(this.mdl.closePanelService));},onClosed:function(){this.AjaxThrobber.hide("Page",true);},onOpen:function(msg){this.AjaxThrobber.show("Page",this.elem,false,true);if(msg.clientContext.meta){this.meta=msg.clientContext.meta;}
this.H.handle(this.H.newMsg(this.mdl.openPanelService));this.loadData(msg.model);},loadData:function(_17){this.popForm(this.meta,_17);},onResponse:function(_18){if(_18.response.errors&&_18.response.errors.length>0){var _19=_18.response.errors;for(var i=0;i<_19.length;i++){alert(_19[0].message);return false;}}
var _1b=_18.response.objects;var _1c=_1b.respCode;switch(_1c){case"responseSuccess":this.onSuccess(_1b);break;case"responseShowError":this.showError(_1b);break;case"responsePopulateForm":this.popForm(_1b);break;}},onSuccess:function(_1d){if(_1d.newUrl){this.onCancel();var uri=new vjo.dsf.utils.UriBuilder(_1d.newUrl);delete uri.params["gbr"];uri.appendParam("gbr",1);document.location.href=uri.getUri();}},showError:function(_1f){this.error.className="erron";},popForm:function(_20,_21){this.loadedData=_20;this.clear();this.init(_20,_21);},clear:function(){var _22=this.cl.options;while(_22.length>0){_22[_22.length-1]=null;}}}).endType();
vjo.ctype("vjo.darwin.domain.finding.component.relatedsearches.RelatedSearches").needs(["vjo.dsf.Element","vjo.dsf.utils.Handlers"]).protos({constructs:function(_1){var vE=vjo.dsf.Element;var t=this;if(_1.refinedListId!=null){t.rList=vE.get(_1.refinedListId);t.registerEvent(t.rList);}
if(_1.alternativeListId!=null){t.aList=vE.get(_1.alternativeListId);t.registerEvent(t.aList);}
if(_1.refinedAlternativeListId!=null){t.raList=vE.get(_1.refinedAlternativeListId);t.registerEvent(t.raList);}},registerEvent:function(_4){if(_4!=null){var _5=_4.getElementsByTagName("a");var vH=vjo.dsf.utils.Handlers;var _7=_5.length;for(var i=0;i<_7;i++){vH.attachEvt(_5[i],"click",this.onClickLink,this);}}},onClickLink:function(_9){var a=_9.target||_9.srcElement;a.href+=a.href.indexOf("?")==-1?"?frs=1":"&frs=1";return true;}}).endType();
vjo.ctype("vjo.darwin.domain.finding.promo.PromoAjaxEnabler").needs("vjo.darwin.domain.finding.ajax.AjaxUtils").props({AjaxUtils:vjo.darwin.domain.finding.ajax.AjaxUtils,addAjaxHandler:function(){this.AjaxUtils.addAjaxHandler(this,this.onAjaxPage,"Page.promoRequest",document.body);},onAjaxPage:function(_1){var _2=_1.response.promoRequest;var _3=vjo.Registry.get("PromoClient");if((_2!=null)&&(_2.url!=this.request.url)){_3.loadRequest(_2);}}}).endType();
vjo.ctype("vjo.darwin.domain.motors.locationdialog.LocationDialog").needs(["vjo.dsf.Message","vjo.dsf.Element","vjo.dsf.utils.Object","vjo.dsf.utils.Handlers","vjo.dsf.utils.UriBuilder"]).protos({vSE:vjo.dsf.ServiceEngine,vED:vjo.dsf.EventDispatcher,H:vjo.dsf.utils.Handlers,constructs:function(_1,_2){var vE=this.vE=vjo.dsf.Element;var c=this.oModel=_1;this.msg=_2;var t=this;t.msg.clientContext={};t.msg.clientContext.svcApplier=t;this.baseAjaxUrl=t.msg.svcConfig.url;this.oErrorDiv=vE.get(c.errorDivID);this.oCountryList=vE.get(c.countryListID);this.oZipInput=vE.get(c.zipInputID);this.oZipLabel=vE.get(c.zipLabelID);},linkClickHandler:function(_6){var _7=new vjo.dsf.Message(this.oModel.openPanelServiceName);_7.clientContext={};_7.clientContext.elem=_6.clientContext.elem;_7.returnData=false;if(vjo.dsf.ServiceEngine){vjo.dsf.ServiceEngine.handleRequest(_7);}
this.meta=_6.clientContext.meta;this.loadData();},getAjaxMessage:function(_8){var t=this;var m=t.H.newMsg(t.msg.svcId);m.clientContext=t.msg.clientContext;m.svcConfig=t.msg.svcConfig;m.svcConfig.url=this.baseAjaxUrl;m.trspType=t.msg.trspType;m.request={};m.request.reqType=_8;return m;},loadData:function(){var _b=this.getAjaxMessage("LoadData");if(this.meta){_b.request.country=this.meta.country;}
this.vSE.handleRequest(_b);},onResponse:function(_c){if(_c.response.errors&&_c.response.errors.length>0){var _d=_c.response.errors;var _e=_d.length;for(var i=0;i<_e;i++){return;}}
var _10=_c.response.data;var _11=_10.respCode;switch(_11){case"responseSuccess":this.responseSuccess(_10);break;case"responseShowError":this.responseShowError(_10);break;case"responsePopulateForm":this.responsePopulateForm(_10);break;}},responseSuccess:function(_12){if(this.meta.url){this.H.handle(this.H.newMsg("modal_location_dialog_closeSvc"));var uri=new vjo.dsf.utils.UriBuilder(this.meta.url);delete uri.params["_stpos"];delete uri.params["_fcid"];delete uri.params["gbr"];uri.appendParam("_stpos",this.oZipInput.value);uri.appendParam("_fcid",this.select_getSelectedValue(this.oCountryList));uri.appendParam("gbr",1);document.location.href=uri.getUri();}},responseShowError:function(_14){this.showError(true);},responsePopulateForm:function(_15){if(this.meta){this.oZipInput.value=this.meta.zip||"";}
var _16=_15.countries;this.showError(false);this.iSpotArray=new Array();this.select_clearOptions(this.oCountryList);var _17=_16.length;for(var i=0;i<_17;i++){var _19=_16[i];this.select_createOption(this.oCountryList,_19.value,_19.name);if(_19.zipOn){this.iSpotArray[this.iSpotArray.length]=_19.value;}}
this.select_selectByValue(this.oCountryList,_15.selectedValue);this.element_enable(this.oCountryList,true);this.onCountryChange();},onCountryChange:function(){var _1a=false;var _1b=this.select_getSelectedValue(this.oCountryList);var _1c=this.iSpotArray.length;for(var i=0;i<_1c;i++){if(this.iSpotArray[i]==_1b){_1a=true;}}
if(!_1a){this.element_enable(this.oZipInput,false);this.element_setClass(this.oZipInput,this.oModel.zipInputDisableClass);this.element_setClass(this.oZipLabel,this.oModel.zipLabelDisableClass);this.element_setStyle(this.oErrorDiv,"display","none");}else{this.element_enable(this.oZipInput,true);this.element_setClass(this.oZipInput,"");this.element_setClass(this.oZipLabel,this.oModel.zipLabelNormalClass);this.element_setStyle(this.oErrorDiv,"display","none");}},onFormSubmit:function(){var msg=this.getAjaxMessage("Save");msg.request.zipCode=this.oZipInput.disabled?"":this.oZipInput.value;if(this.meta){msg.request.baseUrl=this.meta.url;}
msg.request.country=this.select_getSelectedValue(this.oCountryList);this.vSE.handleRequest(msg);return false;},onInputSubmitForm:function(evt){var k=evt?evt.nativeEvent.keyCode:window.event.keyCode;if(k==13){this.onFormSubmit();}},showError:function(_21){if(_21){this.element_setStyle(this.oErrorDiv,"display","block");this.element_setStyle(this.oErrorDiv,"visibility","visible");this.element_setClass(this.oZipLabel,this.oModel.zipLabelErrorClass);}else{this.element_setStyle(this.oErrorDiv,"display","none");this.element_setStyle(this.oErrorDiv,"visibility","hidden");this.element_setClass(this.oZipLabel,this.oModel.zipLabelNormalClass);}},select_clearOptions:function(_22){if(_22){var _23=_22.options;while(_23.length>0){_23[_23.length-1]=null;}}},select_createOption:function(_24,_25,_26){if(_24){var _27=new Option(_26,_25,false,false),opts=_24.options;opts[opts.length]=_27;}},select_selectByValue:function(_28,_29){if(_28){var e=_28,o,rv=false,opts=e.options,len=opts.length;for(var i=0;i<len&&!rv;i++){o=opts[i];if(o.value==_29){e.selectedIndex=i;rv=true;}}}},select_getSelectedValue:function(_2c){if(_2c){var idx=_2c.selectedIndex;if(idx>-1){var opt=_2c.options[idx];if(opt){return opt.value;}}}
return"";},element_enable:function(_2f,_30){if(_2f){_2f.disabled=!_30;}},element_setClass:function(_31,_32){if(_31){_31.className=_32;}},element_setStyle:function(_33,_34,_35){if(_33&&!_33.length){if(_35!=null){_33.style[_34]=_35;}
return _33.style[_34];}}}).endType();
vjo.ctype("vjo.darwin.core.button.Button").needs("vjo.dsf.Element","E").needs("vjo.dsf.Message","M").needs("vjo.dsf.ServiceEngine","S").needs("vjo.dsf.client.Browser").needs("vjo.dsf.EventDispatcher","ED").protos({m:null,state:null,dCls:null,O:null,constructs:function(m){var t=this;t.m=m;t.state="";var Sc=m.scope;t.dCls=Sc+"-b "+"moz "+Sc+"-b";t.Cls=[{"mouseup":[0,""],"mousedown":[0,"p"],"mouseout":[0,""],"mouseover":[0,"o"],"focus":[1,"o"],"blur":[1,""],"entrue":"d","enfalse":""}];t.O=[];t.init();},init:function(){var t=this,D=t.vj$.ED,O=t.get();D.addEventListener(window,"load",function(){t.enDis(t.m.dis);},window);for(var i in t.Cls[0]){var V=O[t.Cls[0][i][0]];if(V){D.addEventListener(V,i,t.handler(i),t);}}},handler:function(eT){var t=this;return function(){t.changeState({"eventType":eT});};},get:function(){var t=this,E=t.vj$.E,m=t.m;if(t.O.length==0){t.O.push(E.get(m.SId),E.get(m.BId),E.get(m.LId));}
return t.O;},changeState:function(e){var t=this,O=t.get(),eT=e.eventType;if((O[1].disabled||O[0].className.indexOf("-bd")!=-1)||(t.state=="mousedown"&&eT=="focus")){return;}
t.state=eT;O[0].className=t.dCls+t.Cls[0][eT][1]+" "+t.m.BT;},enable:function(){this.enDis(false);},disable:function(){this.enDis(true);},isDisabled:function(){return this.m.dis;},enDis:function(_c){var t=this,N="none",E=t.vj$.E,m=t.m,O=t.get(),b=O[1],bS=b.style,tS=(O[2])?O[2].style:"",B=vjo.dsf.client.Browser.bIE;O[0].className=t.dCls+t.Cls[0]["en"+_c]+" "+t.m.BT;t.m.dis=_c;if(m.tp!==2){b.disabled=_c;}else{b.display=(_c)?N:"";}
if(!B&&m.tp!=2){return;}
if(_c){tS.display="inline-block";if(!B){tS.display="-moz-inline-box";b.style.setProperty("display","none","important");}
bS.display=N;}else{tS.display=N;bS.display="";}}}).props({enable:function(_e){var o=vjo.Registry.get(_e);if(o){o.enable();}},disable:function(ins){var o=vjo.Registry.get(ins);if(o){o.disable();}},onSubmit:function(_12,evt,_14){this.sendMessage(_12,evt);return(!_14&&_14==false)?false:true;},sendMessage:function(_15,evt){var o=this.vj$,msg=new o.M(_15);msg.event=evt;o.S.handleRequest(msg);}}).endType();
vjo.ctype("vjo.darwin.domain.finding.sortnavigation.SortNavigation").needs("vjo.darwin.domain.finding.ajax.AjaxUtils").protos({AjaxUtils:vjo.darwin.domain.finding.ajax.AjaxUtils,constructs:function(_1){this.oForm=document.forms[_1.formName];this.oMenu=this.AjaxUtils.registerObject(this,_1.menuName);this.AjaxUtils.addEventHandler(this,this.oMenu,"change",this.change);this.loadState(_1.state);},loadState:function(_2){this.aUrls=_2.urls;this.sBaseUrl=_2.baseUrl;this.oMenu.selectedIndex=_2.selectedIndex;if(_2.flag&&(_2.shippingInfo!=null)){var _3=vjo.darwin.domain.finding.locationpopup.LocationPopupLink;if(_3){_3.onAction("POP_LOC_DLG",_2.shippingInfo);}}},change:function(){var _4=this.sBaseUrl+this.aUrls[this.oMenu.selectedIndex];var _5=this.AjaxUtils.getAjaxManager("Page");if(_5==null){this.oForm.action=_4;this.oForm.submit();}else{this.AjaxUtils.sendRequest("Page",_4,true);}}}).endType();
vjo.ctype("vjo.darwin.domain.motors.locationdialog.link.LocationDialogLink").needs("vjo.dsf.Message").satisfies("vjo.dsf.common.IJsHandler").protos({constructs:function(_1,_2){this.serviceId=_1;this.oModel=_2;},handle:function(_3){var _4=new vjo.dsf.Message(this.serviceId);_4.clientContext={};_4.clientContext.elem=_3.src;_4.clientContext.meta=this.oModel;_4.returnData=false;return _4;}}).endType();
vjo.ctype("vjo.com.ebay.darwin.app.motors.component.productsnapshot.ProductSnapshot").needs("vjo.darwin.domain.finding.ajax.AjaxUtils").protos({AjaxUtils:vjo.darwin.domain.finding.ajax.AjaxUtils,constructs:function(_1){this.model=_1;this.tabID=_1.tabID;this.priceResearchID=_1.priceResearchID;this.viewSelectorID=_1.viewSelectorID;var _2=document.getElementById(this.tabID);this.AjaxUtils.addAjaxHandler(this,this.onPage,"Page.productSnapshot",_2);},onPage:function(_3){var _4=_3.response.productSnapshot;if(_4){this.setTabLinks(_4.tabLinks);this.setPriceResearchLink(_4.tabLinks[3]);this.setViewSelector(_4.viewSelector);}},setTabLinks:function(_5){if(_5){var _6=document.getElementById(this.tabID);var ul=_6.getElementsByTagName("ul")[0];var _8=_5.length;for(var _9=1;_9<_8;_9++){ul.getElementsByTagName("li")[_9].getElementsByTagName("a")[0].href=_5[_9];}}},setPriceResearchLink:function(_a){if(_a){var _b=document.getElementById(this.priceResearchID);if(_b){_b.getElementsByTagName("a")[0].href=_a;}}},setViewSelector:function(vs){if(vs){var _d=document.getElementById(this.viewSelectorID);if(_d){_d.innerHTML=vs;}}},submitYear:function(){document.location.href=this.model.baseUrl+(this.model.baseUrl.indexOf("?")>0?"&":"?")+this.model.yearParam+"="+document.getElementById(this.model.selectId).value;},scrollToResultSet:function(){window.scrollTo(0,vjo.dsf.window.utils.VjWindowUtils.offsetTop(document.getElementById("ff_left"))-10);return false;}}).endType();
vjo.ctype("vjo.com.ebay.darwin.app.motors.component.productsnapshot.savedialog.Savedialog").needs(["vjo.dsf.Element","vjo.dsf.EventDispatcher","vjo.dsf.ServiceEngine"]).protos({constructs:function(_1){this.model=_1;this.vE=vjo.dsf.Element;this.oC=_1||{};var c=this.oC;if(c.saveURL==null){}else{this.saveurl=c.saveURL;}
this.timeoutTime=c.timeOutPeriod;this.ontimeout=this.timeoutDialog;this.serviceId=c.serviceId;this.signedOn=c.isSignedOn;window.Motors2SaveLinkResponse=this.Motors2SaveLinkResponse;var _3=vjo.dsf.EventDispatcher;this.eBtn=this.vE.get(_1.btnId);if(this.eBtn){_3.addEventListener(this.eBtn,"click",this.callFromDialog,this);}},openDialog:function(){vjo.dsf.ServiceEngine.handleRequest(new vjo.dsf.Message(this.serviceId));},saveVehiclePsedoAjaxCall:function(){this.script=vjo.dsf.Element.createElement("script");this.script.type="text/javascript";this.script.charset="utf-8";this.timer=window.setTimeout(this.ontimeout,this.timeoutTime);this.script=document.body.appendChild(this.script);this.script.src=this.saveurl;},clearSaveVehicleDialog:function(_4){window.clearTimeout(this.timer);document.body.removeChild(this.script);return false;},timeoutDialog:function(){try{this.clearSaveVehicleDialog("Time Out");}
catch(e){}},callFromDialog:function(){var vE=this.vE;this.idEmailMeCHk1=vE.get(this.model.emailId);this.idEmailSelect1=vE.get(this.model.emailDurId);this.idOwnthis1=vE.get(this.model.ownThisId);this.idAlredayOwned1=vE.get(this.model.ownItId);var _6="&emailMe=";if(this.idEmailMeCHk1.checked==1){_6+="1";}else{_6+="2";}
_6+="&ownIt=";if(this.idOwnthis1.checked){_6+=this.idOwnthis1.value;}else{_6+=this.idAlredayOwned1.value;}
_6+="&emailDuration="+this.idEmailSelect1.options[this.idEmailSelect1.selectedIndex].value;if(this.signedOn=="true"){this.saveurl+="&tr=1"+_6;try{this.saveVehiclePsedoAjaxCall();}
catch(e){this.clearSaveVehicleDialog("Got exception while making psedu ajax call. Clearing now");}}else{if(this.signedOn=="false"){this.saveurl+="&tr=2"+_6;document.location.href=this.saveurl;}}
var _7=new vjo.dsf.Message(this.model.retireSrv);_7.isRetire=true;vjo.dsf.ServiceEngine.handleRequest(_7);return false;},Motors2SaveLinkResponse:function(_8){var vE=vjo.dsf.Element;var _a;var _b=vE.get("SaveVehicle_msg1");var _c=vE.get("SaveVehicle_msg2");var _d=vE.get("SaveVehicle_msg3");_b.style.display="none";_b.style.visibility="hidden";_c.style.display="none";_c.style.visibility="hidden";_d.style.display="none";_d.style.visibility="hidden";switch(_8){case 1:_a=vE.get("SaveVehicle_msg1");break;case 3:_a=vE.get("SaveVehicle_msg2");break;case 4:_a=vE.get("SaveVehicle_msg2");break;default:_a=vE.get("SaveVehicle_msg3");break;}
if(_a){_a.style.display="block";_a.style.visibility="visible";}
this.clearSaveVehicleDialog("Clearing now");},hideMsg:function(_e){var vE=vjo.dsf.Element;msgElem=vE.get(_e);if(!msgElem){return;}
msgElem.style.display="none";msgElem.style.visibility="hidden";}}).endType();
vjo.ctype("vjo.darwin.core.pulldowndialog1.PulldownDialog").needs("vjo.dsf.Element","E").needs("vjo.darwin.core.overlaypanel3.OverlayPanel","OP").protos({E:vjo.dsf.Element,O:null,OP:vjo.darwin.core.overlaypanel3.OverlayPanel,mnu:null,c:null,constructs:function(_1,_2){var t=this,om=t.c=_1||{},J=t.J=t.vj$;t.E=J.E;t.O=_2;t.mnu=t.E.get(om.cntId);t.OP=t.vj$.OP;},openPanel:function(_4){var t=this,m=t.c,mnu=t.mnu;if(t.content){mnu=t.content;}
t.OP.olpMsg(m.opId,_4,mnu,t.O);return false;},close:function(){this.OP.olpMsg(this.c.ocId);},setContent:function(o){this.content=o;}}).endType();
vjo.ctype("vjo.darwin.domain.finding.quickfinder.QuickFinder").needs(["vjo.dsf.Element","vjo.dsf.EventDispatcher","vjo.dsf.utils.UriBuilder","vjo.darwin.domain.finding.ajax.AjaxUtils"]).protos({AjaxUtils:vjo.darwin.domain.finding.ajax.AjaxUtils,constructs:function(_1){this.model=_1;this.vED=vjo.dsf.EventDispatcher;this.eSearchLinkId=document.getElementById(this.model.searchLinkId);this.eForm=document.getElementById(this.model.formId);this.vED.addEventListener(this.eSearchLinkId,"click",this.onSubmit,this);this.vED.addEventListener(this.eForm,"submit",this.onSubmitForm,this);this.init();this.AjaxUtils.addAjaxHandler(this,this.onPageResponse,this.binding="Page.quickfinder");},init:function(){this.initMakeModel();this.initModelYear();this.initPrice();this.initDistance();},initMakeModel:function(){this.hasBindMakeModel=false;var _2=false;if(this.model.makeHtmlId&&this.model.modelHtmlId&&this.model.modelLabelHtmlId){_2=true;}
if(_2){this.eMake=document.getElementById(this.model.makeHtmlId);this.eModel=document.getElementById(this.model.modelHtmlId);this.eModelLabel=document.getElementById(this.model.modelLabelHtmlId);if(this.eMake&&this.eModel&&this.eModelLabel&&this.model.models){this.hasBindMakeModel=true;}
var _3=this.eMake.selectedIndex;var _4=this.eModel.selectedIndex;if(_3<=0){this.eModelLabel.className=this.model.disableClzName;this.eModel.disabled=true;}else{this.eModelLabel.className="";this.eModel.disabled=false;}
if(!(_3>0&&_4>0)){this.onChangeMake();}}
if(this.hasBindMakeModel){this.vED.addEventListener(this.eMake,"change",this.onChangeMake,this);}},initModelYear:function(){this.hasModelYear=false;if(this.model.modelYearHtmlId){this.eModelYear=document.getElementById(this.model.modelYearHtmlId);if(this.eModelYear){this.hasModelYear=true;}}
if(this.hasModelYear){this.vED.addEventListener(this.eModelYear,"keyup",this.onKeyUpModelYear,this);}},initPrice:function(){this.hasPrice=false;if(this.model.priceTitleHtmlId&&this.model.priceMinHtmlId&&this.model.priceMaxHtmlId){this.ePriceTitle=document.getElementById(this.model.priceTitleHtmlId);this.ePriceMin=document.getElementById(this.model.priceMinHtmlId);this.ePriceMax=document.getElementById(this.model.priceMaxHtmlId);if(this.ePriceTitle&&this.ePriceMin&&this.ePriceMax){this.hasPrice=true;}}
if(this.hasPrice){this.vED.addEventListener(this.ePriceMin,"keyup",this.onKeyUpPrice,this);this.vED.addEventListener(this.ePriceMax,"keyup",this.onKeyUpPrice,this);}},initDistance:function(){this.hasDistance=false;if(this.model.distanceHtmlId&&this.model.zipHtmlId&&this.model.distanceTitleHtmlId){this.eDistance=document.getElementById(this.model.distanceHtmlId);this.eZip=document.getElementById(this.model.zipHtmlId);this.eDistanceTitle=document.getElementById(this.model.distanceTitleHtmlId);if(this.eDistance&&this.eZip&&this.eDistanceTitle){this.hasDistance=true;}}
if(this.hasDistance){this.vED.addEventListener(this.eZip,"keyup",this.onKeyUpDistance,this);}},onKeyUpModelYear:function(_5){if(_5.keyCode==13){this.onSubmit(_5);}
return false;},onKeyUpPrice:function(_6){if(_6.keyCode==13){this.onSubmit(_6);}
return false;},onKeyUpDistance:function(_7){if(_7.keyCode==13){this.onSubmit(_7);}
return false;},onSubmitForm:function(_8){return false;},onChangeMake:function(_9){var _a=this.eMake.selectedIndex;if(_a<=0){this.eModelLabel.className=this.model.disableClzName;this.eModel.disabled=true;}else{this.eModelLabel.className="";this.eModel.disabled=false;}
if(this.model.models){if(_a>=this.model.models.length){return;}
var _b=this.model.models[_a];if(!_b){return;}
if(_b.length<=0){return;}
var _c=this.eModel.options;while(_c.length>0){_c[_c.length-1]=null;}
var _d=_b.split("^");var _e=_d.length;for(var i=0;i<_e;i++){if(_d[i]&&_d[i].length>0){var nv=_d[i].split("|");if(nv&&(nv.length==1||nv.length==2)){var _11=(nv.length==1)?nv[0]:nv[1];var _12;if(i==0){_12=new Option(nv[0],_11,false,true);}else{_12=new Option(nv[0],_11,false,false);}
_c[_c.length]=_12;}}}}},checkPriceError:function(){var _13=this.ePriceMin.value;var _14=this.ePriceMax.value;if(_13){if(!this.checkPriceFormat(_13)){return true;}}
if(_14){if(!this.checkPriceFormat(_14)){return true;}}
return false;},checkPriceFormat:function(_15){var _16=_15.match("^[0-9]*$|^[0-9]*[.][0-9]{1,4}$|^[0-9]{1,3}[,][0-9]{3}$|^[0-9]{1,3}[,][0-9]{3}[.][0-9]{1,4}$|^[0-9]{1,3}[,][0-9]{3}[,][0-9]{3}$|^[0-9]{1,3}[,][0-9]{3}[,][0-9]{3}[.][0-9]{1,4}$|^[0-9]{1,3}[,][0-9]{3}[,][0-9]{3}[,][0-9]{3}$|^[0-9]{1,3}[,][0-9]{3}[,][0-9]{3}[,][0-9]{3}[.][0-9]{1,4}$");if(_16==null){return false;}else{return true;}},showPriceErrorMessage:function(_17){if(!this.ePriceErr){if(!this.model.priceErrId){return;}
this.ePriceErr=document.getElementById(this.model.priceErrId);if(!this.ePriceErr){return;}}
if(_17){this.ePriceTitle.className=this.model.redClzName;this.ePriceErr.style.display="block";}else{this.ePriceTitle.className="";this.ePriceErr.style.display="none";}},checkAll:function(){var _18=false;if(this.hasPrice){_18=this.checkPriceError();this.showPriceErrorMessage(_18);}
if(_18){return false;}else{return true;}},hasSelectValue:function(_19,_1a){if(_19){var _1b=_19.length;for(var i=0;i<_1b;i++){var _1d=_19[i].name;if(_1d==_1a){var _1e=_19[i].value;if(_1e&&_1e!="-1"){return true;}}}}
return false;},onSubmit:function(_1f){if(!this.checkAll()){return false;}
var _20=new vjo.dsf.utils.UriBuilder(this.model.baseUrl,true);if(this.hasModelYear){var _21=this.eModelYear.name;delete _20.params[_21];delete _20.params[this.model.modelYearInputParam];var _22=this.eModelYear.value;if(_22){_20.appendParam(this.model.modelYearInputParam,_22);}}
if(this.hasPrice){var _23=this.ePriceMin.name;var _24=this.ePriceMax.name;delete _20.params[_23];delete _20.params[_24];delete _20.params[this.model.priceRangeParam];var _25=this.ePriceMin.value;var _26=this.ePriceMax.value;if(_25){_20.appendParam(_23,_25);}
if(_26){_20.appendParam(_24,_26);}
if(_25||_26){_20.appendParam(this.model.priceRangeParam,"1");}}
if(this.eZip){var _27=this.eZip.name;delete _20.params[_27];var _22=this.eZip.value;if(_22&&_22!=""){_20.appendParam(_27,_22);if(this.eDistance){var _28=this.eDistance.name;delete _20.params[_28];var _29=this.eDistance.value;delete _20.params[this.model.lsbxParam];_20.appendParam(this.model.lsbxParam,"0");if(this.eDistance.selectedIndex==0){delete _20.params[this.model.fsptParam];delete _20.params[this.model.flsoParam];_20.appendParam(this.model.fsptParam,"0");_20.appendParam(this.model.flsoParam,"0");}else{delete _20.params[this.model.fsptParam];delete _20.params[this.model.lsotParam];_20.appendParam(this.model.fsptParam,"1");_20.appendParam(this.model.lsotParam,"1");}
if(_29!="-1"){_20.appendParam("LH_Distance",_22.concat("..",_29));}}}}
var _2a=this.eForm.getElementsByTagName("select");if(_2a){var _2b=_2a.length;for(var i=0;i<_2b;i++){var _21=_2a[i].name;if(_21){delete _20.params[_21];var _22=_2a[i].value;if(_22){if(_22!="-1"){_20.appendParam(_21,_22);}}}}}
document.location.href=_20.getUri();return false;},onPageResponse:function(_2d){var _2e=this.AjaxUtils.getResponse(_2d.response,this.binding);if(this.AjaxUtils.isUndefined(_2e)){return;}
var _2f=_2e;this.model.baseUrl=_2f.baseUrl;if(_2f.clearUrl){if(this.model.clearLinkId){var _30=document.getElementById(this.model.clearLinkId);if(_30){_30.href=_2f.clearUrl;}}}
if(this.hasDistance){var _31=(_2f.radius)?_2f.radius:"-1";var _32=this.eDistance;var _33=_32.options.length;for(var i=0;i<_33;i++){if(_31==_32.options[i].value){_32.options[i].selected=true;}else{_32.options[i].selected=false;}}
if(_2f.zipcode){this.eZip.value=_2f.zipcode;}else{this.eZip.value="";}}}}).endType();
vjo.ctype("vjo.darwin.core.moduletab.TabProperties").needs("vjo.Registry").needs("vjo.darwin.core.utils.ServiceUtils","SU").needs("vjo.dsf.Message","M").protos({RG:vjo.Registry,constructs:function(_1){var RG=this.RG,m=_1;var t=this;t.hN=m.htmlName;t.iId=m.id;t.sUrl=m.url;t.bIsActive=m.active;t.bIsHighlighted=m.highlighted;t.bIsAjaxEnabled=m.ajaxEnabled;t.clkSvcId=m.clkSvcId;var _n=RG.get(t.hN);if(_n!==null){var _5=_n.aTabs;_5[_5.length]=t;}
t.bindEventsInJS();t.attachEventListner(t.hN,t.clkSvcId);},bindEventsInJS:function(){var t=this,vjEd=vjo.dsf.EventDispatcher,_tProp=vjo.darwin.core.moduletab.TabProperties;var _7=t.hN+"_tab_rgt_"+t.iId,tbL=t.hN+"_tab_lft_"+t.iId,tb=t.hN+"_"+t.iId;if(t.sUrl===null){t.sUrl="";}
var _f=function(_9){return _tProp.switchToTab(t.hN,t.iId,_9,t.clkSvcId);};vjEd.add(tbL,"click",_f);vjEd.add(_7,"click",_f);vjEd.add(_7,"mouseover",function(_a){return _tProp.hoverChange(t.hN,t.iId,true);});vjEd.add(_7,"mouseout",function(_b){return _tProp.hoverChange(t.hN,t.iId,false);});},attachEventListner:function(_c,_d){var t=vjo.darwin.core.moduletab.TabProperties,fn=function(){t.initializer(_c,_d);};vjo.dsf.EventDispatcher.addEventListener(window,"load",fn);}}).props({tLft:"_tab_lft_",tRgt:"_tab_rgt_",tCnt:"_content_",tCurrId:"CurrId",E:vjo.dsf.Element,R:vjo.Registry,switchToTab:function(_f,_10,_11,_12){var t=this,ob=t.vj$,pTab=t.R.get(_f),pArrTab=pTab.aTabs,hid=t.E.get(_f+t.tCurrId),currId=(hid)?hid.value:1,from,to;for(var i=0;i<pArrTab.length;i++){if(currId==pArrTab[i].iId){from=i;}
if(_10==pArrTab[i].iId){to=i;}}
var tp=vjo.darwin.core.moduletab.TabProperties;var _16=_f+t.tRgt+pArrTab[from].iId,fTbL=_f+t.tLft+pArrTab[from].iId;var _17=_f+t.tRgt+pArrTab[to].iId,tTbL=_f+t.tLft+pArrTab[to].iId;if(!pArrTab){return;}
if(pArrTab[to].bIsActive===true||pArrTab[to].iId!=_10||pArrTab[to].dsbl==true){return;}
var rt=this.E.get(_17),url=pArrTab[to].sUrl;if(_11&&(!pArrTab[to].bIsAjaxEnabled)&&(url&&url.length>1&&url.toLowerCase().indexOf("javascript")<0)){var src=_11.nativeEvent.target?_11.nativeEvent.target:_11.nativeEvent.srcElement;if(src.tagName.toLowerCase()==="a"){src.blur();return;}
document.location.href=pArrTab[to].sUrl;return;}
if(hid){hid.value=_10;}
tp.setTabs(_10,pArrTab[from],_f,pTab,_12);tp.setTabs(_10,pArrTab[to],_f,pTab,_12);},sendMsg:function(_1a,tb,rTb,lTb,url,cnt){var t=this,SU=t.vj$.SU,msg=SU.gM(_1a);msg.tb=tb;msg.rTb=rTb;msg.lTb=lTb;msg.url=url;msg.cnt=cnt;SU.sndM(msg);},setClz:function(_21,_22){var el;el=this.E.get(_21);if(el){el.className=_22;}},setBkgColor:function(_24,_25){var el;el=this.E.get(_24);if(el){el.style.backgroundColor=_25;}},initializer:function(_27,_28){var t=this,pTab=t.R.get(_27),pArrTab=pTab.aTabs,tp=vjo.darwin.core.moduletab.TabProperties,hid=t.E.get(_27+tp.tCurrId),currId=(hid)?hid.value:1,to;for(var i=0;i<pArrTab.length;i++){if(currId==pArrTab[i].iId){to=i;break;}}
if(pArrTab){if(pArrTab[to].bIsActive===true||pArrTab[to].dsbl==true){return;}
for(var i=0;i<pArrTab.length;i++){tp.setTabs(currId,pArrTab[i],_27,pTab,_28);}}},setTabs:function(_2b,_2c,_2d,_2e,_2f){var t=vjo.darwin.core.moduletab.TabProperties;var _31=_2d+t.tRgt+_2c.iId,fTbL=_2d+t.tLft+_2c.iId,tTcnt=_2d+t.tCnt+_2c.iId,url=_2c.sUrl;if(_2b==_2c.iId){_2c.bIsActive=true;if(_2f){t.sendMsg(_2f,_2b,_31,fTbL,url,tTcnt);}
if(_2e.sActiveBkgColor!==null){t.setBkgColor(fTbL,_2e.sActiveBkgColor);t.setBkgColor(_31,_2e.sActiveBkgColor);}
t.setClz(fTbL,_2e.sactiveLft);t.setClz(_31,_2e.sactiveRgt);t.setClz(_2d+t.tCnt+_2c.iId,_2e.stabcontentOuterOn);}else{_2c.bIsActive=false;t.setBkgColor(fTbL,"");t.setBkgColor(_31,"");if(_2c.bIsHighlighted===true){t.setClz(fTbL,_2e.shighlightLft);t.setClz(_31,_2e.shighlightRgt);}else{t.setClz(fTbL,_2e.sinactiveLft);t.setClz(_31,_2e.sinactiveRgt);}
t.setClz(_2d+t.tCnt+_2c.iId,_2e.stabcontentOuterOff);}},hoverChange:function(_32,_33,_34){var _35=this.R.get(_32),tp=vjo.darwin.core.moduletab.TabProperties,pArrTab=_35.aTabs,to;for(var i=0;i<pArrTab.length;i++){if(pArrTab[i].iId==_33){to=i;break;}}
var _37=_32+tp.tRgt+pArrTab[to].iId,tTbL=_32+tp.tLft+pArrTab[to].iId;if(pArrTab){if(pArrTab[to].bIsActive===true||pArrTab[to].dsbl==true){return;}
if(pArrTab[to].bIsHighlighted===true){if(_34===true){tp.setClz(tTbL,_35.shighlightLft+" "+_35.shoverLft);tp.setClz(_37,_35.shighlightRgt+" "+_35.shoverRgt);}else{tp.setClz(tTbL,_35.shighlightLft);tp.setClz(_37,_35.shighlightRgt);}}else{if(_34===true){tp.setClz(tTbL,_35.sinactiveLft+" "+_35.shoverLft);tp.setClz(_37,_35.sinactiveRgt+" "+_35.shoverRgt);}else{tp.setClz(tTbL,_35.sinactiveLft);tp.setClz(_37,_35.sinactiveRgt);}}}}}).endType();
vjo.ctype("vjo.darwin.domain.motors.component.formattabs.MotorsFormatTabs").needs(["vjo.darwin.core.moduletab.TabProperties","vjo.darwin.domain.finding.ajax.AjaxUtils"]).protos({AjaxUtils:vjo.darwin.domain.finding.ajax.AjaxUtils,constructs:function(){this.pageResponse=this.AjaxUtils.addAjaxHandler(this,this.onPageResponse,this.binding="Page.singleFormatTabs");},onPageResponse:function(_1){var _2=this.AjaxUtils.getResponse(_1.response,this.binding);if(this.AjaxUtils.isUndefined(_2)){return;}
this.model=_2;this.selected=this.model.selected;this.setTabLinks();this.switchTabs();var _3=document.getElementById("vpprtm");if(_3){if(this.selected==3){_3.style.display="none";}else{_3.style.display="block";}}},setTabLinks:function(){var _4=this.model.urls;if(_4){var _5=document.getElementById("m2Tabs");var ul=_5.getElementsByTagName("ul")[0];var _7=_4.length;for(var _8=0;_8<_7;_8++){if(_4[_8]){ul.getElementsByTagName("li")[_8].getElementsByTagName("a")[0].href=_4[_8];}else{ul.getElementsByTagName("li")[_8].getElementsByTagName("a")[0].href="javascript:;";}}}},switchTabs:function(){var _9=document.getElementById("m2Tabs");var ul=_9.getElementsByTagName("ul")[0];var _b=ul.getElementsByTagName("li");var _c=_b.length;for(var _d=0;_d<_c;_d++){if(_d==this.selected){_b[_d].className="active";}else{_b[_d].className="";}}}}).endType();
// en_US_AUTOS/e653/Finding_MotorsShowItems_e65310505629_6_en_US_AUTOS
// b=10505629
