
vjo.ctype("vjo.darwin.domain.finding.lisobox.LisoBox").needs("vjo.dsf.Element").protos({vE:vjo.dsf.Element,constructs:function(_1){var t=this;t.config=_1;t.aUsingDefaultZip=[];t.eForm=t.vE.get(_1.formID);},clearZipField:function(id){var t=this,oinput=t.vE.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();

// fr_BE/e643i/Finding_Additional_e643i10296208_6a_fr_BE
// b=10296208