vjo.ctype("vjo.darwin.domain.finding.dlg.Pnl").needs("vjo.dsf.Element").protos({constructs:function(_1,_2){var vE=this.vE=vjo.dsf.Element;var _4=_2.name+_1.sPanelPost;var _5=_4+_1.sPanelErr;this.oPanel=vE.get(_4);this.oPanelError=vE.get(_5);this.oDlg=_1;this.title=_2.title;this.aPnlCnts=[];try{this.registerPnlCnt(_2.panelModel)}catch(e){alert("Error in registerPnlCnt: "+e)}},registerPnlCnt:function(_6){if(_6&&_6.type)if(_6.type=="_List"&&_6.modelList instanceof Array)for(var i in _6.modelList)this.registerPnlCnt(_6.modelList[i]);
else{_6.singleEdit=this.oDlg.singleEdit;_6.keepOriginalState=this.oDlg.keepOriginalState;_6.oDlg=this.oDlg;var f=new Function("return new "+_6.type+"(arguments[0])");var pc=f(_6);this.invoke(pc,"init",false,_6);this.aPnlCnts.push(pc)}},show:function(){if(this.oPanel){this.oPanel.style.zIndex="3";if(this.title)this.oDlg.oTitle.innerHTML=this.title;this.action("onShown");if(!this.oDlg.keepOriginalState)this.action("initState")}},hide:function(){this.hideError();if(this.oPanel)this.oPanel.style.zIndex=
"0"},checkError:function(_a){for(var i in this.aPnlCnts){var pc=this.aPnlCnts[i];var _d=this.invoke(pc,"hasError",false,_a);if(_a.ajax)return true;if(_d){var _e=this.invoke(pc,"getErrorStr",true);if(_e){this.showError(_e);return true}}}return false},showError:function(_f){if(this.oPanelError){this.oPanelError.innerHTML=_f;this.oPanelError.style.display="block"}},hideError:function(){if(this.oPanelError){this.oPanelError.innerHTML="";this.oPanelError.style.display="none"}},getIgnoredHtmlIds:function(){var ids=
[];for(var i in this.aPnlCnts){var pc=this.aPnlCnts[i];var _13=this.invoke(pc,"getIgnoredHtmlIds",false);if(_13 instanceof Array)for(var j in _13)ids.push(_13[j])}return ids},clear:function(){this.action("clear")},invoke:function(obj,_16,_17,_18){var b=obj&&obj[_16]&&obj[_16]instanceof Function;if(b)return obj[_16](_18);else{if(_17)alert("function is required but not implemented: "+_16);return null}},action:function(_1a,_1b){for(var i in this.aPnlCnts)this.invoke(this.aPnlCnts[i],_1a,false,_1b)}}).endType();
vjo.ctype("vjo.darwin.domain.finding.dlg.DlgLink").needs(["vjo.dsf.Message","vjo.dsf.ServiceEngine"]).satisfies("vjo.dsf.common.IJsHandler").props({onClick:function(_1,_2){var _3=new vjo.dsf.Message(_1);_3.clientContext=_2;vjo.dsf.ServiceEngine.handleRequest(_3)}}).protos({constructs:function(_4,_5){this.serviceId=_4;this.oModel=_5},handle:function(_6){var _7=new vjo.dsf.Message(this.serviceId);_7.clientContext=this.oModel;return _7}}).endType();
vjo.ctype("vjo.darwin.domain.finding.dlg.Dlg").needs(["vjo.dsf.Element","vjo.dsf.utils.URL","vjo.dsf.utils.Object","vjo.dsf.utils.UriBuilder","vjo.darwin.domain.finding.dlg.Pnl","vjo.darwin.domain.finding.dlg.DlgLink","vjo.darwin.core.utils.ServiceUtils"]).protos({constructs:function(_1){var t=this;t.vE=vjo.dsf.Element;var vE=t.vE;t.oC=_1;var c=t.oC;t.oDialog=vE.get(c.layerId);t.oForm=vE.get(c.formId);t.oPanels=vE.get(c.paneId);t.oWaiting=vE.get(c.waitingId);t.oTabs=vE.get(c.tabsId);t.oControlBar=
vE.get(c.controlBarId);t.sTabClassName=c.tabClassName;t.sSelectedTabClassName=c.selectedTabClassName;t.linkService=c.dlgLinkService;t.sPanelPost=c.panelPostStr;t.sPanelErr=c.panelErrorStr;t.sErrorStr=c.errorStr;t.sErrorSys=c.errorSys;t.submitBtnId=c.submitBtnId;t.bDetectOnChange=c.detectOnChange;t.modalDialogId=c.modalDialogId;t.oTitle=vE.get(c.titleId);t.bDeSite=c.deSite;t.deMaxTabHeight=291;t.sellerChanged="0";t.bForceReload=false;t.sSubmitSvc=c.submitSvc;t.opnSrvc=c.olpOpnId;t.clsSrvc=c.olpPostClsId;
if(t.oPanels.currentStyle)t.height=t.oPanels.currentStyle.height;else if(window.getComputedStyle)t.height=window.getComputedStyle(t.oPanels,null).getPropertyValue("height");t.createShim();t.reset()},createShim:function(){var _5=document.createElement("IFRAME");var s=_5.style;s.position="absolute";s.zIndex="1";s.filter="alpha(opacity=0)";s.width="100%";s.height="100%";s.border="0px";this.oPanels.appendChild(_5)},reset:function(){var t=this;t.submitting=false;t.visible=false;t.oCurrentPanel=null;t.oCurrentTab=
null;t.currentTabName=null;t.aPanels={};t.bTabsLoaded=false;t.toggleSubmit(t.bDetectOnChange);t.ignoreChecks={};t.tabHandlers={};t.singleEdit=false;if(t.height)t.oPanels.style.height=t.height;t.onReset()},onReset:function(){},toggleModalDialog:function(_8){var t=this;var svcId;svcId=_8?t.opnSrvc:t.clsSrvc;vjo.darwin.core.utils.ServiceUtils.sndM(svcId)},show:function(){var t=this;t.bForceReload=false;if(t.visible)return;t.toggleModalDialog(true);t.oDialog.style.display="block";t.visible=true},clear:function(){var t=
this;t.hidePanel();if(!t.submitting){t.clearTabs();if(t.oPanels)for(var i=t.oPanels.childNodes.length-1;i>1;i--)t.oPanels.removeChild(t.oPanels.childNodes[i]);for(i in t.aPanels){var p=t.aPanels[i];p.clear()}t.reset()}},cancel:function(){this.toggleModalDialog(false);return false},action:function(_e,_f){var t=this;for(var pn in t.aPanels){var p=t.aPanels[pn];p.action(_e,_f)}},createHidden:function(_13,_14){var e;try{e=document.createElement("<input name='"+_13+"' type='hidden' value='"+_14+"'/>")}catch(ex){e=
document.createElement("input");e.type="hidden";e.name=_13;e.value=_14}return e},submit:function(){var t=this;if(!t.hasChanges())t.displayError(t.sErrorStr);else{var _17=t;var _18=t.createValidateCtx(function(){if(_17.visible)_17.submit()});if(!t.checkError(t.currentTabName,_18)&&t.onSubmit(t.oForm)){var _19="";var _1a=t.oForm.length;for(var i=0;i<_1a;i++){var e=t.oForm.elements[i];if(t.isCheckIgnored(e))e.disabled=true;if(e&&e.name&&e.name=="ModelYearf0c65f14"){e.disabled=true;if(e.checked)_19=_19+
e.value+"|"}}if(_19.length>0){_19=_19.substring(0,_19.length-1);t.oForm.appendChild(t.createHidden("ModelYearf0c65f14",_19))}var _1d=vjo.darwin.transitional.ajax.AjaxUtils;var _1e=_1d.getAjaxManager("Page");if(t.oForm&&t.vE.get("LH_Location_M6N_pnl")){var _1f=t.oForm.action;if(_1f.search(/QQLHQ5fAvailToZ/g)!=-1){if(_1f.search(/LHQ5fSALEQ5fCURRENCY/g)==-1)t.oForm.action=_1f.replace(/QQLHQ5fAvailToZ[0-9]+/,"")}else if(_1f.search(/QQLHQ5fPrefLocZ/g)!=-1){if(_1f.search(/LHQ5fSALEQ5fCURRENCY/g)==-1)t.oForm.action=
_1f.replace(/QQLHQ5fPrefLocZ[0-9]+/,"")}else if(_1f.search(/QQLHQ5fLocatedInZ/g)!=-1)if(_1f.search(/LHQ5fSALEQ5fCURRENCY/g)==-1)t.oForm.action=_1f.replace(/QQLHQ5fLocatedInZ[0-9]+/,"")}t.oForm.appendChild(t.createHidden("_fcsfc",t.sellerChanged));if(_1e==null){t.oForm.submit();t.submitting=true;t.cancel();t.submitting=false}else{var uri=new vjo.dsf.utils.UriBuilder(t.oForm.action,false);uri.appendParams(uri.decodeForm(t.oForm));var _21=(new vjo.dsf.utils.UriBuilder(_1e.getState("Page"),true)).getUri();
var _22=(new vjo.dsf.utils.UriBuilder(uri.getUri(),true)).getUri();if(t.isForceReload(_21,_22))_1d.reload(uri.getUri());else{_1e.sendRequest("Page",uri.getUri(),true);vjo.dsf.ServiceEngine.handleRequest(new vjo.dsf.Message(t.sSubmitSvc))}t.cancel()}}}return false},onSubmit:function(_23){return true},isForceReload:function(_24,_25){return false},hasPanel:function(_26){if(!_26)return false;return this.aPanels[_26+this.sPanelPost]!=null},hidePanel:function(){var t=this;if(t.oCurrentPanel){t.oCurrentPanel.hide();
t.onPanelHidden(t.oCurrentPanel);t.oCurrentPanel=null}if(t.bDetectOnChange)t.toggleSubmit(true)},showPanel:function(_28,_29){var t=this;var _2b=t.aPanels[_28+t.sPanelPost];if(!_2b)_2b=t.buildPanel(_29);t.updateSelectedTab(_28);t.oCurrentPanel=_2b;t.resizeOlps();_2b.show();t.onPanelShown(_2b);t.adjustHeight();if(t.bDetectOnChange)t.toggleSubmit(!t.hasChanges());t.resizeOlps()},adjustHeight:function(){var t=this;if(t.singleEdit){t.oPanels.style.height="";t.oPanels.style.width="";return}var _2d=t.oTabs.clientHeight;
var _2e=t.oPanels.clientHeight-_2d;var _2f=t.oTabs.lastChild;if(_2f){var _30=Math.max(_2f.clientHeight+_2e,0);_2f.style.height=_30+"px";t.oPanels.style.height=t.oTabs.clientHeight+"px"}else t.oWaiting.style.zIndex="-1"},adjustHeightDE:function(){var t=this;if(t.singleEdit){t.oPanels.style.height="";return}var _32=t.oTabs.clientHeight;if(_32<t.deMaxTabHeight)t.oPanels.style.height=t.deMaxTabHeight+"px";var _33=t.oPanels.clientHeight-_32;var _34=t.oTabs.lastChild;t.oTabs.style.width=155+"px";t.oPanels.style.width=
442+"px";t.oControlBar.style.paddingRight=16+"px";if(_34){var _35=Math.max(_34.clientHeight+_33,0);_34.style.height=_35+"px";t.oPanels.style.height=t.oTabs.clientHeight+"px"}else t.oWaiting.style.zIndex="-1"},isDeSite:function(){return this.bDeSite},onPanelShown:function(_36){},onPanelHidden:function(_37){},resizeOlps:function(){},createTabLink:function(_38,_39){var _3a="";_3a+="<a href='javascript:;' id='";_3a+=_38+"_tab_a'>";_3a+=_39+"</a>";return _3a},createTabs:function(_3b){var t=this;var _3d=
_3b||[];var len=_3d.length;var tabStr="";var i;for(i=0;i<len;i++){var _3e=_3d[i];tabStr+="<span id='"+_3e.name+"_tab' class='tab'>";tabStr+=t.createTabLink(_3e.name,_3e.title);tabStr+="</span>"}tabStr+="<div class='line'>&nbsp;</div>";if(len>0){t.oTabs.innerHTML=tabStr;t.bTabsLoaded=true}for(i=0;i<len;i++){_3e=_3d[i];var tn=_3e.name+"_tab_a";var _3f=new vjo.darwin.domain.finding.dlg.DlgLink(t.linkService,_3e);vjo.dsf.EventDispatcher.add(tn,"click",_3f);t.tabHandlers[tn]=_3f}},clearTabs:function(){var t=
this;for(var tn in t.tabHandlers)vjo.dsf.EventDispatcher.detachHandler(tn,"click",t.tabHandlers[tn]);t.oTabs.innerHTML=""},processResponse:function(_42){var t=this;if(!t.bTabsLoaded)t.createTabs(_42.linkModels);if(_42.action)t.oForm.action=_42.action;t.removeHiddenfields(t.oForm);t.buildHiddenParamsFromQueryString(t.oForm,_42.hiddenQueryParams);t.onResponse(_42);t.showPanel(_42.name,_42)},removeHiddenfields:function(_44){var _45=_44.elements;for(var i=_45.length-1;i>=0;--i)if(_45[i]&&_45[i].type===
"hidden")_44.removeChild(_45[i])},buildHiddenParamsFromQueryString:function(_47,_48){if(_48){var _49;for(var _4a in _48){_49=_48[_4a];_47.appendChild(this.createHidden(_4a,_49))}}},onResponse:function(_4b){},buildPanel:function(_4c){var t=this;var _4e=t.oPanels.appendChild(document.createElement("span"));var _4f=_4c.panel||"";_4e.innerHTML=_4f.replace(/&lt;/gi,"<").replace(/&gt;/gi,">");var p=t.createPanel(_4c);var _51=_4c.name+t.sPanelPost;t.aPanels[_51]=p;var _52=p.getIgnoredHtmlIds();if(_52 instanceof
Array)for(var ti in _52){var id=_52[ti];t.ignoreChecks[id]=id}if(t.bDetectOnChange){var _55=t.oForm.length;for(var i=0;i<_55;i++){var e=t.oForm.elements[i];if(e.disabled||t.isCheckIgnored(e))continue;var _58=e.type=="checkbox"||e.type=="radio"?"onclick":"onchange";if(!e[_58])e[_58]=vjo.hitch(t,this.onChange)}}t.onPanelLoaded(p);return p},createPanel:function(_59){return new vjo.darwin.domain.finding.dlg.Pnl(this,_59)},onPanelLoaded:function(_5a){},updateSelectedTab:function(_5b){var t=this;t.currentTabName=
_5b;if(t.oCurrentTab)t.oCurrentTab.className=t.sTabClassName;t.oCurrentTab=t.vE.get(_5b+"_tab");if(!t.oCurrentTab&&t.oTabs&&t.oTabs.firstChild)t.oCurrentTab=t.vE.get(t.oTabs.firstChild.id);if(t.oCurrentTab)t.oCurrentTab.className=t.sSelectedTabClassName},onDlgLinkClicked:function(_5d){},createValidateCtx:function(_5e){var t=this;return{ajax:false,form:t.oForm,proceed:_5e,tabName:t.currentTabName,singleAspect:t.singleEdit}},handleService:function(msg){var t=this;t.show();var ctx=msg.clientContext;
if(!ctx)return;t.onDlgLinkClicked(ctx);var _63=ctx.name;t.singleEdit=ctx.singleEdit;t.keepOriginalState=ctx.keepOriginalState;t.oTabs.style.display=t.singleEdit?"none":"block";t.oPanels.className=t.singleEdit?"scrollerEdit":"scroller";if(_63==t.currentTabName)return;var _64=t;var _65=t.createValidateCtx(function(){if(_64.visible)_64.handleService(msg)});if(t.checkError(t.currentTabName,_65))return;t.hidePanel();try{if(t.hasPanel(_63))t.showPanel(_63);else t.sendRequest(_63,ctx.url)}catch(e){}t.oPanels.className=
t.oPanels.className},sendRequest:function(_66,_67){var t=this;var _69=_66;var _6a="<div id='"+_69+t.sPanelPost+"' class='g-err'>"+t.sErrorSys+"</div>";var req=vjo.dsf.Service.getXmlHttpReq();var _6c=t;if(vjo.dsf.client.Browser.bIE){var _6d=new Date;_67=vjo.dsf.utils.URL.addArg(_67,"ts",_6d.valueOf())}req.onreadystatechange=function(){if(req.readyState!=4)return;if(req.status==200){var _6e=req.responseText;try{var _6f=eval("("+_6e+")");if(_6f.name){_6c.processResponse(_6f);return}}catch(e){}}_6c.showPanel(_69,
{name:_69,panel:_6a})};try{var _70=document.location.href;var _71=_70.indexOf(":",8);var _72=-1;var _73="";if(_71>0){_72=_70.indexOf("/",_71+1);if(_72>0)_73=_70.substring(_71+1,_72)}var _74=_67.indexOf(":",0);var _75=_67.indexOf(":",8);if(_73.length>1&&_74>0&&_75<0){var _76=_67.indexOf("/",8);if(_76>0)_67=_67.substring(0,_76)+":"+_73+_67.substring(_76,_67.length)}req.open("GET",_67,true);req.send(null)}catch(e$$0){t.showPanel(_69,{name:_69,panel:_6a})}},isCheckIgnored:function(e){return this.ignoreChecks[e.id]!=
null},isChanged:function(e){if(e.disabled||this.isCheckIgnored(e))return false;var _79=false;switch(e.type){case "select-one":case "select-multiple":for(var oi=e.length-1;oi>=0;oi--){var o=e.options[oi];if(oi==0&&o.selected)break;if(o.defaultSelected!=o.selected){_79=true;break}}break;case "radio":case "checkbox":if(e.defaultChecked!=e.checked)_79=true;break;case "submit":break;case "text":if(e.defaultValue!=e.value)_79=true;break}return _79},hasChanges:function(){var t=this;var _7d=t.oForm.length;
for(var i=0;i<_7d;i++){var e=t.oForm.elements[i];if(t.isChanged(e)){if(e.id=="infoHiddenText_seller")t.sellerChanged="1";return true}}return false},checkError:function(_80,_81){var t=this;if(!t.hasPanel(_80))return false;var pnl=t.aPanels[_80+t.sPanelPost];var _84=pnl.checkError(_81);if(_84&&pnl!=t.oCurrentPanel){t.hidePanel();t.showPanel(_80)}return _84},displayError:function(_85){if(this.oCurrentPanel)this.oCurrentPanel.showError(_85)},onChange:function(){this.toggleSubmit(!this.hasChanges())},
toggleSubmit:function(_86){var btn=this.vE.get(this.submitBtnId);if(btn&&btn.type=="submit")btn.disabled=_86;else;}}).endType();
vjo.ctype("vjo.darwin.domain.finding.dialog.Dialog").inherits("vjo.darwin.domain.finding.dlg.Dlg").protos({constructs:function(_1){this.base(_1)},isForceReload:function(_2,_3){_2=_2.match(/LH_TitleDesc|LH_Complete/);_3=_3.match(/LH_TitleDesc|LH_Complete/);if(_2&&(_3==null||_3[0]!=_2[0]))return true;else if(_3&&(_2==null||_2[0]!=_3[0]))return true;else if(this.bForceReload)return true;return false},onPanelShown:function(_4){try{if(this.currentTabName.indexOf("LH_Keyword")>-1){document.getElementById("keyword_aspect_edit").select();
document.getElementById("keyword_aspect_edit").focus()}if(this.zipErrMsg)this.displayError(this.zipErrMsg)}catch(e){}},onPanelHidden:function(_5){vjo.dsf.ServiceEngine.handleRequest(new vjo.dsf.Message("CALENDAR_CLOSE_SERVICE"))},onDlgLinkClicked:function(_6){this.zip=_6.zip;this.zipErrMsg=_6.zipErrMsg},createTabLink:function(_7,_8){var _9="";if(this.base.isDeSite()){_9="<div style='width:132px'>";_9+=this.base.createTabLink(_7,_8);_9+="</div>"}else _9=this.base.createTabLink(_7,_8);return _9},adjustHeight:function(){if(this.base.isDeSite())this.base.adjustHeightDE();
else this.base.adjustHeight()},hasChanges:function(){if(this.singleEdit)return true;return this.base.hasChanges()}}).endType();
vjo.ctype("vjo.darwin.domain.finding.dialog.PanelSaveHandler").needs(["vjo.dsf.Element","vjo.dsf.Message","vjo.dsf.ServiceEngine"]).protos({constructs:function(_1,_2){this.serviceId="PANEL_SAVE_SELECTION_SERVICE";this.sId=_1;this.isSelfSubmit=_2},handle:function(_3){var e=vjo.dsf.Element.get(this.sId);if(_3.src.id!=this.sId&&e&&!e.checked)e.checked=true;if(_3.nativeEvent.keyCode==13&&!this.isSelfSubmit)vjo.dsf.ServiceEngine.handleRequest(new vjo.dsf.Message("M6NDlgSubmitSvc"));var _5=new vjo.dsf.Message("ASPECT_CHECKBOX_CLICK_SERVICE");
_5.clientContext={elemName:this.sId};vjo.dsf.ServiceEngine.handleRequest(_5);var _6=new vjo.dsf.Message(this.serviceId);_6.clientContext={elem:e};return _6}}).endType();
vjo.ctype("vjo.darwin.domain.finding.dialog.ExclusiveGroupEventHandler").needs("vjo.dsf.Element").protos({constructs:function(_1){this.parent=_1;this.oC=this.parent.oC;this.aConfig=this.parent.aConfig;this.aspectEdit=this.parent.aspectEdit;this.keepOriginalState=this.parent.keepOriginalState;this.disabledList=this.parent.disabledList;var _2="bar"},handle:function(_3){this.processClick(_3.src.id)},processClick:function(_4){try{var _5=vjo.dsf.Element.get(_4);this.handleExclusive(!_5.checked,_4);this.handleInclusive(!_5.checked,
_4);this.parent.updateExclusive(_5);this.parent.updateInclusive(_5)}catch(e){}},checkElementStatus:function(_6,_7){var _8=_7.length;for(var i=0;i<_8;i++)if(_6!=_7[i]){eElem=vjo.dsf.Element.get(_7[i]);if(eElem&&eElem.checked)return false}return true},handleExclusive:function(_a,_b){try{for(var _c in this.aConfig[0][_b]){var _d=this.aConfig[0][_b][_c];var _e=vjo.dsf.Element.get(_d);var eTitleElem=vjo.dsf.Element.get(_d+this.oC.titleSuffix);if(_a){var _f=this.checkElementStatus(_c,this.aConfig[0][_b]);
var _10=this.isElemDisabled(_d);var _11=true;if((!this.aspectEdit||this.keepOriginalState)&&_10)_11=false;if(_f&&_11){if(eTitleElem)eTitleElem.className=this.oC.enableClassName;_e.disabled=false}}else{if(eTitleElem)eTitleElem.className=this.oC.disableClassName;_e.disabled=true}var msg=new vjo.dsf.Message("PANEL_SAVE_SELECTION_SERVICE");msg.clientContext={elem:_e};vjo.dsf.ServiceEngine.handleRequest(msg)}}catch(e){}},handleInclusive:function(_13,_14){try{for(var _15 in this.aConfig[1][_14]){var _16=
this.aConfig[1][_14][_15];var _17=vjo.dsf.Element.get(_16);var eTitleElem=vjo.dsf.Element.get(_16+this.oC.titleSuffix);if(_13){var _18=this.isElemDisabled(_16);var _19=true;if((!this.aspectEdit||this.keepOriginalState)&&_18)_19=false;if(_19){if(eTitleElem)eTitleElem.className=this.oC.enableClassName;this.removeHiddenParam(_17);_17.disabled=false;_17.checked=false}}else{if(eTitleElem)eTitleElem.className=this.oC.disableClassName;this.addHiddenParam(_17);_17.disabled=true;_17.checked=true}var msg=new vjo.dsf.Message("PANEL_SAVE_SELECTION_SERVICE");
msg.clientContext={elem:_17};vjo.dsf.ServiceEngine.handleRequest(msg)}}catch(e){}},addHiddenParam:function(_1b){var _1c=vjo.dsf.Element.get(_1b.name+this.oC.hiddenSuffix);if(!_1c){var _1d=document.createElement("input");_1d.setAttribute("type","hidden");_1d.setAttribute("name",_1b.name);_1d.setAttribute("value","1");_1d.setAttribute("id",_1b.name+this.oC.hiddenSuffix);_1b.parentNode.appendChild(_1d)}},removeHiddenParam:function(_1e){var _1f=vjo.dsf.Element.get(_1e.name+this.oC.hiddenSuffix);if(_1f)_1e.parentNode.removeChild(_1f)},
isElemDisabled:function(_20){var _21=this.disabledList.length;for(var i=0;i<_21;i++)if(this.disabledList[i]==_20)return true;return false}}).endType();
vjo.ctype("vjo.darwin.domain.finding.dialog.ExclusiveGroup").needs(["vjo.dsf.Element","vjo.darwin.domain.finding.dialog.ExclusiveGroupEventHandler"]).protos({constructs:function(_1){var c=this.oC=_1;this.aConfig=this.buildConfigList(_1);this.vE=vjo.dsf.Element;this.aHandlers={};this.aspectEdit=c.singleEdit;this.disabledList=this.oC.disabledList;var _3=this.getChecked(this.aConfig);for(var _4 in this.aConfig){eElem=this.vE.get(_4);if(!eElem)continue;var _5=new vjo.darwin.domain.finding.dialog.ExclusiveGroupEventHandler(this.oC,
this.aConfig,this.aspectEdit,this.disabledList);this.aHandlers[_4]=_5;vjo.dsf.EventDispatcher.detachHandlers(_4,"click");vjo.dsf.EventDispatcher.add(_4,"click",_5);if(_3&&_3==_4)_5.enableElements(false,_4)}},buildConfigList:function(_6){var _7=_6.elemList;var configList=[];for(var i=0;_7&&i<_7.length;i++){var cl=_7[i].split(",");var eN=cl[0];var el=cl.slice(1);configList[eN]=el}return configList},getChecked:function(_a){for(var _b in _a){var _c=vjo.dsf.Element.get(_b);if(_c&&_c.checked)return _b}return null},
initState:function(){var _d=this.getChecked(this.aConfig);for(var _e in this.aConfig){if(!this.vE.get(_e))continue;var _f=this.aHandlers[_e];if(_d&&_d==_e)_f.enableElements(false,_e);else _f.enableElements(true,_e)}}}).endType();
vjo.ctype("vjo.darwin.domain.finding.dialog.AspectInteraction").needs(["vjo.dsf.Element","vjo.darwin.domain.finding.dialog.ExclusiveGroupEventHandler","vjo.dsf.ServiceEngine"]).protos({constructs:function(_1){var c=this.oC=_1;this.aConfig=this.buildConfigList(_1);this.vE=vjo.dsf.Element;this.aHandlers={};this.aspectEdit=c.singleEdit;this.keepOriginalState=c.keepOriginalState;this.disabledList=this.oC.disabledList;for(var _3 in this.aConfig[0]){eElem=this.vE.get(_3);if(!eElem)continue;var _4=new vjo.darwin.domain.finding.dialog.ExclusiveGroupEventHandler(this);
this.aHandlers[_3]=_4;vjo.dsf.EventDispatcher.detachHandlers(_3,"click");vjo.dsf.EventDispatcher.add(_3,"click",_4)}for(_3 in this.aConfig[1]){eElem=this.vE.get(_3);if(!eElem)continue;_4=new vjo.darwin.domain.finding.dialog.ExclusiveGroupEventHandler(this);this.aHandlers[_3]=_4;vjo.dsf.EventDispatcher.detachHandlers(_3,"click");vjo.dsf.EventDispatcher.add(_3,"click",_4)}this.resetExclusive();this.updateExclusive();this.updateInclusive();vjo.dsf.ServiceEngine.registerSvcHdl("ASPECT_CHECKBOX_CLICK_SERVICE",
this)},buildConfigList:function(_5){var _6=_5.exclusive;var _7=_5.inclusive;var _8=_6.split(";");var exclusiveList=[];for(var i=0;_8&&i<_8.length;i++){var cl=_8[i].split(",");var eN=cl[0];var el=cl.slice(1);exclusiveList[eN]=el}var _b=_7.split(";");var inclusiveList=[];for(i=0;_b&&i<_b.length;i++){cl=_b[i].split(",");eN=cl[0];el=cl.slice(1);inclusiveList[eN]=el}var _c=new Array;_c[0]=exclusiveList;_c[1]=inclusiveList;return _c},resetExclusive:function(){for(var _d in this.aConfig[0]){var _e=this.aHandlers[_d];
if(_e==null)continue;var _f=vjo.dsf.Element.get(_d);if(_f)_e.handleExclusive(true,_d)}},updateExclusive:function(_10){for(var _11 in this.aConfig[0]){var _12=vjo.dsf.Element.get(_11);if(_12==null||_12===_10)continue;var _13=this.aHandlers[_11];if(_13&&_12.checked)_13.handleExclusive(false,_11)}},updateInclusive:function(_14){for(var _15 in this.aConfig[1]){var _16=vjo.dsf.Element.get(_15);if(_16==null||_16===_14)continue;var _17=this.aHandlers[_15];if(_17&&_16.checked)_17.handleInclusive(false,_15)}},
initState:function(){this.resetExclusive();this.updateExclusive();this.updateInclusive()},invoke:function(_18){try{var _19=_18.clientContext.elemName;this.aHandlers[_19].processClick(_19)}catch(e){}},hasError:function(){return false}}).endType();
vjo.ctype("vjo.darwin.domain.finding.dialog.filter.price.PriceFilter").needs(["vjo.dsf.Element","vjo.darwin.domain.finding.dialog.PanelSaveHandler"]).protos({constructs:function(_1){var c=this.oC=_1;var vE=vjo.dsf.Element;this.eCheckbox=vE.get(c.checkbox);this.eMin=vE.get(c.minId);this.eMax=vE.get(c.maxId);var _4=new vjo.darwin.domain.finding.dialog.PanelSaveHandler(c.checkbox);vjo.dsf.EventDispatcher.detachHandlers(c.checkbox,"click");vjo.dsf.EventDispatcher.add(c.checkbox,"click",_4);vjo.dsf.EventDispatcher.detachHandlers(c.minId,
"keyup");vjo.dsf.EventDispatcher.add(c.minId,"keyup",_4);vjo.dsf.EventDispatcher.detachHandlers(c.maxId,"keyup");vjo.dsf.EventDispatcher.add(c.maxId,"keyup",_4)},hasError:function(){if(!this.isChecked()||!this.eMin||!this.eMax)return false;var _5=this.eMin.value;var _6=this.eMax.value;if(_5==""&&_6=="")return true;return false},getErrorStr:function(){return this.oC.errorStr},isChecked:function(){if(this.eCheckbox)return this.eCheckbox.checked;return false}}).endType();
vjo.ctype("vjo.darwin.domain.finding.dialog.DefaultPanel").needs("vjo.darwin.domain.finding.dialog.filter.price.PriceFilter").protos({constructs:function(_1){var _2=_1.aspectNames;if(_2&&_2[0]&&_2[0]=="LH_Price"){var _3=new Object;_3.checkbox="_mPrRngCbx";_3.minId="_udlo";_3.maxId="_udhi";new vjo.darwin.domain.finding.dialog.filter.price.PriceFilter(_3)}}}).endType();
vjo.ctype("vjo.darwin.domain.finding.dialog.filter.date.DateAnchorHandler").needs("vjo.dsf.Element").protos({constructs:function(_1,_2){this.oDateFilter=_1;var vE=vjo.dsf.Element;this.input=vE.get(_2)},handle:function(_4){var _5=this.input.value||"";this.input.disabled=true;this.oDateFilter.eSelectedInput=this.input}}).endType();
vjo.ctype("vjo.darwin.domain.finding.dialog.filter.date.DateFilter").needs(["vjo.dsf.Element","vjo.darwin.domain.finding.dialog.filter.date.DateAnchorHandler","vjo.darwin.domain.finding.dialog.PanelSaveHandler"]).protos({constructs:function(_1){var vE=vjo.dsf.Element;this.oCfg=_1;this.eSelectedInput=null;this.sFormat=_1.format;this.eMin=vE.get(_1.inputs[0]);this.eMax=vE.get(_1.inputs[1]);var _3=vjo.darwin.domain.finding.dialog.PanelSaveHandler;vjo.dsf.EventDispatcher.detachHandlers(_1.inputs[0],"change");
vjo.dsf.EventDispatcher.add(_1.inputs[0],"change",new _3(_1.inputs[0]));vjo.dsf.EventDispatcher.detachHandlers(_1.inputs[1],"change");vjo.dsf.EventDispatcher.add(_1.inputs[1],"change",new _3(_1.inputs[1]))},init:function(){var c=this.oCfg;if(c.anchors.length!=c.inputs.length)return;var _5=c.anchors.length;for(var i=0;i<_5;i++){var a=c.anchors[i];var inp=c.inputs[i];var _8=vjo.darwin.domain.finding.dialog.filter.date.DateAnchorHandler;vjo.dsf.EventDispatcher.add(a,"click",new _8(this,inp))}vjo.dsf.ServiceEngine.registerSvcHdl("CALENDAR_DATE_SELECTED_SERVICE",
this)},setSelected:function(_9){if(this.eSelectedInput){this.eSelectedInput.disabled=false;if(_9){this.eSelectedInput.value=_9;var _a=new vjo.dsf.Message("PANEL_SAVE_SELECTION_SERVICE");_a.clientContext={elem:this.eSelectedInput};vjo.dsf.ServiceEngine.handleRequest(_a)}if((this.eMax.value==""||this.eMax.value==this.sFormat)&&this.eMin.value!="")this.eMax.value=this.eMin.value}},invoke:function(_b){if(!_b.clientContext)return;this.setSelected(_b.clientContext.value)}}).endType();
vjo.ctype("vjo.darwin.domain.finding.dialog.filter.distance.DistanceFilter").needs(["vjo.dsf.Element","vjo.dsf.utils.URL","vjo.darwin.domain.finding.dialog.PanelSaveHandler","vjo.dsf.utils.UriBuilder"]).protos({constructs:function(_1){var vE=vjo.dsf.Element;var c=this.oC=_1;this.cError=true;this.eCheckbox=vE.get(c.checkbox);this.eRadius=vE.get(c.radius);this.eZip=vE.get(c.zip);this.eCity=vE.get(c.city);this.cValidated=c.checkValid;this.validated=false;this.nullErrorMsg=c.nullErrorStr;this.bChangeFlag=
true;this.lastValidateUrl="";var _4=new vjo.darwin.domain.finding.dialog.PanelSaveHandler(c.checkbox,c.checkValid);var eD=vjo.dsf.EventDispatcher;eD.detachHandlers(c.checkbox,"click");eD.detachHandlers(c.radius,"change");eD.detachHandlers(c.zip,"keydown");eD.detachHandlers(c.zip,"focus");eD.detachHandlers(c.city,"change");eD.add(c.checkbox,"click",_4);eD.add(c.radius,"change",_4);eD.add(c.zip,"keydown",_4);eD.add(c.city,"change",_4);var _6=this;var _7=this;var _8={handle:function(_9){var e=document.getElementById(c.zip);
if(e&&e.className=="zipGray"){e.value="";e.className="distance_aspect_input"}}};eD.add(c.zip,"focus",_8);var _b={handle:function(_c){if(_7.eCheckbox.checked)_7.validated=true;else _7.validated=false;_7.errorStr=null;_7.bChangeFlag=true}};var _d={handle:function(_e){_7.eCity.selectedIndex=0}};var _f={handle:function(_10){_7.eZip.value=""}};eD.add(c.checkbox,"click",_b);eD.add(c.radius,"change",_b);eD.add(c.zip,"keydown",_b);eD.add(c.city,"change",_b);if(this.eCity!=null)eD.add(c.zip,"keydown",_d);
if(this.eZip!=null)eD.add(c.city,"change",_f);var _11=this.eCheckbox.checked;this.eCheckbox.defaultChecked=false;this.eCheckbox.checked=_11;var _12=this.eZip.value;this.eZip.defaultValue=_12;this.eZip.value=_12;if(this.eCheckbox.checked)this.validated=true},hasError:function(_13){var vU=vjo.dsf.utils.URL;var _15=this.eZip.value;var _16=this.eZip.name;if(!this.isChecked())return false;if(_15==""&&this.eCity.selectedIndex==0){if(this.cValidated){this.errorStr=this.nullErrorMsg;cError=true}else this.errorStr=
this.oC.errorStr;return true}if(this.cValidated&&this.bChangeFlag&&this.validated){var req=vjo.dsf.Service.getXmlHttpReq();var _18=this;req.onreadystatechange=function(){if(req.readyState!=4)return;if(req.status==200){var _19=req.responseText;try{var _1a=eval("("+_19+")");if(!_1a.flag){_18.errorStr=_1a.result[0].error;this.cError=false}else _18.errorStr=null}catch(e){}_18.validated=false;_13.proceed()}};var _1b=_13.form.action;var _1c=_13.tabName;var _1d=vU.addArg(_1b,_16,_15);_1d=vU.addArg(_1d,"_saa",
"1");_1d=vU.addArg(_1d,"_sva","1");if(_13.singleAspect)_1c=_1c.substring(0,_1c.lastIndexOf("_"));_1d=vU.addArg(_1d,"_aad",_1c);var _1e=new vjo.dsf.utils.UriBuilder(_1d);_1d=_1e.getUri();_1d=_1d.replace("#","%23");if(_1d!=this.lastValidateUrl){req.open("GET",_1d,true);req.send(null);this.lastValidateUrl=_1d}_13.ajax=true;_18.bChangeFlag=false;return false}else return this.errorStr!=null},isChecked:function(){if(this.eCheckbox)return this.eCheckbox.checked;return false},getErrorStr:function(){return this.errorStr}}).endType();
vjo.ctype("vjo.darwin.domain.finding.magellan.globalaspect.searchwithin.SearchWithinHandler").needs("vjo.dsf.Element").protos({constructs:function(_1,_2,_3,_4){this.sId=_1;this.sFormId=_2;this.sDesUrl=_3;this.sDefaultUrl=_4;var vE=vjo.dsf.Element;this.eCheckbox=vE.get(this.sId);this.eForm=vE.get(this.sFormId)},handle:function(_6){if(this.isChecked())this.setDesUrl();else this.setDefaultUrl()},isChecked:function(){if(this.eCheckbox)return this.eCheckbox.checked;return false},setDesUrl:function(){if(this.eForm)this.eForm.action=
this.sDesUrl},setDefaultUrl:function(){if(this.eForm)this.eForm.action=this.sDefaultUrl}}).endType();
vjo.ctype("vjo.darwin.domain.finding.magellan.globalaspect.searchwithin.SearchWithinAspect").needs(["vjo.dsf.Element","vjo.darwin.domain.finding.dialog.PanelSaveHandler","vjo.darwin.domain.finding.magellan.globalaspect.searchwithin.SearchWithinHandler"]).protos({constructs:function(_1){var c=_1;this.oC=_1;var vE=vjo.dsf.Element;this.eForm=vE.get(c.formId);this.eTitleDesc=vE.get(c.titleDescId);this.eCompleted=vE.get(c.completedId);this.defaultSearchUrl=c.defaultSearchUrl;this.titleDescSearchUrl=c.titleDescSearchUrl;
this.completedSearchUrl=c.completedSearchUrl;var _4=new vjo.darwin.domain.finding.magellan.globalaspect.searchwithin.SearchWithinHandler(c.titleDescId,c.formId,c.titleDescSearchUrl,c.defaultSearchUrl);vjo.dsf.EventDispatcher.detachHandlers(c.titleDescId,"click");vjo.dsf.EventDispatcher.add(c.titleDescId,"click",_4);var _5=new vjo.darwin.domain.finding.magellan.globalaspect.searchwithin.SearchWithinHandler(c.completedId,c.formId,c.completedSearchUrl,c.defaultSearchUrl);vjo.dsf.EventDispatcher.detachHandlers(c.completedId,
"click");vjo.dsf.EventDispatcher.add(c.completedId,"click",_5);var _6={oC:this.oC,handle:function(_7){var vE=vjo.dsf.Element;this.eForm=vE.get(this.oC.formId);this.eTitleDesc=vE.get(this.oC.titleDescId);this.eCompleted=vE.get(this.oC.completedId);this.defaultSearchUrl=this.oC.defaultSearchUrl;this.titleDescSearchUrl=this.oC.titleDescSearchUrl;this.completedSearchUrl=this.oC.completedSearchUrl;if(this.eTitleDesc&&this.eTitleDesc.checked)this.eForm.action=this.titleDescSearchUrl;else if(this.eCompleted&&
this.eCompleted.checked)this.eForm.action=this.completedSearchUrl;else this.eForm.action=this.defaultSearchUrl}};vjo.dsf.EventDispatcher.add("body","load",_6);_6.handle()}}).endType();
vjo.ctype("vjo.darwin.domain.finding.magellan.globalaspect.fromlocation.FromLocationHandler").needs(["vjo.dsf.EventDispatcher","vjo.dsf.Message","vjo.dsf.Element","vjo.dsf.ServiceEngine"]).protos({constructs:function(_1){var c=_1;this.sId=c.checkboxFromLocation;this.sDisableCssName=c.disableCssName;this.sTitleID=c.titleID;this.sElementList=c.elemList;var vE=vjo.dsf.Element;this.eCheckbox=vE.get(this.sId);this.eTitleDiv=vE.get(this.sTitleID);var _4=this.sElementList.split(";");for(var i=0;_4&&i<_4.length;i++){var _6=
_4[i].split(",");if(_6[1]&&_6[1]!="");}},foo:function(_7){var f=_7},handle:function(_9){if(this.isChecked())this.setDisable(false);else this.setDisable(true)},isChecked:function(){if(this.eCheckbox)return this.eCheckbox.checked;return false},setDisable:function(_a){var _b=this.sElementList.split(";");for(var i=0;_b&&i<_b.length;i++){var _d=_b[i].split(",");if(_d[0]&&_d[0]!=""){vjo.dsf.Element.get(_d[0]).disabled=_a;vjo.dsf.Element.get(_d[1]).disabled=_a}}if(this.eTitleDiv)if(_a)this.eTitleDiv.className=
this.sDisableCssName;else this.eTitleDiv.className=""},setFromLocationChecked:function(){var _e=vjo.dsf.Element.get(this.sId);if(_e)_e.checked=true},chooseAvailableTo:function(){var _f=vjo.dsf.Element.get("LH_AvailToRadio");if(_f)_f.checked=true}}).endType();
vjo.ctype("vjo.darwin.domain.finding.magellan.globalaspect.fromlocation.FromLocationAspect").needs(["vjo.dsf.Element","vjo.darwin.domain.finding.dialog.PanelSaveHandler","vjo.darwin.domain.finding.magellan.globalaspect.fromlocation.FromLocationHandler"]).protos({constructs:function(_1){this.oC=_1;var vE=vjo.dsf.Element;if(this.oC.simpleVersion)return false;this.eCheckbox=vE.get(this.oC.checkboxFromLocation);vjo.dsf.EventDispatcher.detachHandlers(this.oC.checkboxFromLocation,"click");var _3=new vjo.darwin.domain.finding.magellan.globalaspect.fromlocation.FromLocationHandler(_1);
vjo.dsf.EventDispatcher.add(this.oC.checkboxFromLocation,"click",_3);vjo.dsf.ServiceEngine.registerSvcRespHdl("LOCATION_ENABLE",function(){_3.setDisable(false);_3.setFromLocationChecked();_3.chooseAvailableTo()});vjo.dsf.EventDispatcher.detachHandlers(this.oC.preferLocSelect,"change");vjo.dsf.EventDispatcher.detachHandlers(this.oC.preferLocRadio,"click");vjo.dsf.EventDispatcher.add(this.oC.preferLocSelect,"change",function(){vjo.dsf.ServiceEngine.handleRequest(new vjo.dsf.Message("CURREMCY_RESET"))});
vjo.dsf.EventDispatcher.add(this.oC.preferLocRadio,"click",function(){vjo.dsf.ServiceEngine.handleRequest(new vjo.dsf.Message("CURREMCY_RESET"))});var _4=new vjo.darwin.domain.finding.dialog.PanelSaveHandler(_1.checkboxFromLocation);vjo.dsf.EventDispatcher.add(this.oC.checkboxFromLocation,"click",_4);this.initHandler={oC:this.oC,handle:function(_5){var vE=vjo.dsf.Element;var _7=vE.get(this.oC.checkboxFromLocation);if(_7&&!_7.checked){var _8=this.oC.elemList.split(";");for(var i=0;_8&&i<_8.length;i++){var _a=
_8[i].split(",");if(_a[0]&&_a[0]!=""){vjo.dsf.Element.get(_a[0]).disabled=true;vjo.dsf.Element.get(_a[1]).disabled=true}}var _b=vE.get(this.oC.titleID);if(_b)_b.className=this.oC.disableCssName}}};vjo.dsf.EventDispatcher.add("body","load",this.initHandler);this.initHandler.handle()},hasError:function(){if(this.eCheckbox&&this.eCheckbox.checked);return false},getErrorStr:function(){return this.oC.errorStr},initState:function(){if(!this.oC.simpleVersion)this.initHandler.handle()}}).endType();
vjo.ctype("vjo.darwin.domain.finding.magellan.globalaspect.fromseller.FromSellerHandler").needs("vjo.dsf.Element").protos({constructs:function(_1){var c=_1;this.sId=c.checkBoxSpecificSeller;this.sSelectSlop=c.selectSlop;this.sInputSlnm=c.inputSlnm;this.sTitleDivId=c.titleDivId;this.sDisableCssName=c.disableCssName;this.sSpecificSeller=c.radioSpecificSeller;this.sStoreSeller=c.radioStoreSeller;this.sFavSeller=c.radioFavSeller;this.sTopSeller=c.radioTopRatedSeller;this.sOutletSeller=c.radioOutletMallSeller;
var vE=vjo.dsf.Element;this.eCheckbox=vE.get(this.sId);this.eSelectSlop=vE.get(this.sSelectSlop);this.eInputSlnm=vE.get(this.sInputSlnm);this.eTitleDiv=vE.get(this.sTitleDivId);this.eSpecificSeller=vE.get(this.sSpecificSeller);this.eStoreSeller=vE.get(this.sStoreSeller);this.eFavSeller=vE.get(this.sFavSeller);this.eTopSeller=vE.get(this.sTopSeller);this.eOutletSeller=vE.get(this.sOutletSeller)},handle:function(_4){if(this.isChecked())this.setDisable(false);else this.setDisable(true)},isChecked:function(){if(this.eCheckbox)return this.eCheckbox.checked;
return false},setDisable:function(_5){if(this.eSelectSlop)this.eSelectSlop.disabled=_5;if(this.eInputSlnm)this.eInputSlnm.disabled=_5;if(this.eSpecificSeller)this.eSpecificSeller.disabled=_5;if(this.eStoreSeller)this.eStoreSeller.disabled=_5;if(this.eFavSeller)this.eFavSeller.disabled=_5;if(this.eTopSeller)this.eTopSeller.disabled=_5;if(this.eOutletSeller){var _6=this.eOutletSeller.getAttribute("cateDisable");if(_6){if(_6=="0")this.eOutletSeller.disabled=_5}else this.eOutletSeller.disabled=_5}if(this.eTitleDiv)if(_5)this.eTitleDiv.className=
this.sDisableCssName;else this.eTitleDiv.className="";if(!_5){var _7=this.eSpecificSeller?this.eSpecificSeller.checked:false;var bStoreSeller=this.eStoreSeller?this.eStoreSeller.checked:false;var bFavSeller=this.eFavSeller?this.eFavSeller.checked:false;var bTopSeller=this.eTopSeller?this.eTopSeller.checked:false;var bOutletSeller=this.eOutletSeller?this.eOutletSeller.checked:false;if(!_7&&!bStoreSeller&&!bFavSeller)if(this.eSpecificSeller)this.eSpecificSeller.checked=true;else if(this.eStoreSeller)this.eStoreSeller.checked=
true;else if(this.eFavSeller)this.eFavSeller.checked=true;else if(this.eTopSeller)this.eTopSeller.checked=true;else if(this.eOutletSeller)this.eOutletSeller.checked=true}}}).endType();
vjo.ctype("vjo.darwin.domain.finding.magellan.globalaspect.fromseller.FromSellerAspect").needs(["vjo.dsf.Element","vjo.darwin.domain.finding.magellan.globalaspect.fromseller.FromSellerHandler","vjo.darwin.domain.finding.dialog.PanelSaveHandler"]).protos({constructs:function(_1){var c=_1;this.oC=_1;var vE=vjo.dsf.Element;this.eCheckbox=vE.get(c.checkBoxSpecificSeller);this.eSelectSlop=vE.get(c.selectSlop);this.eInputSlnm=vE.get(c.inputSlnm);this.eSpecificSeller=vE.get(c.radioSpecificSeller);this.eStoreSeller=
vE.get(c.radioStoreSeller);this.eFavSeller=vE.get(c.radioFavSeller);this.eTopSeller=vE.get(c.radioTopRatedSeller);this.eOutletSeller=vE.get(c.radioOutletMallSeller);this.iTimeOut=500;vjo.dsf.EventDispatcher.detachHandlers(c.checkBoxSpecificSeller,"click");var _4=new vjo.darwin.domain.finding.magellan.globalaspect.fromseller.FromSellerHandler(_1);vjo.dsf.EventDispatcher.add(c.checkBoxSpecificSeller,"click",_4);var _5=new vjo.darwin.domain.finding.dialog.PanelSaveHandler(c.checkBoxSpecificSeller);vjo.dsf.EventDispatcher.add(c.checkBoxSpecificSeller,
"click",_5);var _6=this;this.initHandler={handle:function(_7){window.setTimeout(this.doInit,_6.iTimeOut)},doInit:function(){var vE=vjo.dsf.Element;var _9=vE.get(_6.oC.checkBoxSpecificSeller);if(_9){var _a=_9.checked;var _b=vE.get(_6.oC.selectSlop);if(_b)_b.disabled=!_a;var _c=vE.get(_6.oC.inputSlnm);if(_c)_c.disabled=!_a;var _d=vE.get(_6.oC.radioSpecificSeller);if(_d)_d.disabled=!_a;var _e=vE.get(_6.oC.radioStoreSeller);if(_e)_e.disabled=!_a;var _f=vE.get(_6.oC.radioFavSeller);if(_f)_f.disabled=!_a;
var _10=vE.get(_6.oC.radioTopRatedSeller);if(_10)_10.disabled=!_a;var _11=vE.get(_6.oC.radioOutletMallSeller);if(_11)_11.disabled=!_a;var _12=vE.get(_6.oC.titleDivId);if(_12)_12.className=!_a?_6.oC.disableCssName:""}}};vjo.dsf.EventDispatcher.add("body","load",this.initHandler);this.initHandler.doInit()},hasError:function(){if(this.eCheckbox&&this.eCheckbox.checked)if(this.eSpecificSeller&&this.eSpecificSeller.checked)if(this.eInputSlnm&&this.eInputSlnm.value=="")return true;return false},getErrorStr:function(){return this.oC.errorStr},
initState:function(){this.initHandler.doInit()}}).endType();
vjo.ctype("vjo.darwin.domain.finding.magellan.common.CheckboxRadios").needs(["vjo.dsf.Element","vjo.dsf.EventDispatcher","vjo.darwin.domain.finding.dialog.PanelSaveHandler"]).protos({constructs:function(_1){this.vE=vjo.dsf.Element;this.eD=vjo.dsf.EventDispatcher;var c=_1;this.panel=this.vE.get(c.radiosPanelId);this.checkbox=this.vE.get(c.checkboxId);this.radios=this.panel.getElementsByTagName("input");this.checkStatus();this.eD.detachHandlers(c.checkboxId,"click");var _3=new vjo.darwin.domain.finding.dialog.PanelSaveHandler(c.checkboxId);
this.eD.add(c.checkboxId,"click",this.checkStatus,this);this.eD.add(c.checkboxId,"click",_3)},checkStatus:function(){if(this.checkbox.checked){this.panel.className="cbRdoPnlon";this.disableRadios(false)}else{this.panel.className="cbRdoPnloff";this.disableRadios(true)}},disableRadios:function(v){var _5=this.radios.length;for(var _6=0;_6<_5;_6++)this.radios[_6].disabled=v}}).endType();
vjo.ctype("vjo.darwin.domain.finding.magellan.common.CheckboxDropdown").needs(["vjo.dsf.Element","vjo.darwin.domain.finding.dialog.PanelSaveHandler"]).protos({constructs:function(_1){var vE=vjo.dsf.Element;var c=_1;var _4=new vjo.darwin.domain.finding.dialog.PanelSaveHandler(c.checkboxId);var eD=vjo.dsf.EventDispatcher;eD.detachHandlers(c.checkboxId,"click");eD.detachHandlers(c.dropdownId,"change");eD.add(c.checkboxId,"click",_4);eD.add(c.dropdownId,"change",_4)}}).endType();
vjo.ctype("vjo.darwin.domain.finding.magellan.globalaspect.listings.ListingsAspect").needs(["vjo.dsf.Element","vjo.darwin.domain.finding.dialog.PanelSaveHandler"]).protos({constructs:function(_1){var vE=vjo.dsf.Element;var c=this.oC=_1;this.eCheckbox=vE.get(c.checkbox);this.eTypeSelect=vE.get(c.typeSelect);this.eValueSelect=vE.get(c.valueSelect);var _4=new vjo.darwin.domain.finding.dialog.PanelSaveHandler(c.checkbox);var eD=vjo.dsf.EventDispatcher;vjo.dsf.EventDispatcher.detachHandlers(c.checkbox,
"click");eD.add(c.checkbox,"click",_4);vjo.dsf.EventDispatcher.detachHandlers(c.typeSelect,"change");eD.add(c.typeSelect,"change",_4);vjo.dsf.EventDispatcher.detachHandlers(c.valueSelect,"change");eD.add(c.valueSelect,"change",_4)},hasError:function(){return false},isChecked:function(){if(this.eCheckbox)return this.eCheckbox.checked;return false}}).endType();
vjo.ctype("vjo.darwin.domain.finding.magellan.globalaspect.range.RangeAspect").needs(["vjo.dsf.Element","vjo.darwin.domain.finding.dialog.PanelSaveHandler"]).protos({constructs:function(_1){var c=_1;this.oC=_1;var vE=vjo.dsf.Element;this.eCheckbox=vE.get(c.checkbox);this.eMin=vE.get(c.minId);this.eMax=vE.get(c.maxId);var _4=new vjo.darwin.domain.finding.dialog.PanelSaveHandler(c.checkbox);vjo.dsf.EventDispatcher.detachHandlers(c.checkbox,"click");vjo.dsf.EventDispatcher.add(c.checkbox,"click",_4);
vjo.dsf.EventDispatcher.detachHandlers(c.minId,"keyup");vjo.dsf.EventDispatcher.add(c.minId,"keyup",_4);vjo.dsf.EventDispatcher.detachHandlers(c.maxId,"keyup");vjo.dsf.EventDispatcher.add(c.maxId,"keyup",_4)},hasError:function(){var _5=typeof this.eMin!="undefined"?this.eMin.value:"";var _6=typeof this.eMax!="undefined"?this.eMax.value:"";if(!this.isChecked())return false;if(_5===""&&_6==="")return true;if(_5.length>0&&!this.isValidValue(_5))return true;if(_6.length>0&&!this.isValidValue(_6))return true;
return false},getErrorStr:function(){return this.oC.errorStr},isChecked:function(){if(this.eCheckbox)return this.eCheckbox.checked;return false},isValidValue:function(_7){var _8=new RegExp("[^0-9,.]","g");return!_7.match(_8)}}).endType();
vjo.ctype("vjo.darwin.domain.finding.magellan.globalaspect.keyword.KeywordAspect").needs(["vjo.dsf.Element","vjo.dsf.document.Form"]).protos({constructs:function(_1){var c=_1;if(c.oDlg)c.oDlg.bForceReload=true}}).props({onFocus:function(_3){document.getElementById(_3).select();return false}}).endType();
vjo.ctype("vjo.darwin.domain.finding.magellan.globalaspect.date.DateAnchorHandler").needs("vjo.dsf.Element").protos({constructs:function(_1,_2){this.oDateFilter=_1;this.serviceId="CALENDAR_OPEN_SERVICE";var vE=vjo.dsf.Element;this.input=vE.get(_2)},handle:function(_4){var _5=this.input.value||"";this.input.disabled=true;this.oDateFilter.eSelectedInput=this.input;var _6=new vjo.dsf.Message(this.serviceId);_6.clientContext={anchor:_4.src,value:_5};_6.returnData=false;return _6}}).endType();
vjo.ctype("vjo.darwin.domain.finding.magellan.globalaspect.date.DateAspect").needs(["vjo.dsf.Element","vjo.darwin.domain.finding.magellan.globalaspect.date.DateAnchorHandler","vjo.darwin.domain.finding.dialog.PanelSaveHandler"]).protos({constructs:function(_1){var vE=vjo.dsf.Element;this.oCfg=_1;this.eSelectedInput=null;this.sFormat=_1.format;this.eMin=vE.get(_1.inputs[0]);this.eMax=vE.get(_1.inputs[1]);var _3=vjo.darwin.domain.finding.dialog.PanelSaveHandler;vjo.dsf.EventDispatcher.detachHandlers(_1.inputs[0],
"change");vjo.dsf.EventDispatcher.add(_1.inputs[0],"change",new _3(_1.inputs[0]));vjo.dsf.EventDispatcher.detachHandlers(_1.inputs[1],"change");vjo.dsf.EventDispatcher.add(_1.inputs[1],"change",new _3(_1.inputs[1]))},init:function(){var c=this.oCfg;if(c.anchors.length!=c.inputs.length)return;var _5=c.anchors.length;for(var i=0;i<_5;i++){var a=c.anchors[i];var inp=c.inputs[i];var _8=vjo.darwin.domain.finding.magellan.globalaspect.date.DateAnchorHandler;vjo.dsf.EventDispatcher.detachHandlers(a,"click");
vjo.dsf.EventDispatcher.add(a,"click",new _8(this,inp))}vjo.dsf.ServiceEngine.registerSvcHdl("CALENDAR_DATE_SELECTED_SERVICE",this)},setSelected:function(_9){if(this.eSelectedInput){this.eSelectedInput.disabled=false;if(_9){this.eSelectedInput.value=_9;var _a=new vjo.dsf.Message("PANEL_SAVE_SELECTION_SERVICE");_a.clientContext={elem:this.eSelectedInput};vjo.dsf.ServiceEngine.handleRequest(_a)}if((this.eMax.value==""||this.eMax.value==this.sFormat)&&this.eMin.value!="")this.eMax.value=this.eMin.value}},
invoke:function(_b){if(!_b.clientContext)return;this.setSelected(_b.clientContext.value)}}).endType();
vjo.ctype("vjo.darwin.domain.finding.magellan.globalaspect.currency.CurrencyAspect").needs(["vjo.dsf.EventDispatcher","vjo.dsf.Message","vjo.dsf.ServiceEngine"]).protos({constructs:function(_1){this.jsModel=_1;if(this.jsModel!=null){var _2=this.changeHdl;var _3=this.jsModel.currencyDropDown;this.currencySelect=document.getElementById(_3);vjo.dsf.EventDispatcher.detachHandlers(_3,"change");vjo.dsf.EventDispatcher.add(_3,"change",function(){_2(_3)});var _4=this.currencySelect;if(_4)vjo.dsf.ServiceEngine.registerSvcRespHdl("CURREMCY_RESET",
function(){_4.options[0].selected=true})}},changeHdl:function(id){var _6=document.getElementById(id);if(_6&&_6.options[0]&&!_6.options[0].selected)vjo.dsf.ServiceEngine.handleRequest(new vjo.dsf.Message("LOCATION_ENABLE"));var _7=new vjo.dsf.Message("PANEL_SAVE_SELECTION_SERVICE");var _8={elem:{type:"select",id:"currencyDropDown"}};_7.clientContext=_8;vjo.dsf.ServiceEngine.handleRequest(_7)},sortCurrency:function(){var _9=this.currencySelect.options;var _a=new Array;var _b=this.sortHdl;if(_9&&_9.length>
2){var _c=_9.length;for(var i=2;i<_c;i++)_a.push(_9[i]);var _e=_a.sort(_b);_c=_e.length;for(i=0;i<_c;i++)this.currencySelect.appendChild(_e[i])}},sortHdl:function(a,b){return a.text>=b.text?1:-1},hasError:function(){return false},getErrorStr:function(){return""}}).endType();
vjo.ctype("vjo.darwin.domain.finding.magellan.globalaspect.moreoptionsadvsearch.MoreOptionsAdvSearch").needs(["vjo.dsf.Element","vjo.dsf.EventDispatcher"]).protos({constructs:function(_1){var vE=vjo.dsf.Element;this.dlgForm=vE.get("M6NDlgForm");if(this.dlgForm&&_1){this.dlgForm.action=_1;this.dlgForm.submit()}}}).endType();
vjo.ctype("vjo.darwin.domain.finding.magellan.globalaspect.GlobalAspect").needs("vjo.dsf.EventDispatcher").protos({constructs:function(_1){this.model=_1;vjo.dsf.EventDispatcher.addEventListener(window,"load",this.onLoad,this)},onLoad:function(_2){try{this.registerPnlCnt(this.model)}catch(e){alert("Error in registerPnlCnt: "+e)}},registerPnlCnt:function(_3){if(_3&&_3.type)if(_3.type=="_List"&&_3.modelList instanceof Array)for(var i in _3.modelList)this.registerPnlCnt(_3.modelList[i]);else{var f=new Function("return new "+
_3.type+"(arguments[0])");var pc=f(_3);this.invoke(pc,"init",false,_3)}},invoke:function(_7,_8,_9,_a){var b=_7&&_7[_8]&&_7[_8]instanceof Function;if(b)return _7[_8](_a);else{if(_9)alert("function is required but not implemented: "+_8);return null}}}).endType();
vjo.ctype("vjo.darwin.domain.finding.magellan.aspect.DefaultAspectLink").needs(["vjo.dsf.EventDispatcher","vjo.dsf.utils.UriBuilder"]).props({onClick:function(_1){var _2=vjo.dsf.EventDispatcher.target(_1);this.AjaxUtils=vjo.darwin.transitional.ajax.AjaxUtils;var _3=this.AjaxUtils.getAjaxManager("Page");if(_3==null)return this.AjaxUtils.reload(_2.href);var _4=(new vjo.dsf.utils.UriBuilder(_3.getState("Page"),true)).getUri().match(/LH_TitleDesc|LH_Complete/);var _5=(new vjo.dsf.utils.UriBuilder(_2.href,
true)).getUri().match(/LH_TitleDesc|LH_Complete/);if(_4&&(_5==null||_5[0]!=_4[0]))return this.AjaxUtils.reload(_2.href);else if(_5&&(_4==null||_4[0]!=_5[0]))return this.AjaxUtils.reload(_2.href);_3.sendRequest("Page",_2.href,true);return false}}).endType();
vjo.ctype("vjo.darwin.domain.finding.magellan.constraint.ConstraintCancel").needs(["vjo.dsf.EventDispatcher","vjo.dsf.utils.UriBuilder"]).props({onClick:function(_1){var _2=vjo.dsf.EventDispatcher.target(_1);this.AjaxUtils=vjo.darwin.transitional.ajax.AjaxUtils;var _3=this.AjaxUtils.getAjaxManager("Page");if(_3==null)return this.AjaxUtils.reload(_2.href);var _4=(new vjo.dsf.utils.UriBuilder(_3.getState("Page"),true)).getUri().match(/LH_TitleDesc|LH_Complete/);var _5=(new vjo.dsf.utils.UriBuilder(_2.href,
true)).getUri().match(/LH_TitleDesc|LH_Complete/);if(_4&&(_5==null||_5[0]!=_4[0]))return this.AjaxUtils.reload(_2.href);else if(_5&&(_4==null||_4[0]!=_5[0]))return this.AjaxUtils.reload(_2.href);_3.sendRequest("Page",_2.href,true);return false}}).endType();

