
vjo.ctype("vjo.darwin.domain.finding.lisobox.LisoBox").needs(["vjo.darwin.domain.finding.ajax.AjaxUtils"]).protos({ElemUtils:vjo.dsf.Element,AjaxUtils:vjo.darwin.domain.finding.ajax.AjaxUtils,constructs:function(_1){var t=this;t.config=_1;t.aUsingDefaultZip=[];t.eForm=t.AjaxUtils.registerObject(t,_1.formID);},clearZipField:function(id){var t=this,oinput=t.ElemUtils.get(id);var _5=oinput.form.name;var _6=false;if(t.aUsingDefaultZip.length==0){oinput.value="";t.aUsingDefaultZip[t.aUsingDefaultZip.length]=_5;}
var _7=t.aUsingDefaultZip.length;for(var i=0;i<_7;i++){if(t.aUsingDefaultZip[i]==_5){_6=true;}
if(!_6){oinput.value="";t.aUsingDefaultZip[t.aUsingDefaultZip.length]=_5;}}},insertFormelements:function(){var t=this;if(t.eForm){t.checkParameter();t.eForm.submit();}},onSubmitForm:function(){this.checkParameter();},checkParameter:function(){var t=this,tF=t.eForm,tC=t.config;if(tF){if(tF.elements[tC.sadis].selectedIndex==0){if(tC.distSort){tF.elements[tC.lsbx].value="2";}else{tF.elements[tC.lsbx].value="0";}
tF.elements[tC.fspt].value="0";tF.elements[tC.lisoFocusInputID].value="";tF.elements[tC.lisoFocusInputID].disabled=true;tF.elements[tC.flso].value="0";}else{if(tC.distSort){tF.elements[tC.lsbx].value="2";}else{tF.elements[tC.lsbx].value="0";}
tF.elements[tC.fspt].value="1";tF.elements[tC.lisoFocusInputID].value="1";tF.elements[tC.flso].value="";tF.elements[tC.flso].disabled=true;}
var _b=tF.elements[tC.fpos];var _c=tF.elements[tC.sadis];if(_b&&_b.value!=""&&_c&&_c.value!="-1"){if(typeof(tF.elements["LH_Distance"])==="undefined"){var _d=document.createElement("input");_d.type="hidden";_d.name="LH_Distance";tF.appendChild(_d);}
tF.elements["LH_Distance"].value=_b.value.concat("..",_c.value);}}}}).endType();
vjo.ctype("vjo.darwin.domain.finding.item.watch.WatchItem").needs(["vjo.dsf.ServiceEngine","vjo.dsf.EventDispatcher","vjo.dsf.Element"]).protos({constructs:function(_1,_2,_3,_4){var _5=this;_5.link=_2;_5.href=_3;_5.item=_4;_5.control=_1;_5.ontimeout=function(){return _5.timeout();};},watch:function(){var t=this;t.script=vjo.dsf.Element.createElement("script");t.script.type="text/javascript";t.script.charset="utf-8";t.timer=window.setTimeout(t.ontimeout,t.control.timeout);t.script=document.body.appendChild(t.script);t.script.src=t.href.getUri();},clear:function(_7){window.clearTimeout(this.timer);document.body.removeChild(this.script);return false;},timeout:function(){var _8=new vjo.dsf.Message("WATCH_COMPLETE");_8.item=this.item;_8.code=4;vjo.dsf.ServiceEngine.handleRequest(_8);}}).props({WItem:vjo.darwin.domain.finding.item.watch.WatchItem,watchItem:function(_9,_a,_b,_c,_d,_e){var _f=vjo.Registry.get(_a);var _10=vjo.dsf.EventDispatcher.target(_9);if(_f){_f.onWatch(_10,_b,_c,_d,_e);}
return false;},onWatched:function(_11,_12){var _13=new vjo.dsf.Message("WATCH_COMPLETE");_13.item=_11;_13.code=_12;vjo.dsf.ServiceEngine.handleRequest(_13);}}).inits(function(){var _14=this;var _15=this.WItem.watchItem;window.watchItem=function(_16,_17,_18,_19,_1a,_1b){return _14.watchItem(_16,_17,_18,_19,_1a,_1b);};}).endType();
vjo.ctype("vjo.darwin.domain.finding.item.watch.WatchList").needs(["vjo.dsf.ServiceEngine","vjo.dsf.cookie.VjCookieJar","vjo.dsf.utils.UriBuilder"]).protos({constructs:function(_1){this.initialize(_1);},initialize:function(_2){var _3=this;_3.model=_2;_3.watch=_2.watchURL;_3.signin=_2.signinURL;_3.watchList=_2.watchList;_3.guestList=_2.guestList;_3.watchFull=_2.watchFull;_3.guestFull=_2.guestFull;_3.timeout=_2.timeout;var _4=vjo.dsf.cookie.VjCookieJar;var _5=_4.readCookie("dp1","u1p");_3.user=_5.decodeBase64().decodeUTF8();if((_5=="")||_3.user.match("@@__@@__@@")){_3.user=null;}
var v1=_4.readCookie("ebaysignin");var v2=_4.readCookie("keepmesignin");_3.login=(v1.has("in")||v2.has("in"));_3.watches=new Array();window.onWatched=vjo.darwin.domain.finding.item.watch.WatchItem.onWatched;vjo.dsf.ServiceEngine.registerSvcReqtHdl("WATCH_COMPLETE",_3);vjo.dsf.ServiceEngine.registerSvcReqtHdl("WATCH_FULL",_3);},getWatchList:function(){return(this.login)?this.watchList:this.guestList;},getWatchFull:function(){return(this.login)?this.watchFull:this.guestFull;},onWatch:function(_8,_9,_a,_b,_c){var t=this,watch=t.watches[_9];if(watch!=null){return false;}
var _e=(t.user&&!t.login);if(_e){return t.onSignin(_9,_c);}
var _f=new vjo.dsf.utils.UriBuilder(t.watch);if(_c){_f.appendParam("var",_c);}else{_f.appendParam("item",_9);}
var _10=new Date();_f.appendParam("time",_10.getTime());if(_b){_f.appendParam("pt",_b);}
if(_a){_f.appendParam("",_a);}
_8.style.color="";t.watches[_9]=new vjo.darwin.domain.finding.item.watch.WatchItem(t,_8,_f,_9);t.watches[_9].watch();return false;},onSignin:function(_11,_12){var _13=new vjo.dsf.utils.UriBuilder(this.watch);if(_12){_13.appendParam("var",_12);}else{_13.appendParam("item",_11);}
_13.appendParam("ru",document.location.href.concat("#item",_12?_12:_11));var _14=new vjo.dsf.utils.UriBuilder(this.signin);_14.appendParam("ru",_13.getUri());_14.appendParam("pageType","3663");document.location.href=_14.getUri();return false;},handleRequest:function(_15){if(_15.svcId=="WATCH_COMPLETE"){this.onWatchComplete(_15);}else{if(_15.svcId=="WATCH_FULL"){this.onWatchFull(_15);}}
return false;},onWatchComplete:function(_16){var t=this,watch=t.watches[_16.item];if(watch){watch.clear(_16);}
if(_16.code==1){t.onWatchList(_16,false,true);}else{if(_16.code==2){t.onWatchList(_16,true,true);}else{if(_16.code==3){t.onWatchFull(_16,true);}else{if(watch){t.onWatchError(watch);}}}}
if(watch){delete t.watches[_16.item];}
return false;},onWatchList:function(_18,_19,log){var _1b="Watch".concat(_18.item);var _1c;while(_1c=document.getElementById(_1b)){_1c.parentNode.innerHTML=this.getWatchList();}
if(_19){this.onWatchFull(_18,new vjo.dsf.Message("WATCH_FULL"));}},onWatchFull:function(_1d,_1e){window.WatchListFull=true;var _1f=this.getWatchFull();for(var ldx=0;(ldx<document.links.length);ldx++){var _21=document.links[ldx];if(_21.id.match("Watch")){_21.parentNode.innerHTML=_1f;}}
if(_1e){vjo.dsf.ServiceEngine.handleRequest(_1e);}},onWatchError:function(_22){_22.link.style.color="#f00";}}).endType();
vjo.ctype("vjo.darwin.domain.finding.component.changelocation.ChangeLocation").needs("vjo.dsf.Element").props({hideOverlay:function(_1,_2,_3){var _4=vjo.dsf.Element;var _5=_4.get("getModelLocation");var _6=_4.get("zipe");var _7=_4.get("cite");var _8=_4.get("zipTitle");_8.className="defaultText";var _9=_4.get("cityTitle");_9.className="defaultText";var _a=_4.get("stTitle");_a.className="stateTitle";var _b=_4.get("zip");if(_1!="null"){_b.value=_1;}else{_b.value="";}
var _c=_4.get("zipe");_c.style.display="none";var _c=_4.get("cite");_c.style.display="none";var _d=_4.get("city");_d.value="";var _e=_4.get("state");if(_2!="null"){_e.value=_2;}
if(_3){if(!this.showing){return;}else{this.showing=false;}
this.setStyle("display","none");}},resize:function(){this.VjWindowUtils=vjo.dsf.window.utils.VjWindowUtils;var _f=this.VjWindowUtils.scrollWidth();var _10=this.VjWindowUtils.scrollHeight();this.setStyle("width",this.VjWindowUtils.toPixels(_f));this.setStyle("height",this.VjWindowUtils.toPixels(_10));},setStyle:function(_11,_12){var e=this.eElem;if(!e||!e.style){return;}
e.style[_11]=_12;},pageRefresh:function(_14,_15){var _16=vjo.dsf.Element;var _17=_16.get("rad");if(_17.options[_17.selectedIndex].value!="all"){sUrl=_14+(_14.indexOf("?")>0?"&":"?")+"_sadis="+_17.options[_17.selectedIndex].value;}else{sUrl=_15;}
window.location=sUrl;}}).endType();
vjo.ctype("vjo.darwin.domain.finding.component.changelocation.ChangeLocationService").needs("vjo.dsf.Element").protos({constructs:function(_1){this.sObjType="ChangeLocationService";this.sSvcId=_1;},handleResponse:function(_2){if(!_2.response||_2.response.errors.length>0){return;}
zipValue=_2.response.data.zip;layers=_2.response.data.msgDivNames;classes=_2.response.data.msgClassNames;errorZip=_2.response.data.isErrorZip;errorCityState=_2.response.data.isErrorCityState;success=_2.response.data.isSuccess;url=_2.response.data.baseUrl;isLsr=_2.response.data.isLsr;this.ze=vjo.dsf.Element.get(layers[0]);this.ce=vjo.dsf.Element.get(layers[1]);this.ov=vjo.dsf.Element.get(layers[2]);this.dz=vjo.dsf.Element.get(layers[3]);this.dc=vjo.dsf.Element.get(layers[4]);this.ds=vjo.dsf.Element.get(layers[5]);this.oForm=vjo.dsf.Element.get("myform");this.ce.style.display="none";this.ze.style.display="none";this.dz.className=classes[1];if(this.dc){this.dc.className=classes[1];}
if(this.ds){this.ds.className=classes[3];}
if(success){if(isLsr){if(typeof(this.ov)!="undefined"){this.ov.style.display="none";}
sUrl=url+(url.indexOf("?")>0?"&":"?")+"_fpos="+zipValue;}else{sUrl=url+zipValue;}
var _2=new vjo.dsf.Message("CLOSE_OVERLAY_PANELgetModelLocation");vjo.dsf.ServiceEngine.handleRequest(_2);window.location=sUrl;}else{if(errorZip){this.ze.style.display="block";this.dz.className=classes[0];}else{if(errorCityState){this.ce.style.display="block";this.dc.className=classes[0];this.ds.className=classes[2];}}}}}).endType();
vjo.ctype("vjo.darwin.domain.finding.component.changelocation.ChangeLocationAjaxHandler").needs(["vjo.dsf.Element","vjo.dsf.ServiceEngine"]).satisfies("vjo.dsf.common.IJsHandler").protos({constructs:function(_1,_2){this.sObjType="ChangeLocationAjaxHandler";this.sSvcId=_1;this.sRequest=_2;},handle:function(_3){var _4=new vjo.dsf.Message(this.sSvcId);_4.request=this.sRequest;var _5=vjo.dsf.Element.get("myform");var _6=_5.elements["zip"];var _7=_5.elements["city"];var _8=_5.elements["state"];_4.request.zip=_6.value;if(_7){_4.request.city=_7.value;}
if(_8){_4.request.state=_8.value;}
_4.request.validateLocation=true;vjo.dsf.ServiceEngine.handleRequest(_4);return false;}}).endType();
// en_MY/e655i/Finding_Additional_e655i10632898_6_en_MY
// b=10632898
