
vjo.ctype("vjo.dsf.document.Text").needs("vjo.dsf.Element").props({autoClear:function(_1){var o=vjo.dsf.Element.get(_1);if(o){if(o.defaultValue==o.value){o.value="";}}}}).endType();

vjo.ctype("vjo.darwin.app.emr.reportreasons.VeroReporting").needs("vjo.dsf.document.Element").protos({constructs:function(_1,_2){this.sobjType="VeroReporting";this.sSelectValue=_1;this.sDiv=_2;},onchange:function(_3){var _4=_3.nativeEvent.srcElement||_3.nativeEvent.target;if(vjo.dsf.document.Element.get(this.sDiv)){var _5=_4.options[_4.selectedIndex];if(_5.value==this.sSelectValue){vjo.dsf.document.Element.get(this.sDiv).style.display="block";}else{vjo.dsf.document.Element.get(this.sDiv).style.display="none";}}}}).endType();

vjo.ctype("vjo.darwin.app.emr.reportreasons.WebformReporting").needs(["vjo.dsf.document.Element","vjo.dsf.document.Form"]).protos({constructs:function(_1,_2,_3,_4,_5,_6,_7,_8,_9,_a){this.sobjType="ReportReason";this.aElems=_1;this.aTopicStruct=eval("("+_2+")");this.oDiv=_3;this.getElementById=vjo.dsf.document.Element;this.oForm=vjo.dsf.document.Form.get(_4);this.sCommand=_5;this.aValue=_6;this.sDefaultSelect=_7;this.sButtonId=_8;this.sLinkId=_9;this.bPcWireOn=_a;this.bDrpChildDisplay=false;this.init();this.initDisplay();if(this.bPcWireOn){this.ButtonHide();this.LinkHide();}
if(this.getElementById.get("seller")){this.Seller=this.getElementById.get("seller").value;}
if(this.getElementById.get("items")){this.ItemId=this.getElementById.get("items").value;}},init:function(){var oP,oElemHierarchy;oP=this;oElemHierarchy=this;for(var i=0;i<this.aElems.length;i++){var _d=this.getElementById.get(this.aElems[i]);oP.child=_d;oP.iChild=i;oP=_d;}
for(var i=0;i<this.aElems.length;i++){var _d=this.getElementById.get(this.aElems[i]);this.ClearAll(_d);}},ctnOnclick:function(){this.ButtonHide();this.LinkHide();this.PostForm();return false;},onchange:function(_e){if(this.getElementById.get(this.oDiv)){this.getElementById.get(this.oDiv).style.display="none";}
var _f=_e.nativeEvent.srcElement||_e.nativeEvent.target;this.Update(_f);},initDisplay:function(){this.oData=this.aTopicStruct;this.child.oData=this.oData;if(this.bPcWireOn){var cnt=0;for(i in this.aTopicStruct){cnt=cnt+1;}}
if(cnt==1&&this.bPcWireOn){this.bDrpChildDisplay=true;for(drpElem in this.aTopicStruct){sArr=this.aTopicStruct[drpElem];this.aTopicStruct=sArr;this.oData=sArr;this.child.oData=sArr;}
this.InsertOption(this.child);}else{this.InsertOption(this.child);}
if(this.aValue!=null){this.populateSelect();}},populateSelect:function(){for(i=0;i<this.aValue.length;i++){if(this.aValue[i]!=-1){selValue=this.getElementById.get(this.aElems[i]);selValue.selectedIndex=this.aValue[i];if(selValue.selectedIndex!=-1){selOpt=selValue.options[selValue.selectedIndex];if(selValue.child){selValue.child.oData=selValue.oData[selOpt.text];if(typeof(selValue.child.oData)!="string"){this.InsertOption(selValue.child);}}else{this.InsertOption(selValue);oDiv=this.getElementById.get(selValue.name+"_div");oDiv.style.display="block";}}}}},Update:function(_11){if(this.bPcWireOn){if(typeof(_11.child)=="undefined"){if(this.bPcWireOn){this.ButtonShow();this.LinkShow();}else{this.PostForm();}
return;}
this.ClearAll(_11.child);_11.child.oData=this.oData;for(i=0;i<_11.iChild;i++){selValue=this.getElementById.get(this.aElems[i]);selOpt=selValue.options[selValue.selectedIndex];_11.child.oData=_11.child.oData[selOpt.text];}
if(typeof(_11.child.oData)=="string"){if(this.bPcWireOn){this.ButtonShow();this.LinkShow();}else{this.PostForm();}}else{if(this.bDrpChildDisplay){if(_11.iChild==2){oDiv=this.getElementById.get(_11.child.name+"_div");oDiv.style.display="block";}else{for(i=0;i<this.aElems.length;i++){var _12=this.getElementById.get(this.aElems[i]);if(this.bDrpChildDisplay){if(_12.iChild==2){oDiv=this.getElementById.get(_12.child.name+"_div");oDiv.style.display="none";this.ButtonHide();this.LinkHide();}}else{if(_12.iChild==3){oDiv=this.getElementById.get(_12.child.name+"_div");oDiv.style.display="none";}}}}}else{if(_11.iChild==3){oDiv=this.getElementById.get(_11.child.name+"_div");oDiv.style.display="block";}else{for(i=0;i<this.aElems.length;i++){var _12=this.getElementById.get(this.aElems[i]);if(this.bDrpChildDisplay){if(_12.iChild==2){oDiv=this.getElementById.get(_12.child.name+"_div");oDiv.style.display="none";}}else{if(_12.iChild==3){oDiv=this.getElementById.get(_12.child.name+"_div");oDiv.style.display="none";}}}}}
this.InsertOption(_11.child);}}else{if(typeof(_11.child)=="undefined"){this.PostForm();return;}
this.ClearAll(_11.child);_11.child.oData=this.oData;for(i=0;i<_11.iChild;i++){selValue=this.getElementById.get(this.aElems[i]);selOpt=selValue.options[selValue.selectedIndex];_11.child.oData=_11.child.oData[selOpt.text];}
if(typeof(_11.child.oData)=="string"){this.PostForm();}else{if(_11.iChild==3){oDiv=this.getElementById.get(_11.child.name+"_div");oDiv.style.display="block";}else{for(i=0;i<this.aElems.length;i++){var _12=this.getElementById.get(this.aElems[i]);if(_12.iChild==3){oDiv=this.getElementById.get(_12.child.name+"_div");oDiv.style.display="none";}}}
this.InsertOption(_11.child);}}},ButtonShow:function(){oButton=this.getElementById.get(this.sButtonId);oButton.style.display="block";},ButtonHide:function(){oButton=this.getElementById.get(this.sButtonId);if(oButton){oButton.style.display="none";}},LinkHide:function(){oLink=this.getElementById.get(this.sLinkId);if(oLink){oLink.style.display="none";}},LinkShow:function(){oLink=this.getElementById.get(this.sLinkId);oLink.style.display="block";},PostForm:function(){if(this.getElementById.get("eventid")){this.getElementById.get("eventid").value=4;}
if(this.getElementById.get("state")){this.getElementById.get("state").value=2;}
aP=this.oForm.elements,iPLen=aP.length;for(var j=0;j<iPLen;j++){if(aP[j].type=="hidden"||aP[j].type=="select-one"){if(aP[j].name=="items"){aP[j].value=this.ItemId;}
if(aP[j].name=="seller"){aP[j].value=this.Seller;}}else{aP[j].disabled=true;}}
this.oForm.action=this.sCommand;this.oForm.submit();},InsertOption:function(_14){for(var _15 in _14.oData){this.CreateOption(_14,_15,_14.oData[_15]);}},ClearAll:function(_16){var cnt=0;this.ClearOptions(_16);this.CreateOption(_16,this.sDefaultSelect,-1);if(_16.child){if(this.bPcWireOn){for(i in this.aTopicStruct){cnt=cnt+1;}
if(cnt==1){if(_16.iChild==2){oDiv=this.getElementById.get(_16.child.name+"_div");oDiv.style.display="none";}}else{for(i in this.aTopicStruct){if(_16.iChild==3){oDiv=this.getElementById.get(_16.child.name+"_div");oDiv.style.display="none";}}}}else{if(_16.iChild==3){oDiv=this.getElementById.get(_16.child.name+"_div");oDiv.style.display="none";}}
this.ClearOptions(_16.child);this.CreateOption(_16.child,this.sDefaultSelect,-1);}},CreateOption:function(_18,_19,_1a){var _1b=new Option(_19,_1a);opts=_18.options;opts[opts.length]=_1b;},ClearOptions:function(_1c){var e=_1c;if(e){var _1e=e.options;while(_1e.length>0){_1e[_1e.length-1]=null;}}}}).endType();

vjo.ctype("vjo.darwin.app.emr.reportreasons.PSUCheck").needs("vjo.dsf.document.Element").props({onCheckboxStateChange:function(_1,_2){if(vjo.dsf.document.Element.get(_1).checked===true){vjo.dsf.document.Element.get(_2).style.display="block";}else{vjo.dsf.document.Element.get(_2).style.display="none";}}}).endType();

vjo.ctype("vjo.darwin.component.common.actbutton.ActionButtonImgPreloader").needs("vjo.dsf.utils.Object").needs("vjo.dsf.client.Browser").needs("vjo.dsf.EventDispatcher").singleton().protos({constructs:function(){this.aLoaded=[];this.bPageLoaded=false;var _1=vjo.dsf.utils.Object.hitch(this,"preloadAll");vjo.dsf.EventDispatcher.add("body","load",_1);this.fixIE6ImgCaching();},preload:function(_2){if(!_2||!_2.length){return;}
var i=0;for(;i<_2.length;i++){if(!this.aLoaded[_2[i]]){if(!this.bPageLoaded){this.aLoaded[_2[i]]=true;}else{this.checkAndPreload(_2[i]);this.aLoaded[_2[i]]=true;}}}},preloadAll:function(){this.bPageLoaded=true;for(var _4 in this.aLoaded){this.checkAndPreload(_4);}},checkAndPreload:function(_5){if(typeof(_5)=="string"&&_5.match(/http.+/)){var _6=new Image();_6.src=_5;}},fixIE6ImgCaching:function(){var br=vjo.dsf.client.Browser;if(br.bIE&&br.iVer<7){var _8=function(){try{document.execCommand("BackgroundImageCache",false,true);}
catch(err){}};vjo.dsf.EventDispatcher.add("body","load",_8);}}}).inits(function(){vjo.darwin.component.common.actbutton.ActionButtonImgPreloader=new vjo.darwin.component.common.actbutton.ActionButtonImgPreloader();}).endType();

vjo.ctype("vjo.darwin.component.common.actbutton.ActionButton").needs("vjo.dsf.utils.Object").needs("vjo.dsf.utils.Handlers").needs("vjo.dsf.document.Element").needs("vjo.dsf.document.Form").needs("vjo.darwin.component.common.actbutton.ActionButtonImgPreloader").protos({constructs:function(_1,_2,_3,_4,_5,_6,_7,_8,_9,_a){var t=this;t.E=vjo.dsf.document.Element;t.H=vjo.dsf.utils.Handlers;t.sCompId=_1+"Anc";t.sAncId=_1+"Lnk";t.sSubId=_1+"Sub";t.sNoScriptId=_1+"NoScript";t.sFormName=_2;t.bAnonymousForm=_3;t.sUrl=_4;t.iState=_5;t.bShowClicked=_6;t.aStateClzes=_7;t.bForceSubmit=_9;t.fMouseMoveEvtHandler="undefined";if(t.bShowClicked){vjo.darwin.component.common.actbutton.ActionButtonImgPreloader.preload(_8);}
t.initMe(_a);},initMe:function(_c){var t=this,ancBtn=t.E.get(t.sCompId),noScript=t.E.get(t.sNoScriptId);if(noScript&&noScript.style){noScript.style.display="none";}
if(ancBtn){t.switchClz();}
if(_c){var _e=t.E.get(t.sAncId);if(t.bShowClicked){t.H.attachEvt(_e,"mousedown",t.onClick,t);t.H.attachEvt(_e,"mouseup",t.clicked,t);t.H.attachEvt(_e,"keypress",t.onEnter,t);}else{t.H.attachEvt(_e,"click",t.clicked,t);}}},enable:function(_f){this.iState=0;this.switchClz();return false;},monitorMouseOut:function(_10){var t=this;if(2!=t.iState){var _12={x:t.eventLeft(_10),y:t.eventTop(_10)};var _13=t.getAncPos(t.sAncId);var _14={x:_13.x+t.E.get(t.sAncId).offsetWidth,y:_13.y+t.E.get(t.sAncId).offsetHeight};if(_12.x<_13.x||_12.x>_14.x||_12.y<_13.y||_12.y>_14.y){t.iState=0;t.switchClz();t.H.detachEvt(document.body,"mousemove",t.fMouseMoveEvtHandler);}
return false;}},isLeftClick:function(_15){if(window.event){if(window.event.button>1){return false;}}else{if(_15.nativeEvent){if(_15.nativeEvent.button>=1){return false;}}}
return true;},getAncPos:function(_16){var e=vjo.dsf.Element.get(_16),l=t=0;while(e){l+=e.offsetLeft;t+=e.offsetTop;e=e.offsetParent;}
return{x:l,y:t};},eventTop:function(_18){if(_18.pageY!=null){return _18.pageY;}else{if(document.documentElement&&document.documentElement.scrollTop){return _18.clientY+Math.max(document.documentElement.scrollTop,document.body.scrollTop);}else{return _18.clientY+document.body.scrollTop;}}},eventLeft:function(_19){if(_19.pageX!=null){return _19.pageX;}else{if(document.documentElement&&document.documentElement.scrollLeft){return _19.clientX+Math.max(document.documentElement.scrollLeft,document.body.scrollLeft);}else{return _19.clientX+document.body.scrollLeft;}}},onEnter:function(_1a){if(2!=this.iState){if(_1a.nativeEvent){if(_1a.nativeEvent.keyCode==13){this.onClick(_1a);return this.clicked(_1a);}}}},onClick:function(_1b){var t=this;if(!t.isLeftClick(_1b)){return false;}
if(2!=t.iState){t.iState=1;if(t.bShowClicked){t.switchClz();t.fMouseMoveEvtHandler=t.H.attachEvt(document.body,"mousemove",t.monitorMouseOut,t);}}
return false;},clicked:function(_1d){var t=this;if(!t.isLeftClick(_1d)){return false;}
if(2!=t.iState&&t.bForceSubmit){t.iState=0;t.switchClz();if(t.bShowClicked){t.H.detachEvt(document.body,"mousemove",t.fMouseMoveEvtHandler);}
if(t.bAnonymousForm){var _1f=t.E.get(t.sSubId);if(_1f){_1f.click();}}else{if(t.sFormName!="undefined"){var _20=t.E.get(t.sFormName);if(typeof(window.external)!="undefined"&&typeof(window.external)!="unknown"&&window.external!=null&&typeof(window.external.AutoCompleteSaveForm)!="undefined"&&typeof(window.external.AutoCompleteSaveForm)!="unknown"){window.external.AutoCompleteSaveForm(_20);}
vjo.dsf.document.Form.submit(t.sFormName);}else{if(t.sUrl){window.location=t.sUrl;}}}}
return false;},disable:function(_21){if(2!=this.iState){this.iState=2;this.switchClz();}
return false;},switchClz:function(){var dom=vjo.dsf.document.Element;var _23=dom.get(this.sCompId);if(_23){_23.className=this.aStateClzes[this.iState];this.displayCursor(dom.get(this.sAncId),"btnPointerCur");if(this.iState==0){_23.style.opacity="";_23.style.filter="";_23.style.zoom="1";if(this.sFormName){}else{var anc=dom.get(this.sAncId);anc.href=this.sUrl;}}else{if(this.iState==2){_23.style.opacity=".5";_23.style.filter="alpha(opacity=50)";_23.style.zoom="1";this.displayCursor(dom.get(this.sAncId),"btnDefCur");var btn=vjo.dsf.Element.get(this.sAncId);if(btn.tagName=="BUTTON"){btn.style.cursor="default";}
if(this.sFormName){}else{var anc=dom.get(this.sAncId);anc.href="#";}}}}},displayCursor:function(anc,_27){if(anc!==null){anc.className=_27;}}}).endType();

// en_US/e637/EMRApp_ReportingOptionsReasonCodeView_e63710121519_6_en_US
// b=10121519