function $(id){return document.getElementById(id);};function $$($Fcn){return document.createElement($Fcn);};if(typeof(HTMLElement)!="undefined"&&typeof(HTMLElement.prototype.innerText)=="undefined"){eval("HTMLElement.prototype.innerText getter = $Ebn;");eval("HTMLElement.prototype.innerText setter = $JpB;");};function $Ebn(){var $kZJ=this.innerHTML.replace(/<BR>/gi,"\n");return str.replace(/<[^>]+>/g,"");};function $JpB($qoK){var $z98=document.createTextNode($qoK);this.innerHTML="";this.appendChild($z98);};var $qTj=0;var $mlI=1;var $7Fy=2;var $HCJ=$qTj;function KingfisherElement(){this.$OJX=null;};function $u1g(){return this.$OJX;};function $s9h($Fcn){this.$OJX=$Fcn;};function $eoj(){if(this.$PLx)return this.$PLx;else {var $uQq=this.$heQ;if($uQq){if($uQq.$PLx)return $uQq.$PLx;}}return this.getViewModel().$PLx;};function $tlM($7Ca){this.$PLx=$7Ca;};function $QV8(){return this.$QGx;};function $5EN($fCz){this.$QGx=$fCz;};function $bi8(){return this.$Ghk;};function $nDy($Vvx){this.$Ghk=$Vvx;};function $NqA(){return this.$Twe;};function $YGy($VtV){this.$Twe=$VtV;};KingfisherElement.prototype.getTag=$u1g;KingfisherElement.prototype.setTag=$s9h;KingfisherElement.prototype.getContext=$eoj;KingfisherElement.prototype.setContext=$tlM;function isKingfisherComponent($Fcn){return ($Fcn.$gJz!=null&&$Fcn.getId==$M36);};function KingfisherComponent(){};KingfisherComponent.prototype=new KingfisherElement();function $M36(){return this.id;};function $ZnQ(){return this.$I7t;};function $JL3(){if(!this.$I7t){this.$I7t=true;$wJA(this,"onActive",[this]);}};function $R1y(){return this.$bMv;};function $5WB($pP3,$ZgC){if($pP3){if($ZgC)this.style.visibility="visible";else this.style.display='block';}else {if($ZgC)this.style.visibility="hidden";else this.style.display='none';}};KingfisherComponent.prototype.getId=$M36;KingfisherComponent.prototype.isActive=$ZnQ;KingfisherComponent.prototype.activate=$JL3;KingfisherComponent.prototype.getViewModel=$R1y;function KingfisherException($kwF){this.$gJz="KingfisherException";this.$hge=$kwF;};KingfisherException.prototype.getMessage=function (){return this.$hge;};KingfisherException.prototype.toString=function (){return this.$hge;};function AbortException(){this.$hge="abort";};AbortException.prototype=new KingfisherException();function $o7u(e){switch(typeof(e)){case "string":{if(e!="abort"){if(e){alert(e);}else {alert(__ERROR_UNKNOWN);}};break;};case "object":{if(e==null)return ;if(e.$gJz=="KingfisherException"){if(e.$hge!="abort")alert(e);}else {if($onF!=$0oD){alert("name: "+e.name+"\n"+"message: "+e.message+"\n"+"lineNumber: "+e.lineNumber+"\n"+"fileName: "+e.fileName+"\n"+"stack: "+e.stack);}else {var $Fgt="name: "+e.name+"\n"+"errorNumber: "+(e.number&0xFFFF)+"\n"+"message: "+e.message;if(e.$Ppn!=null)$Fgt+="\nsourceFunction: "+e.$Ppn;alert($Fgt);throw e;}};break;}}};function getInstance(id){if(typeof(id)=="object"){return id;}else if(typeof(id)=="string"){return eval(id);}else {return null;}};function $dw2(){return "__control_"+$pKu();};var $kz7=new Array();var $Dea=new Array();function $o9Q($V5V){$kz7.push($V5V);};function $SP2($V5V){$Dea.push($V5V);};function $2FO(){if(typeof(isDynamicDropDown)=="undefined")document.body.style.visibility="visible";if(typeof(__startTime)=="object"&&typeof(__downloadTime)=="object"&&$Jsp!=null){$Jsp.log(__DBUGER_PAGE_DOWNLOAD_TIME+(__downloadTime.getTime()-__startTime.getTime())/1000+" sec.");};var $AFm=$kz7.length;for(var i=0;i<$AFm;i++){$kz7[i]();}if(typeof(isDynamicDropDown)!="undefined")document.body.style.visibility="visible";var $n6R=$W1P.$1IB;for(var i=0;i<$n6R.length;i++){var $lbV=$n6R[i];if($lbV.$gJz=="DataTable"&&$lbV.$feg==null){setTimeout($lbV.id+".refresh();",100);}else if($lbV.$gJz=="TabSet"&&($lbV.$RAc==null||$lbV.$RAc.offsetWidth==0)){setTimeout($lbV.id+".refresh();",200);}};var $Pgv=$Fsy.size();for(var i=0;i<$Pgv;i++){var $G0O=$Fsy.$1IB[i];$wJA($G0O,"onLoad",[$G0O]);};if(typeof(__downloadTime)=="object"&&$Jsp!=null){var $dAN=new Date();$Jsp.log(__DBUGER_PAGE_INIT_TIME+($dAN.getTime()-__downloadTime.getTime())/1000+" sec.");}setTimeout("QuickHelp.showHelp()",1000);};function $W4d(){var $Pgv=$Fsy.size();for(var i=0;i<$Pgv;i++){var $G0O=$Fsy.$1IB[i];$wJA($G0O,"onUnload",[$G0O]);$G0O.destroy();};$Fsy.clear();$Fsy=null;delete $Fsy;var $AFm=$Dea.length;for(var i=0;i<$AFm;i++){$Dea[i]();};$kz7=null;delete $kz7;$Dea=null;delete $Dea;CollectGarbage();};if($onF==$0oD){document.write("<script id=__ie_onload defer src=javascript:void(0)></script>");var $TYm=$("__ie_onload");$TYm.onreadystatechange=function (){if(this.readyState=="complete"){$TYm.onreadystatechange=null;$2FO();}};}else {EventManager.addSystemEvent(window,"onload",$2FO);};EventManager.addSystemEvent(window,"onunload",$W4d);function $4qE(){var $AFm=$L3i.length;for(var i=$AFm-1;i>=0;i--){var $AJc=$L3i[i];$AJc.destroy();delete $L3i[i];}$L3i=null;delete $L3i;};$SP2($4qE);var $Fsy=new HashList();var $zd5="$";function ViewModel($QY6,$sIK,$7Ca){this.$C6f="default";this.$gJz="ViewModel";this.$CvF=$QY6;this.$hol=$sIK;this.$PLx=$7Ca;this.$oSU=new ParameterSet();if(!$QY6)$QY6=$zd5;$Fsy.put($QY6,this);};ViewModel.prototype.destroy=function (){};ViewModel.prototype.getNamespace=function (){return this.$CvF;};ViewModel.prototype.getInstanceId=function (){return this.$hol;};ViewModel.prototype.getContext=function (){return this.$PLx;};ViewModel.prototype.registerDataset=function ($uQq){kingfisher.feather.registerDataset($uQq);};ViewModel.prototype.registerControl=function ($lbV){kingfisher.feather.registerControl($lbV);};ViewModel.prototype.getDataset=function (id){return kingfisher.feather.getDataset(id,this.$CvF);};ViewModel.prototype.getControl=function (id){return kingfisher.feather.getControl(id,this.$CvF);};ViewModel.prototype.properties=function (){return this.$oSU;};ViewModel.prototype.getSkin=function (){return this.$C6f;};ViewModel.prototype.setSkin=function ($8C1){this.$C6f=$8C1;};kingfisher.feather.getViewModel=function ($QY6){if(!$QY6)$QY6=$zd5;return $Fsy.get($QY6);};kingfisher.feather.getDataset=function (id,$QY6){if(id==null)return null;if(typeof(id)=="object"){return id;}else {if($QY6)id=$QY6+"$"+id;var $cf8=$RyR.get(id);if($cf8!=null)return $cf8;else {eval("$cf8="+id+";");if($cf8!=null&&$cf8.$gJz=="Dataset")return $cf8;else return null;}}};kingfisher.feather.getControl=function (id,$QY6){if(id==null)return null;if(typeof(id)=="object"){return id;}else {if($QY6)id=$QY6+"$"+id;return $W1P.get(id);}};kingfisher.feather.listDatasets=function (){var $QVl=new Array();var $n6R=$RyR.$1IB;var $AFm=$n6R.length;for(var i=0;i<$AFm;i++){var $uQq=$n6R[i];$QVl.push($uQq.id);};$QVl.toString=$vwj;return $QVl;};kingfisher.feather.listControls=function (type){var $QVl=new Array();var $n6R=$W1P.$1IB;var $AFm=$n6R.length;for(var i=0;i<$AFm;i++){var $lbV=$n6R[i];if(type&&$lbV.$6Go!=type)continue;$QVl.push($lbV.id);};$QVl.toString=$vwj;return $QVl;};function $vwj(){var s="";var $AFm=this.length;for(var i=0;i<$AFm;i++){if(i>0)s+="\n";s+=this[i];};return s;};var $KQE=new Array();$KQE[0]="unknown";$KQE[1]="string";$KQE[2]="byte";$KQE[3]="short";$KQE[4]="int";$KQE[5]="long";$KQE[6]="float";$KQE[7]="double";$KQE[8]="bigdecimal";$KQE[9]="boolean";$KQE[10]="date";$KQE[11]="time";$KQE[12]="datetime";function Parameter(name,$2xZ){this.$Bys=name;if($2xZ){this.$jEM=$2xZ;}else {this.$jEM=1;};this.$toY=null;};Parameter.prototype.getName=function (){return this.$Bys;};Parameter.prototype.getDataType=function (){return this.$jEM;};Parameter.prototype.setDataType=function ($2xZ){if(typeof($2xZ)=="string"){this.$jEM=0;var $AFm=$KQE.length;for(var i=0;i<$AFm;i++){if($KQE[i]==$2xZ){this.$jEM=i;break;}}}else this.$jEM=$2xZ;};Parameter.prototype.getValue=function (){return this.$toY;};Parameter.prototype.setValue=function ($0DL){this.$toY=$0DL;};function ParameterSet(){this.$khq=new HashList();};ParameterSet.prototype.toString=function (){var s="ParameterSet:\n";var $Pl8=this.$khq;for(var i=0;i<$Pl8.size();i++){var $57q=$Pl8.get(i);s+=$57q.$Bys+": "+$57q.$toY+"\n";};return s;};ParameterSet.prototype.addParameter=function (name,$2xZ){var $57q=new Parameter(name,$2xZ);var $Zyf=name.toLowerCase();this.$khq.put($Zyf,$57q);return $57q;};ParameterSet.prototype.removeParameter=function (name){if(typeof(name)=="number"){var $57q=this.$khq.get(name);this.$khq.remove(name);return $57q;}else {var $Zyf=name.toLowerCase();var $57q=this.$khq.get($Zyf);this.$khq.remove($Zyf);return $57q;}};ParameterSet.prototype.getParameter=function (name){var $khq=this.$khq;if(typeof(name)=="number"){var $57q=this.$khq.get(name);return $57q;}else {var $Zyf=name.toLowerCase();var $57q=this.$khq.get($Zyf);return $57q;}};ParameterSet.prototype.size=function (){return this.$khq.size();};ParameterSet.prototype.setValue=function (name,$0DL,$2xZ){var $57q=this.getParameter(name);if(!$57q&&typeof(name)!="number"){$57q=this.addParameter(name);};if($57q!=null){if($2xZ){$57q.setDataType($2xZ);}if($0DL!=null){switch($57q.$jEM){case 6:;case 7:;case 8:{if(typeof($0DL)!="number"){$0DL=parseFloat($0DL);};break;};case 2:;case 3:;case 4:;case 5:{if(typeof($0DL)!="number"){$0DL=parseInt($0DL,10);}break;};case 9:{if(typeof($0DL)!="boolean"){$0DL=parseBoolean($0DL);};break;};case 10:case 12:{if(typeof($0DL)=="string"){$0DL=parseDate($0DL);}else if(typeof($0DL)=="number")$0DL=new Date($0DL);break;};case 11:{if(typeof($0DL)=="string"){$0DL=parseTime($0DL);}else if(typeof($0DL)=="number")$0DL=new Date($0DL,"HH:mm:ss");break;}}};$57q.$toY=$0DL;}};ParameterSet.prototype.getValue=function (name){var $57q=this.getParameter(name);if($57q!=null){return $57q.$toY;}};ParameterSet.prototype.setDataType=function (name,$2xZ){var $57q=this.getParameter(name);if(!$57q&&typeof(name)!="number"){$57q=this.addParameter(name);};if($57q!=null){if(typeof($2xZ)=="string"){$57q.$jEM=0;var $AFm=$KQE.length;for(var i=0;i<$AFm;i++){if($KQE[i]==$2xZ){$57q.$jEM=i;break;}}}else $57q.$jEM=$2xZ;}};ParameterSet.prototype.getDataType=function (name){var $57q=this.getParameter(name);if($57q!=null){return $57q.$jEM;}};ParameterSet.prototype.clear=function (){this.$khq.clear();};ParameterSet.prototype.assign=function ($H0F){var $n6R=$H0F.$khq.$1IB;var $AFm=$n6R.length;for(var i=0;i<$AFm;i++){var $57q=$n6R[i];var name=$57q.$Bys;if(this.getParameter(name)==null){this.setDataType(name,$57q.$jEM);};this.setValue(name,$57q.$toY);}};var KingfisherFactory={$7sP:window,$j5i:new Object(),$ii6:new Array(),$g3F:function (){if(!this.$ky6){$SP2(this.destroy);this.$ky6=true;}},$BmY:function (type,$LQz){this.$g3F();this.$j5i["_"+type]=$LQz;this.$ii6.push(type);},create:function (type,$QY6,id,$g82,$SjB,$V63,$mz8,$0Ab,$mji){this.$g3F();var $M37=false;if(!id){$M37=true;if($QY6){$QY6=null;alert("\""+id+"\" was created in default namespace!");}};var $P36=id;if($QY6){id=$QY6+"$"+$P36;};var $LQz=this.$j5i["_"+type];if($LQz==null){alert("Component Type \""+type+"\" Undefined!");return null;}else {var $G0O=kingfisher.feather.getViewModel($QY6);var $Fcn=$LQz(id,$G0O,$g82,$SjB,$V63,$mz8,$0Ab,$mji);$Fcn.$jui=$P36;$Fcn.$7sP=this.$7sP;$Fcn.$6Go=type;if(!$Fcn.$gJz){$Fcn.$gJz=type;}if($G0O!=null){if(type=="Dataset"){$G0O.registerDataset($Fcn);}else {$G0O.registerControl($Fcn);if($M37)$Fcn.$3nr=false;}};return $Fcn;}},toString:function (){var s="";var $AFm=this.$ii6.length;for(var i=0;i<$AFm;i++){s+=this.$ii6[i]+"\n";};return s;},destroy:function (){this.$7sP=null;this.$j5i=null;this.$ii6=null;}};function buildKingfisherElement(type,$QY6,id,$g82,$SjB,$V63,$mz8,$0Ab,$mji){return KingfisherFactory.create(type,$QY6,id,$g82,$SjB,$V63,$mz8,$0Ab,$mji);};var $RyR=new HashList();var $W1P=new HashList();kingfisher.feather.registerDataset=function ($uQq){$RyR.put($uQq.id,$uQq);};kingfisher.feather.registerControl=function ($lbV){$W1P.put($lbV.id,$lbV);};function $5Xo(){function $Yvy($uQq){var $QWV=$uQq.$kiH;if($QWV!=null){var $e7Q=$QWV.iterator();while($e7Q.hasNext()){var dl=$e7Q.next();$Yvy(dl.$fpj);}};$uQq.enableControls();};var $Pgv=$Fsy.size();for(var i=0;i<$Pgv;i++){var $G0O=$Fsy.$1IB[i];$wJA($G0O,"onInit",[$G0O]);};EventManager.addSystemEvent(document,"onkeydown",$aGD);EventManager.addSystemEvent(document,"onkeyup",$UC3);EventManager.addSystemEvent(document,"onmousedown",$D9L);EventManager.addSystemEvent(window,"onresize",$6QI);var $n6R=$RyR.$1IB;var $AFm=$n6R.length;for(var i=0;i<$AFm;i++){var $uQq=$n6R[i];$uQq.activate();$uQq.disableControls();};for(var i=0;i<$n6R.length;i++){var $uQq=$n6R[i];if($uQq.$D7L==null){$Yvy($uQq);$uQq.appendFromXml();}};var $Pgv=$Fsy.size();for(var i=0;i<$Pgv;i++){var $G0O=$Fsy.$1IB[i];$wJA($G0O,"onDatasetsPrepared",[$G0O]);};$n6R=$W1P.$1IB;var $WWb=new Array();for(var i=0;i<$n6R.length;i++){var $lbV=$n6R[i];if($lbV.$gJz=="DataTable"){$WWb.push($lbV);}else {if(typeof($lbV.activate)=="function")$lbV.activate();}};var $AFm=$WWb.length;for(var i=0;i<$AFm;i++){var $Dix=$WWb[i];$Dix.activate();}$HCJ=$mlI;if(typeof(finished)!="undefined")finished=true;};$o9Q($5Xo);function $UcP(){$HCJ=$7Fy;$vRk=null;$7Ck=null;if($XOt>0){clearInterval($XOt);};var $n6R=$W1P.$1IB;for(var i=$n6R.length-1;i>=0;i--){var $lbV=$n6R[i];if(typeof($lbV.destroy)=="function"){$lbV.$I7t=false;$lbV.destroy();};delete $n6R[i];};$W1P.clear();delete $W1P;$n6R=$RyR.$1IB;for(var i=$n6R.length-1;i>=0;i--){var $uQq=$n6R[i];if(typeof($uQq.destroy)=="function"){$uQq.destroy();};delete $n6R[i];};$RyR.clear();delete $RyR;};$SP2($UcP);function $aGD(){if(event==null)return false;switch(event.keyCode){case 8:{if(event.srcElement){var $ERO=event.srcElement.type;if(($ERO!="text"&&$ERO!="textarea"&&$ERO!="password")||event.srcElement.readOnly){event.keyCode=0;event.returnValue=false;return false;}}break;}case 123:{if(event.ctrlKey&&event.shiftKey&&event.altKey){$Jsp.show();event.cancelBubble=true;return false;};break;};case 122:{if(event.ctrlKey&&event.shiftKey&&event.altKey){var $TYm=prompt("JavaScript","");if($TYm){setTimeout("eval(unescape(\""+$Ayj($TYm)+"\"));",0);};event.cancelBubble=true;return false;};break;};case 49:{if(event.ctrlKey){$DwH(null);document.focus();}};};var $LRy=($7Ck!=null)?$7Ck:$vRk;if($LRy!=null){if(typeof($LRy.onKeyDown)=="function"){$LRy.onKeyDown();}}if(event.returnValue!=false){if(event.keyCode==27){if(typeof(window.dialogArguments)!='undefined'&&typeof(window.opener)=='undefined'){window.close();}}else HotKeyManager.onKeyDown();}};function $UC3(){if($Tf9!=null&&(event.keyCode==17||event.keyCode==18)){var $bib=$Tf9;$dld($bib);}};function $dld($bib){if($bib==null)return ;var $Dix=$bib.$qgv;var $uQq=$Dix.$heQ;if($Dix.$QlB)$Dix.$QlB.$mFt();$uQq.$N9l.clear();var $mOt=$Dix.$1fy;for(var i=0;i<$mOt.size();i++){var $wxT=new Object;$wxT.$Bys=$mOt.$1IB[i].$ZYJ;var $ula=$mOt.$1IB[i].$QJT;$wxT.$QJT=($ula==null||$ula=="ascent")?"ascent":"descent";$uQq.$N9l.put($wxT.$Bys,$wxT);};$uQq.flushData();$Tf9=null;};var $pEd;function $6QI(){if($HCJ!=$mlI)return ;if($pEd)clearTimeout($pEd);$pEd=setTimeout("$f4J()",100);};function $f4J(){var $n6R=$W1P.$1IB;for(var i=0;i<$n6R.length;i++){var $lbV=$n6R[i];if(typeof($lbV.onResize)=="function"){$lbV.onResize();}}};function $D9L(){var $M2l=$4z8($UuX());if($M2l!=null){if($M2l.tagName!="INPUT")$DwH($M2l);}else {$cXY();$XOt=setTimeout("$DwH(null)",300);}};function $UuX(){var $M2l;if($onF==$0oD){$M2l=event.srcElement;}else {$M2l=event.target;};return $M2l;};var $vRk=null;var $7Ck=null;var $XOt=0;function $DwH($LRy){$cXY();var $qco=null;var $0Da=null;var $ERO=null;if($LRy!=null){if($axz($LRy,"DropDownBox")!=null){return ;};var $gKZ=$axz($LRy,"Editor");if($gKZ!=null){$ERO=$gKZ;};$gKZ=$axz($LRy,"CellEditor");if($gKZ!=null){$ERO=$gKZ;$LRy=$ERO.$qgv;}};if($7Ck!=$ERO){if($7Ck!=null){if(typeof($7Ck.onBlur)=="function"){$7Ck.onBlur();};$qco=$7Ck;};$7Ck=$ERO;if($ERO!=null){if(typeof($ERO.onFocus)=="function"){$ERO.onFocus();};$0Da=$ERO;}};var $gRw=null;if($LRy!=null){$gRw=$4z8($LRy);};if($vRk!=$gRw){if($vRk!=null){$vRk.$HY2=false;if($qco!=$vRk&&typeof($vRk.onBlur)=="function"){$vRk.onBlur();}};$vRk=$gRw;if($gRw!=null){$gRw.$HY2=true;if($0Da!=$vRk&&typeof($vRk.onFocus)=="function"){$vRk.onFocus();}}}};function $cXY(){if($XOt){clearTimeout($XOt);$XOt=0;}};function $4z8($LRy){var $Rjs=$LRy;while($Rjs!=null&&!$Rjs.$3nr){$Rjs=$Rjs.parentNode;};return $Rjs;};function $QGb($LRy){$DwH($LRy);};function $axz($LRy,$ky1){var $Rjs=$LRy;while($Rjs!=null&&$Rjs.$gJz!=$ky1){$Rjs=$Rjs.parentNode;};return $Rjs;};function $Iby($LRy,$juO){var $Rjs=$juO;while($Rjs!=null){if($Rjs==$LRy){return true;};$Rjs=$Rjs.parentNode;};return false;};function $bta($LRy,$LKW){var $6P7=($LKW!=null)?$LKW:document.body;var x=$LRy.offsetLeft;var y=$LRy.offsetTop;var $Rjs;if($onF==$0oD){$Rjs=$LRy.offsetParent;while(($Rjs!=$6P7)&&$Rjs!=null){x+=$Rjs.offsetLeft-$Rjs.scrollLeft;y+=$Rjs.offsetTop-$Rjs.scrollTop;if($Rjs.tagName!="TABLE"){x+=$Rjs.clientLeft;y+=$Rjs.clientTop;};$Rjs=$Rjs.offsetParent;}}else {$Rjs=$LRy.offsetParent;while(($Rjs!=$6P7)&&$Rjs!=null){x+=$Rjs.offsetLeft;y+=$Rjs.offsetTop;if($Rjs.tagName!="TABLE"){x+=($Rjs.offsetWidth-$Rjs.clientWidth)/2;y+=($Rjs.offsetHeight-$Rjs.clientHeight)/2;};$Rjs=$Rjs.offsetParent;};$Rjs=$LRy.parentNode;while(($Rjs!=$6P7)&&$Rjs!=null){if($Rjs.scrollLeft)x-=$Rjs.scrollLeft;if($Rjs.scrollTop)y-=$Rjs.scrollTop;$Rjs=$Rjs.parentNode;};$Rjs=$6P7.offsetParent;while(($Rjs!=$6P7)&&$Rjs!=null){x-=$Rjs.offsetLeft;y-=$Rjs.offsetTop;if($Rjs.tagName!="TABLE"){x+=($Rjs.offsetWidth-$Rjs.clientWidth)/2;y+=($Rjs.offsetHeight-$Rjs.clientHeight)/2;}$Rjs=$Rjs.offsetParent;};$Rjs=$6P7.parentNode;while(($Rjs!=$6P7)&&$Rjs!=null){if($Rjs.scrollLeft)x+=$Rjs.scrollLeft;if($Rjs.scrollTop)y+=$Rjs.scrollTop;$Rjs=$Rjs.parentNode;}};return ([x,y]);};var $86U=new Collection();function $JQ9($LRy,$pP3){if($pP3){$LRy.style.visibility="visible";$LRy.$q27=true;var $b9u=$86U.$Fqw;while($b9u!=null){var $lbV=$b9u.$NSB;if($lbV.offsetWidth>0){var $u52=$b9u;$b9u=$b9u.$s8S;$86U.removeElement($u52);if(typeof($lbV.refresh)=="function"){$lbV.refresh();}}else {$b9u=$b9u.$s8S;}}}else {$LRy.style.visibility="hidden";$LRy.$q27=false;if($7Ck!=null&&$7Ck!=$LRy&&$Iby($LRy,$7Ck)){$DwH(null);}}};function $CtO($LRy,$pP3){if($pP3){$LRy.style.display="";$LRy.$q27=true;var $b9u=$86U.$Fqw;while($b9u!=null){var $lbV=$b9u.$NSB;if($lbV.offsetWidth>0){var $u52=$b9u;$b9u=$b9u.$s8S;$86U.removeElement($u52);if(typeof($lbV.refresh)=="function"){$lbV.refresh();}}else {$b9u=$b9u.$s8S;}}}else {$LRy.style.display="none";$LRy.$q27=false;if($7Ck!=null&&$7Ck!=$LRy&&$Iby($LRy,$7Ck)){$DwH(null);}}};function $8So($lbV){var $1XF=$W1P.$1IB.indexOf($lbV);if($1XF>=0){var $n6R=$W1P.$1IB;for(var i=$1XF-1;i>=0;i--){var $xih=$n6R[i];if($xih.$3nr&&!$xih.disabled&&(typeof($xih.isReadOnly)!="function"||!$xih.isReadOnly())&&typeof($xih.$FTz)=="function"&&$xih.offsetWidth>0){return $xih;}else if($xih.tagName&&$xih.tagName=="BUTTON"&&!$xih.disabled&&$xih.offsetWidth>0){return $xih;}}};return null;};function $l6O($lbV){var $1XF=$W1P.$1IB.indexOf($lbV);if($1XF>=0){var $n6R=$W1P.$1IB;for(var i=$1XF+1;i<$n6R.length;i++){var $xih=$n6R[i];if($xih.$3nr&&!$xih.disabled&&(typeof($xih.isReadOnly)!="function"||!$xih.isReadOnly())&&typeof($xih.$FTz)=="function"&&$xih.offsetWidth>0){return $xih;}else if($xih.tagName&&$xih.tagName=="BUTTON"&&!$xih.disabled&&$xih.offsetWidth>0){return $xih;}}};return null;};function $LNR($lbV){setTimeout("try {"+"var $mAg=$(\""+$lbV.id+"\");"+"$mAg.$FTz();"+"}catch(e){}",0);};function $U9b($NI9,$E5f){try{eval("var $0DL = "+$NI9+";");return $0DL;}catch(e){return $E5f;}};var $Xs9=null;function $5JO(){var $kGk=$Xs9;if($kGk==null){$kGk=KingfisherFactory.create("DateDropDown",null,"__DropdownDate");$Xs9=$kGk;};return $Xs9;};function Field(name,$2xZ,$rCI){this.$Bys=name;if($2xZ){this.$jEM=$2xZ;}else {this.$jEM=1;};this.$GQO=$rCI;this.$EVX=name;this.$WXR=false;this.$ifK=null;this.$aiB=null;this.$Jn2=null;this.$CKO=null;this.$Ghk=null;this.$eMo=false;this.$q27=true;this.$yyV=false;this.$iWs=true;this.$fUE=true;this.$FFW=new Array();switch($2xZ){case 4:;case 5:{if(__DEFAULT_INT_FORMAT!="#"){this.$ifK=__DEFAULT_INT_FORMAT;};this.$xJu="right";this.$DPj="center";break;};case 6:;case 7:;case 8:{this.$ifK=__DEFAULT_FLOAT_FORMAT;this.$L1S=2;this.$xJu="right";this.$DPj="center";break;};case 9:{this.$xJu="middle";this.$DPj="middle";break;};case 10:{this.$ifK="yyyy-MM-dd";this.$Jn2=$5JO().getId();this.$xJu="left";this.$DPj="center";break;};case 11:{this.$ifK="HH:mm:ss";this.$xJu="left";this.$DPj="center";break;};case 12:{this.$ifK="yyyy-MM-dd HH:mm:ss";this.$Jn2=$5JO().getId();this.$xJu="left";this.$DPj="center";break;}default:{this.$xJu="left";this.$DPj="center";}}};Field.prototype.getName=function (){return this.$Bys;};Field.prototype.getDataType=function (){return this.$jEM;};Field.prototype.isKey=function (){return this.$GQO;};Field.prototype.getLabel=function (){return this.$EVX;};Field.prototype.setLabel=function ($4OX){this.$EVX=$4OX;};Field.prototype.isReadOnly=function (){return this.$WXR;};Field.prototype.setReadOnly=function ($WPU){this.$WXR=$WPU;};Field.prototype.getFormat=function (){return this.$ifK;};Field.prototype.setFormat=function ($FrR){this.$ifK=$FrR;if($FrR){if(this.$jEM>5&&this.$jEM<9){var $hF2=$nlS($FrR);this.$L1S=$hF2.decimal;}}};Field.prototype.getEditorType=function (){return this.$aiB;};Field.prototype.setEditorType=function ($gmY){this.$aiB=$gmY;};Field.prototype.getDropDown=function (){return this.$Jn2;};Field.prototype.setDropDown=function ($sfE){this.$Jn2=$sfE;};Field.prototype.getDefaultValue=function (){return this.$CKO;};Field.prototype.setDefaultValue=function ($E5f){this.$CKO=$E5f;};Field.prototype.getToolTip=function (){return this.$Ghk;};Field.prototype.setToolTip=function ($Vvx){this.$Ghk=$Vvx;};Field.prototype.isValueProtected=function (){return this.$eMo;};Field.prototype.setValueProtected=function ($lcb){this.$eMo=$lcb;};Field.prototype.isVisible=function (){return this.$q27;};Field.prototype.setVisible=function ($pP3){this.$q27=$pP3;};Field.prototype.isSupportsSum=function (){return this.$yyV;};Field.prototype.setSupportsSum=function ($dfG){this.$yyV=$dfG;};Field.prototype.addValidator=function ($GU1){this.$FFW.push($GU1);};Field.prototype.getValidators=function (){return this.$FFW;};Field.prototype.isInputForInsert=function (){return this.$iWs;};Field.prototype.setInputForInsert=function ($bPX){this.$iWs=$bPX;};Field.prototype.isInputForUpdate=function (){return this.$fUE;};Field.prototype.setInputForUpdate=function ($5gu){this.$fUE=$5gu;};Field.prototype.getAlign=function (){return this.$xJu;};Field.prototype.setAlign=function ($3jV){this.$xJu=$3jV;};Field.prototype.getVAlign=function (){return this.$DPj;};Field.prototype.setVAlign=function ($NUI){this.$DPj=$NUI;};Field.prototype.getTag=$u1g;Field.prototype.setTag=$s9h;var $vNB=0;function $AKc(){return $vNB++;};var $idB="none";var $7ex="new";var $tzn="insert";var $MiA="modify";var $Yjk="delete";function Record($uQq,$TQa){this.$NSB=[];this.$6Xg=$AKc();this.$zUj=false;this.$heQ=$uQq;if($TQa==null){$TQa=$uQq.$qhU;};this.$qhU=$TQa;this.$Jr3=$TQa.$Jr3;this.$ldQ=$pKu();this.$Oc4=$idB;this.$sCJ=false;this.$CHb=null;this.$GYv=null;this.$Kgz=null;this.$LFw=false;this.$MqA=true;this.$82o=true;this.$eAe=true;};Record.prototype=new Array();Record.prototype.getPrevious=Element.prototype.getPrevious;Record.prototype.getNext=Element.prototype.getNext;Record.prototype.getData=Element.prototype.getData;Record.prototype.setData=Element.prototype.setData;Record.prototype.toString=function (){var $qoK="[Record]\n";$qoK+="id: "+this.$ldQ+"\n";$qoK+="state: "+this.$Oc4+"\n";$qoK+="isDirty: "+this.$sCJ+"\n";$qoK+="\n";var $uQq=this.$heQ;if(!$uQq)return null;var $t4c=$uQq.getFieldCount();for(var i=0;i<$t4c;i++){var $l86=$uQq.getField(i);$qoK+=i+"."+$l86.getName()+": "+this.getValue(i)+"\n";};return $qoK;};Record.prototype.destroy=function (){var $zer=this.$pPV;if($zer!=null){var $Pgv=$zer.size();for(var i=0;i<$Pgv;i++){var $rGs=$zer.$1IB[i];$rGs.destroy();}};this.$qhU=null;this.$heQ=null;this.$Kgz=null;};Record.prototype.getDataset=function (){return this.$heQ;};Record.prototype.$lNx=function ($6zB){var $TQa=null;if(this.$pPV==null){this.$pPV=new HashList();}else {$TQa=this.$pPV.get($6zB);};if($TQa==null){var $kdh=kingfisher.feather.getDataset($6zB);if($kdh!=null&&$kdh.$D7L!=null&&$kdh.$D7L.getMasterDataset()==this.$heQ){$TQa=new RecordSet($kdh);this.$pPV.put($6zB,$TQa);}};return $TQa;};Record.prototype.$OvD=function (){if(this.$LFw||this.$Kgz==null||this.$heQ==null){this.$LFw=true;return ;};var $IQg=this.$Kgz;var $Wym=this.$heQ.$cqa.$1IB;var $Vcc;var $9sO;var $IcU=new Array();var $AFm=$IQg.childNodes.length;if($onF==$0oD){for(var i=0;i<$AFm;i++){var $gQm=$IQg.childNodes[i];if($gQm.nodeName=="new"){$Vcc=$gQm;}else if($gQm.nodeName=="old"){$9sO=$gQm;}else if($gQm.nodeName=="detail"){$IcU.push($gQm);}}}else {for(var i=0;i<$AFm;i++){var $gQm=$IQg.childNodes[i];if($gQm.nodeName.toLowerCase()=="new"){$Vcc=$gQm;}else if($gQm.nodeName.toLowerCase()=="old"){$9sO=$gQm;}else if($gQm.nodeName.toLowerCase()=="detail"){$IcU.push($gQm);}}};var $w8f=this.$NSB;var $6Hw=null;var $TvO=null;if($9sO!=null&&$9sO.firstChild!=null){var $qoK=$9sO.firstChild.nodeValue;if($qoK!=null)$TvO=$qoK.split(",");var $n3r=new Record(this.$heQ);this.$GYv=$n3r;$6Hw=$n3r.$NSB;};if($Vcc!=null&&$Vcc.firstChild!=null){var $qoK=$Vcc.firstChild.nodeValue;if($qoK!=null){var $5aP=$qoK.split(",");var $0DL;for(var j=0;j<$5aP.length;j++){$0DL=$5aP[j];var $l86=$Wym[j];if($l86!=null){switch($l86.$jEM){case 1:{$w8f[j]=unescape($0DL);if($TvO!=null){$6Hw[j]=unescape($TvO[j]);};break;};case 6:;case 7:;case 8:{if($0DL){$w8f[j]=parseFloat($0DL);};if($TvO!=null){$0DL=$TvO[j];if($0DL){$6Hw[j]=parseFloat($0DL);}};break;}case 2:;case 3:;case 4:;case 5:{if($0DL){$w8f[j]=parseInt($0DL,10);};if($TvO!=null){$0DL=$TvO[j];if($0DL){$6Hw[j]=parseInt($0DL,10);}};break;};case 10:;case 11:;case 12:{if($0DL){$0DL=unescape($0DL);if($l86.$jEM==11&&parseString($0DL).indexOf(":")!=-1)$w8f[j]=parseTime($0DL);else $w8f[j]=new Date(parseInt($0DL));};if($TvO!=null){$0DL=$TvO[j];if($0DL){if($l86.$jEM==11&&parseString($0DL).indexOf(":")!=-1)$6Hw[j]=parseTime($0DL);else $6Hw[j]=new Date(parseInt($0DL));}};break;};case 9:{if($0DL){$w8f[j]=parseBoolean($0DL);};if($TvO!=null){$0DL=$TvO[j];if($0DL){$6Hw[j]=parseBoolean($0DL);}};break;};default:{$w8f[j]=unescape($0DL);if($TvO!=null){$6Hw[j]=unescape($TvO[j]);};break;}}}}}};for(var i=0;i<$IcU.length;i++){var $z8S=$IcU[i];var $78P=$z8S.getAttribute("id");var $TQa=this.$lNx($78P);var $kdh=kingfisher.feather.getDataset($78P);var $yjx;if($onF==$0oD){$yjx=$z8S.childNodes[0];}else {$yjx=$z8S.getElementsByTagName("records")[0];};if($yjx!=null)$kdh.$zEm($yjx,false,$TQa,null);};this.$LFw=true;};Record.prototype.getPageIndex=function (){return this.$Jr3;};Record.prototype.setPageIndex=function ($hh3){this.$Jr3=$hh3;};Record.prototype.isCanSelect=function (){return this.$eAe;};Record.prototype.setCanSelect=function ($4Mf){this.$eAe=$4Mf;};Record.prototype.isCanUpdate=function (){return this.$MqA;};Record.prototype.setCanUpdate=function ($550){this.$MqA=$550;};Record.prototype.isCanDelete=function (){return this.$82o;};Record.prototype.setCanDelete=function ($H8o){this.$82o=$H8o;};Record.prototype.getPrevRecord=function (){var $iv4=this;do{$iv4=$iv4.$a48;if($iv4!=null&&this.$heQ){if(this.$heQ.isRecordVisible($iv4)){return $iv4;}}else {return null;}}while(true);};Record.prototype.getNextRecord=function (){var $iv4=this;do{$iv4=$iv4.$s8S;if($iv4!=null&&this.$heQ){if(this.$heQ.isRecordVisible($iv4)){return $iv4;}}else {return null;}}while(true);};Record.prototype.getState=function ($Ym0){return this.$Oc4;};Record.prototype.setState=function ($Ym0){this.$Oc4=$Ym0;this.$6Xg=$AKc();this.$heQ.broadcastDatasetMessage($E5m,[this]);};Record.prototype.isDirty=function (){return this.$sCJ;};Record.prototype.setDirty=function ($jgq){this.$sCJ=$jgq;};Record.prototype.$S54=function (){if(this.$CHb==null){this.$CHb=new Record(this.$heQ);};this.$CHb.$NSB=this.$NSB.slice();};Record.prototype.$ym5=function (){if(this.$GYv==null){this.$GYv=new Record(this.$heQ);};this.$GYv.$NSB=this.$NSB.slice();};Record.prototype.getValue=function (name){var $1XF;if(typeof(name)=="number"){$1XF=name;}else {$1XF=this.$heQ.$cqa.indexOf(name.toLowerCase());};var $l86=this.$heQ.$cqa.get($1XF);if($l86==null){alert(__DATASET_FIELD_NOT_FOUND.replace(/\$\{field\}/g,this.$heQ.id+"."+name));return null;};if(!this.$LFw)this.$OvD();var $0DL=this.$NSB[$1XF];if(typeof($0DL)=="undefined")$0DL=null;var $uQq=this.$heQ;if($uQq._onGetValue!=null){$0DL=$wJA($uQq,"onGetValue",[$uQq,this,$l86,$0DL]);};return $0DL;};Record.prototype.getString=function (name){var $1XF;if(typeof(name)=="number"){$1XF=name;}else {$1XF=this.$heQ.$cqa.indexOf(name.toLowerCase());};if(!this.$LFw)this.$OvD();var $qoK="";var $l86=this.$heQ.$cqa.get($1XF);if($l86!=null){var $0DL=this.$NSB[$1XF];if(typeof($0DL)=="undefined")$0DL=null;var $uQq=this.$heQ;if($uQq._onGetValue!=null){$0DL=$wJA($uQq,"onGetValue",[$uQq,this,$l86,$0DL]);};if($0DL!=null){switch($l86.$jEM){case 4:;case 5:{if($l86.$ifK!=null){$qoK=formatFloat($0DL,$l86.$ifK);}else {$qoK=$0DL;};break;};case 6:;case 7:;case 8:{$qoK=formatFloat($0DL,$l86.$ifK);break;};case 10:case 11:case 12:{$qoK=formatDate($0DL,$l86.$ifK);break;};default:{$qoK=$0DL+"";break;}}}}else {alert(__DATASET_FIELD_NOT_FOUND.replace(/\$\{field\}/g,this.$heQ.id+"."+name));};return $qoK;};Record.prototype.$ju1=function (name,$0DL){function $Vdt($0DL,$95D){if($0DL!=0){var $P6X=Math.pow(10,$95D);return Math.round($0DL*$P6X)/$P6X;}else {return 0;}};var $1XF;if(typeof(name)=="number"){$1XF=name;}else {$1XF=this.$heQ.$cqa.indexOf(name.toLowerCase());};var $uQq=this.$heQ;var $l86=$uQq.$cqa.get($1XF);var $0FA=this.$NSB[$1XF];if($l86!=null){if(!this.$LFw)this.$OvD();if($uQq.$V8A<=0&&$uQq._beforeSelectionChange!=null&&$l86.$Bys=="select"){var $cf8=$wJA($uQq,"beforeSelectionChange",[$uQq,this]);if($cf8!=null)throw $cf8;};if($uQq.$V8A<=0&&$uQq._beforeChange!=null){var $cf8=$wJA($uQq,"beforeChange",[$uQq,this,$l86,$0DL]);if($cf8!=null)throw $cf8;};if($uQq._onSetValue!=null){$0DL=$wJA($uQq,"onSetValue",[$uQq,this,$l86,$0DL]);};var $zeO=$0DL;if($0DL!=null){switch($l86.$jEM){case 6:;case 7:;case 8:{if($0DL+""==""){$0DL=null;}else if(typeof($0DL)!="number"){$0DL=parseFloat($0DL.replace(/,/g,""));if($l86.$L1S>0){$0DL=$Vdt($0DL,$l86.$L1S);};if(isNaN($0DL)){throw __DATASET_INVALID_FLOAT.replace(/\$\{value\}/g,$zeO);}};break;};case 2:;case 3:;case 4:;case 5:{if($0DL+""==""){$0DL=null;}else if(typeof($0DL)!="number"){$0DL=parseInt($0DL.replace(/,/g,""),10);if(isNaN($0DL)){throw __DATASET_INVALID_INT.replace(/\$\{value\}/g,$zeO);}};break;};case 10:case 12:{if($0DL+""==""){$0DL=null;}else if(typeof($0DL)=="string"){$0DL=parseDate($0DL);if(isNaN($0DL)){throw __DATASET_INVALID_DATE;}else if(($0DL.getFullYear()+"").realLength()>4)throw __DATASET_INVALID_DATE;}else if(typeof($0DL)=="number"){$0DL=new Date($0DL);if(isNaN($0DL)){throw __DATASET_INVALID_DATE;}};break;};case 11:{if($0DL+""==""){$0DL=null;}else if(typeof($0DL)=="string"){$0DL=parseTime($0DL);if(isNaN($0DL)){throw __DATASET_INVALID_TIME;}}else if(typeof($0DL)=="number"){$0DL=new Date($0DL,"HH:mm:ss");if(isNaN($0DL)){throw __DATASET_INVALID_TIME;}};break;};case 9:{if(typeof($0DL)!="boolean"){$0DL=parseBoolean($0DL);};break;}}};var $KUL=$l86.$FFW;if($KUL.length>0){for(var j=0;j<$KUL.length;j++){var $GU1=$KUL[j];if($GU1.$4Qt){if(!$GU1.validate($0DL)){if($uQq.$V8A<=0&&$GU1._onValidateFailed!=null){if(!$wJA($GU1,"onValidateFailed",[$GU1,$l86,$0DL]))continue;};throw $GU1.getFinalErrorMessage().replace(/\$\{field\}/g,$l86.getLabel());}}}};this.$NSB[$1XF]=$0DL;this.$6Xg=$AKc();if($l86.$yyV){var $TQa=this.$qhU;var $e9e=$TQa.$4N7;if($e9e==null){$e9e=new Object();$TQa.$4N7=$e9e;};var $NI9="_"+$l86.$Bys;var $rge=$e9e[$NI9];if(typeof($rge)!="number"){$rge=0;};var $hF2=parseFloat($0FA);if(!isNaN($hF2))$rge-=$hF2;$hF2=parseFloat($0DL);if(!isNaN($hF2))$rge+=$hF2;$e9e[$NI9]=$rge;};if(!this.dirty){this.$sCJ=true;if($uQq.$EED<=0){$uQq.broadcastDatasetMessage($E5m,[this]);}};if($uQq.$EED<=0){$uQq.broadcastDatasetMessage($wuZ,[this,name,$0FA]);};if($uQq.$V8A<=0&&$uQq._afterChange!=null){$wJA($uQq,"afterChange",[$uQq,this,$l86,$0FA]);};if($uQq.$V8A<=0&&$uQq._afterSelectionChange!=null&&$l86.$Bys=="select"){var $cf8=$wJA($uQq,"afterSelectionChange",[$uQq,this]);if($cf8!=null)throw $cf8;}}else {alert(__DATASET_FIELD_NOT_FOUND.replace(/\$\{field\}/g,$uQq.id+"."+name));}};Record.prototype.setValue=function (name,$0DL){try{if(!this.$sCJ){if(this.$CHb==null){this.$S54();}else {var $iv4=this.$CHb;$iv4.splice(0,$iv4.length,this);};if(this.$GYv==null&&this.$Oc4==$idB){this.$ym5();}};this.$ju1(name,$0DL);return true;}catch(e){$o7u(e);return false;}};Record.prototype.$3Nz=function (){var $uQq=this.$heQ;$uQq.broadcastDatasetMessage($7kc,null);if(this.$Oc4!=$7ex){if(this.$sCJ){if($uQq.$V8A<=0){var $cf8=$wJA($uQq,"beforeCancel",[$uQq,this]);if($cf8!=null)throw $cf8;};var $39f=this.getValidRecord();this.$NSB=$39f.$NSB.slice();this.$sCJ=false;this.$Oc4=$idB;this.$6Xg=$AKc();var $TQa=$uQq.$qhU;if($TQa.$coN>=0)$TQa.$coN--;if($uQq.$V8A<=0){$wJA($uQq,"afterCancel",[$uQq,this]);};$uQq.broadcastDatasetMessage($lrq,[this]);}}else {if($uQq.$V8A<=0){var $cf8=$wJA($uQq,"beforeCancel",[$uQq,this]);if($cf8!=null)throw $cf8;};var $IP0=this.getNextRecord();if($IP0==null){$IP0=this.getPrevRecord();};$uQq.$dlM(this);if($uQq.$V8A<=0){$wJA($uQq,"afterCancel",[$uQq,this]);};$uQq.setCurrent($IP0);$uQq.broadcastDatasetMessage($JHr,[this]);this.destroy();}};Record.prototype.cancel=function (){try{this.$3Nz();}catch(e){$o7u(e)}};Record.prototype.$jQt=function (){var $uQq=this.$heQ;var $Wym=$uQq.$cqa;var $t4c=$Wym.size();for(var i=0;i<$t4c;i++){var $l86=$Wym.get(i);var $KUL=$l86.$FFW;if($KUL.length>0){for(var j=0;j<$KUL.length;j++){var $GU1=$KUL[j];if(!$GU1.$4Qt){var $0DL=this.getValue(i);if(!$GU1.validate($0DL)){if($uQq.$V8A<=0&&$GU1._onValidateFailed!=null){if(!$wJA($GU1,"onValidateFailed",[$GU1,$l86,$0DL]))continue;};alert($GU1.getFinalErrorMessage().replace(/\$\{field\}/g,$l86.getLabel()));this.$IVu($l86);throw new AbortException();}}}}}};Record.prototype.$IVu=function ($l86){var $xih=null;var $uQq=this.$heQ;var $LRy=$uQq.$qJG.$Fqw;while($LRy){var $lbV=$LRy.getData();if($lbV.$heQ==this.$heQ){if(($lbV.$gJz=="Editor"||$lbV.$gJz=="CheckBox"||$lbV.$gJz=="RadioGroup"||$lbV.$gJz=="CheckBoxGroup")&&$lbV.$25i.toLowerCase()==$l86.$Bys.toLowerCase()){if($lbV.$3nr&&!$lbV.disabled&&(typeof($lbV.isReadOnly)!="function"||!$lbV.isReadOnly())&&typeof($lbV.$FTz)=="function"&&$lbV.offsetWidth>0){$xih=$lbV;break;}}else if($lbV.$gJz=="DataTable"){if(!$xih)$xih=$lbV;}}$LRy=$LRy.$s8S;}if($xih!=null){if($xih.$gJz=="DataTable"){try{var $ZeZ=$xih.$t5j;for(var j=0;j<$ZeZ.length;j++){var $eTY=$ZeZ[j];if($eTY.$25i.toLowerCase()==$l86.$Bys.toLowerCase()){$xih.setCurrentColumn($eTY);}}}catch(e){}}else {$xih.$FTz();}}};Record.prototype.$Oce=function ($F0X){function $vNk($uQq){var $QWV=$uQq.$kiH;if($QWV!=null){var $e7Q=$QWV.iterator();while($e7Q.hasNext()){var dl=$e7Q.next();var $kdh=dl.$fpj;$kdh.disableControls();var $iv4=$kdh.getFirstRecord();while($iv4){if($iv4.$Oc4==$7ex||$iv4.$Oc4==$tzn){var $5kT=$uQq.$tuS;var $m79=dl.$bcn;var $xwp=dl.$IDW;if($5kT!=null&&($m79.length==$xwp.length)){for(var i=0;i<$m79.length;i++){$iv4.$ju1($xwp[i],$5kT.getValue($m79[i]));}}}$iv4=$iv4.getNextRecord();}$kdh.enableControls();$vNk($kdh);}};};var $uQq=this.$heQ;$uQq.broadcastDatasetMessage($7kc,null);if(this.$sCJ){if($uQq.$V8A<=0){var $cf8=$wJA($uQq,"beforePost",[$uQq,this]);if($cf8!=null)throw $cf8;};if(!$F0X){this.$jQt();};this.$sCJ=false;if(this.$Oc4==$idB){this.setState($MiA);}else if(this.$Oc4==$7ex){this.setState($tzn);};$vNk($uQq);if($uQq.$EED<=0){$uQq.broadcastDatasetMessage($lrq,[this]);};if($uQq.$V8A<=0){$wJA($uQq,"afterPost",[$uQq,this]);}}else if(this.$Oc4==$7ex){if($uQq.$V8A<=0){var $cf8=$wJA($uQq,"beforePost",[$uQq,this]);if($cf8!=null)throw $cf8;};var $IP0=this.getNextRecord();if($IP0==null){$IP0=this.getPrevRecord();};$uQq.$dlM(this);$uQq.setCurrent($IP0);if($uQq.$EED<=0){$uQq.broadcastDatasetMessage($JHr,[this]);};this.destroy();};return true;};Record.prototype.post=function (){try{return this.$Oce();}catch(e){$o7u(e);return false;}};Record.prototype.getValidRecord=function (){return this.$CHb;};Record.prototype.getOldRecord=function (){return this.$GYv;};Record.prototype.$f2X=function (){this.$3Nz();if(this.$Oc4==$tzn){this.$qhU.$adx++;}else if(this.$Oc4==$Yjk){this.$qhU.$adx--;};this.$Oc4=$idB;this.$GYv=null;};var $A9x=null;var $0OY=null;var $DS9=null;var $8wo=null;Record.prototype.copyRecord=function ($iv4){var $u3R;var $ccR;if($A9x==this.$heQ&&$0OY==$iv4.$heQ){$u3R=$DS9;$ccR=$8wo;}else {$u3R=new Array();$ccR=new Array();var $Wym=this.$heQ.$cqa;var $Ldr=$iv4.$heQ.$cqa;if($Wym.size()<$Ldr.size()){var $KR9=$Wym.size();for(var i=0;i<$KR9;i++){var $1XF=$Ldr.indexOf($Wym.get(i).$Bys.toLowerCase());if($1XF>=0){$u3R[i]=i;$ccR[i]=$1XF;}}}else {var $KR9=$Ldr.size();for(var i=0;i<$KR9;i++){var $1XF=$Wym.indexOf($Ldr.get(i).$Bys.toLowerCase());if($1XF>=0){$u3R[i]=$1XF;$ccR[i]=i;}}};$A9x=this.$heQ;$0OY=$iv4.$heQ;$DS9=$u3R;$8wo=$ccR;};$iv4.$OvD();var $eKD=this.$NSB;var $os6=$iv4.$NSB;for(var i=0;i<$u3R.length;i++){$eKD[$u3R[i]]=$os6[$ccR[i]];}if($u3R.length>0)this.$sCJ=true;};function RecordSet($uQq){this.$heQ=$uQq;this.$Jr3=1;this.$V5k=1;this.$v2x=new Array();this.$coN=0;this.$adx=0;};RecordSet.prototype=new Collection();RecordSet.prototype.destroy=function (){this.$VSX();};RecordSet.prototype.clearData=function (){this.$Jr3=1;this.$V5k=1;this.$v2x=new Array();this.$coN=0;this.$adx=0;this.$VSX();this.$4G0();this.$Fqw=null;this.$d8l=null;this.$RxL=0;this.$4N7=null;};RecordSet.prototype.$VSX=function (){var $LRy=this.$Fqw;while($LRy!=null){var $iv4=$LRy;if($iv4){$iv4.destroy();};$LRy=$LRy.$s8S;}};RecordSet.prototype.$5r5=function ($hh3){return this.$v2x[$hh3-1];};RecordSet.prototype.$NKo=function ($hh3){var $CEC=new Object();this.$v2x[$hh3-1]=$CEC;return $CEC;};function MasterDetailLink($1QD,$kdh){this.$o5W=$1QD;this.$fpj=$kdh;this.setMasterKeyFields(null);this.setDetailKeyFields(null);this.setDetailKeyParameters(null);this.$tNW=true;};MasterDetailLink.prototype.getMasterDataset=function (){return this.$o5W;};MasterDetailLink.prototype.getDetailDataset=function (){return this.$fpj;};MasterDetailLink.prototype.getMasterKeyFields=function (){return this.$ljQ;};MasterDetailLink.prototype.setMasterKeyFields=function ($T0l){this.$ljQ=$T0l;if($T0l!=null){this.$bcn=$T0l.split(",");}else {this.$bcn=new Array();}};MasterDetailLink.prototype.getDetailKeyFields=function (){return this.$YCp;};MasterDetailLink.prototype.setDetailKeyFields=function ($P3P){this.$YCp=$P3P;if($P3P!=null){this.$IDW=$P3P.split(",");}else {this.$IDW=new Array();}};MasterDetailLink.prototype.getDetailKeyParameters=function (){return this.$wKk;};MasterDetailLink.prototype.setDetailKeyParameters=function ($O1w){this.$wKk=$O1w;if($O1w!=null){this.$VWH=$O1w.split(",");}else {this.$VWH=new Array();}};MasterDetailLink.prototype.getMasterKeyFieldArray=function (){return this.$bcn;};MasterDetailLink.prototype.getDetailKeyFieldArray=function (){return this.$IDW;};MasterDetailLink.prototype.getDetailKeyParameterArray=function (){return this.$VWH;};MasterDetailLink.prototype.setLoadAsNeeded=function ($j4W){this.$tNW=$j4W;};MasterDetailLink.prototype.isLoadAsNeeded=function (){return this.$tNW;};var $qfi=1;var $lrq=2;var $wuZ=3;var $n9z=4;var $7kc=5;var $EJK=6;var $JHr=7;var $ye4=8;var $E5m=9;var $D5j=10;function Dataset(id,$G0O,type){if(!id)id=$dw2();this.id=id;this.$bMv=$G0O;this.$khb=type;this.$cqa=new HashList();this.$qhU=new RecordSet(this);this.$khq=new ParameterSet();this.$aUG=new ParameterSet();this.$uQA=new ParameterSet();this.$ezi=this.$qhU;this.$qJG=new Collection();this.$WXR=false;this.$cH2=false;this.$RqD=false;this.$ZKn=10000;this.$H8a=__SHOW_LOADING_TIP;this.$Fqw=true;this.$d8l=true;this.$tuS=null;this.$EED=0;this.$V8A=0;this.$ywO=false;this.$aUj=null;this.$D7L=null;this.$1yF=false;this.$hFG=true;this.$9RO=0;this.$N9l=new HashList();this.$7u9=new Collection();this.$ezi.$NKo(1);$wJA(this,"onCreate",[this]);};Dataset.prototype=new KingfisherComponent();KingfisherFactory.$BmY("Dataset",function (id,$G0O,type){return new Dataset(id,$G0O,type);});Dataset.prototype.getType=function (){return this.$khb;};Dataset.prototype.toString=function (){var $qoK="[Dataset]\n";$qoK+="id: "+this.id+"\n";$qoK+="master: "+((this.$o5W==null)?"":this.$o5W.id)+"\n";$qoK+="\n";var $t4c=this.getFieldCount();for(var i=0;i<$t4c;i++){var $l86=this.getField(i);$qoK+=i+"."+$l86.getName()+" ("+$KQE[$l86.getDataType()]+")\n";};return $qoK;};Dataset.prototype.destroy=function (){var $LRy=this.$qJG.$Fqw;while($LRy!=null){$LRy.$NSB=null;$LRy=$LRy.$s8S;};this.$khq.clear();this.$uQA.clear();this.$aUG.clear();this.$N9l.clear();this.$qJG.clear();this.$aUj=null;this.$7u9.clear();this.$6e1=null;};Dataset.prototype.disableBinding=function (){this.$9RO++;};Dataset.prototype.enableBinding=function (){this.$9RO--;};Dataset.prototype.parameters=function (){return this.$khq;};Dataset.prototype.outParameters=function (){return this.$aUG;};Dataset.prototype.isReadOnly=function (){return this.$WXR;};Dataset.prototype.setReadOnly=function ($WPU){if(this.$WXR!=$WPU){this.$WXR=$WPU;this.refreshControls();}};Dataset.prototype.isAsync=function (){return this.$cH2;};Dataset.prototype.setAsync=function ($OcJ){this.$cH2=$OcJ;};Dataset.prototype.isAutoLoadPage=function (){return this.$RqD;};Dataset.prototype.setAutoLoadPage=function ($wZo){this.$RqD=$wZo;};Dataset.prototype.isCanInsert=function (){return this.$hFG;};Dataset.prototype.setCanInsert=function ($r4K){this.$hFG=$r4K;};Dataset.prototype.getPageSize=function (){return this.$ZKn;};Dataset.prototype.setPageSize=function ($jwf){this.$ZKn=$jwf;};Dataset.prototype.getPossibleRecordCount=function (){return this.$qhU.$adx;};Dataset.prototype.isShowLoadingTip=function (){return this.$H8a;};Dataset.prototype.setShowLoadingTip=function ($A8y){this.$H8a=$A8y;};Dataset.prototype.getPageIndex=function (){return this.$qhU.$Jr3;};Dataset.prototype.setPageIndex=function ($hh3){this.$qhU.$Jr3=$hh3;};Dataset.prototype.getPageCount=function (){return this.$qhU.$V5k;};Dataset.prototype.setPageCount=function ($jwL){this.$qhU.$V5k=$jwL;};Dataset.prototype.getLoadDataAction=function (){return this.$aUj;};Dataset.prototype.setLoadDataAction=function ($p8v){if($p8v.length>0&&$p8v.charAt(0)=='/'){$p8v=__CONTEXT_PATH+$p8v;};this.$aUj=$p8v;};Dataset.prototype.isInsertOnEmpty=function (){return this.$yMb;};Dataset.prototype.setInsertOnEmpty=function ($4Z7){this.$yMb=$4Z7;};Dataset.prototype.addField=function (name,$2xZ,$rCI){if(name.toLowerCase()=="select")$2xZ=9;var $l86=new Field(name,$2xZ,$rCI);this.$cqa.put(name.toLowerCase(),$l86);return $l86;};Dataset.prototype.getField=function (name){if(typeof(name)=="string")name=name.toLowerCase();return this.$cqa.get(name);};Dataset.prototype.removeField=function (name){if(typeof(name)=="string")name=name.toLowerCase();return this.$cqa.get(name);};Dataset.prototype.getFieldCount=function (){return this.$cqa.size();};Dataset.prototype.setMasterLink=function ($1QD,$T0l,$O1w){var $D7L=this.$D7L;if($D7L!=null){var $o5W=$D7L.$o5W;$o5W.removeDetailLink($D7L);};var $iCl=null;if($1QD!=null){$iCl=new MasterDetailLink($1QD,this);$iCl.setMasterKeyFields($T0l);$iCl.setDetailKeyParameters($O1w);this.$D7L=$iCl;$1QD.addDetailLink($iCl);}else {this.$D7L=$iCl;};return $iCl;};Dataset.prototype.getMasterLink=function (){return this.$D7L;};Dataset.prototype.addDetailLink=function ($NIk){if(this.$kiH==null){this.$kiH=new Collection();};this.$kiH.insert($NIk);this.addObserver($NIk.$fpj);};Dataset.prototype.getDetailLinks=function (){return this.$kiH;};Dataset.prototype.removeDetailLink=function ($NIk){if(this.$kiH!=null){this.$kiH.remove($NIk);}};Dataset.prototype.addObserver=function ($lbV){this.$qJG.insert($lbV);if(this.$EED>0||$lbV.$9RO>0||!$lbV.$I7t)return ;$lbV.processDatasetMessage($qfi,this,null);};Dataset.prototype.removeObserver=function ($lbV){this.$qJG.remove($lbV);};Dataset.prototype.getSelectRecords=function (){return this.$7u9;};Dataset.prototype.clearData=function (){this.disableControls();try{this.$VSX();this.$3VU(null);this.$Fqw=true;this.$d8l=true;}finally{this.enableControls();this.broadcastDatasetMessage($qfi,null);}};Dataset.prototype.$VSX=function (){this.$7u9.clear();this.$qhU.clearData();};Dataset.prototype.$zrF=function ($TQa){if($TQa==null){this.$qhU=this.$ezi;}else {this.$qhU=$TQa;};this.moveFirst();};Dataset.prototype.isRecordVisible=function ($iv4){var $7LC=($iv4.$Oc4!=$Yjk&&!$iv4.$zUj);if($7LC){if(this.$V8A<=0&&this._onFilterRecord!=null){$7LC=$wJA(this,"onFilterRecord",[this,$iv4]);}};return $7LC;};Dataset.prototype.getCurrent=function (){return this.$tuS;};var $YZu=false;Dataset.prototype.$syB=function ($iv4){if($iv4==null)return ;$iv4.$Oce();if($iv4.$heQ){var $QWV=$iv4.$heQ.$kiH;if($QWV!=null){var $e7Q=$QWV.iterator();while($e7Q.hasNext()){var dl=$e7Q.next();var $kdh=dl.$fpj;this.$syB($kdh.$tuS);}};}};Dataset.prototype.$3VU=function ($iv4){var $tuS=this.$tuS;if($tuS==$iv4)return ;if($tuS!=null){if($tuS.$heQ==null){this.$tuS=null;$tuS=null;}else if($tuS.$Oc4!=$Yjk){this.$syB($tuS);}};if($YZu){if(!this.$AiA){if(this.$V8A<=0){var $cf8=$wJA(this,"beforeScroll",[this]);if($cf8!=null)throw $cf8;};this.$AMF=this.$Fqw;this.$k5V=this.$d8l;}}else {if(this.$V8A<=0){var $cf8=$wJA(this,"beforeScroll",[this]);if($cf8!=null)throw $cf8;};var $rqf=this.$Fqw;var $P50=this.$d8l;};if($iv4!=null){if(this.isRecordVisible($iv4)){this.$tuS=$iv4;this.$Fqw=false;this.$d8l=false;}else {this.$tuS=null;this.$Fqw=true;this.$d8l=true;};this.$qhU.$Jr3=$iv4.$Jr3;}else {this.$tuS=null;this.$Fqw=true;this.$d8l=true;};if($YZu){if(this.$AiA){clearTimeout(this.$AiA);this.$AiA=0;};this.$AiA=setTimeout("var $uQq=kingfisher.feather.getDataset(\""+this.id+"\");"+"if ($uQq) $uQq.$Ojp();",250);}else {this.broadcastDatasetMessage($n9z,null);if(this.$AMF!=this.$Fqw||this.$k5V!=this.$d8l){this.broadcastDatasetMessage($ye4,null);}if(this.$V8A<=0){$wJA(this,"afterScroll",[this]);};}};Dataset.prototype.$Ojp=function (){$YZu=false;this.$AiA=0;if(this.$V8A<=0){$wJA(this,"afterScroll",[this]);};this.broadcastDatasetMessage($n9z,null);if(this.$AMF!=this.$Fqw||this.$k5V!=this.$d8l){this.broadcastDatasetMessage($ye4,null);}};Dataset.prototype.setCurrent=function ($iv4){try{this.$3VU($iv4);}catch(e){$o7u(e);}};Dataset.prototype.getFirstRecord=function (){var $iv4=this.$qhU.$Fqw;while($iv4!=null){if($iv4!=null&&this.isRecordVisible($iv4)){return $iv4;};$iv4=$iv4.$s8S;};return null;};Dataset.prototype.getLastRecord=function (){var $iv4=this.$qhU.$d8l;while($iv4!=null){if($iv4!=null&&this.isRecordVisible($iv4)){return $iv4;};$iv4=$iv4.$a48;};return null;};Dataset.prototype.$D1z=function ($hh3,$VFN){var $TQa=this.$qhU;var $KR9;if($hh3==$TQa.$V5k){if(this.$qhU.$3rC==0&&this.$qhU.$adx>0){$KR9=this.$ZKn;}else {$KR9=this.$qhU.$3rC;}}else {$KR9=this.$ZKn;};for(var i=0;i<$KR9;i++){var $iv4=new Record(this);if($VFN!=null){$TQa.insertElement($iv4,"before",$VFN);}else {$TQa.insertElement($iv4);};$iv4.$zUj=true;$iv4.$Jr3=$hh3;}};Dataset.prototype.isFirst=function (){return this.$Fqw;};Dataset.prototype.isLast=function (){return this.$d8l;};Dataset.prototype.moveFirst=function (){try{if((this.$RqD||this.$1yF)&&!this.$ywO&&!this.isPageLoaded(1)){this.$dAx(1);};var $iv4=this.getFirstRecord();this.$3VU($iv4);var $rqf=this.$Fqw;this.$Fqw=true;this.$d8l=($iv4==null);if(!$rqf){this.broadcastDatasetMessage($ye4,null);}}catch(e){$o7u(e);}};Dataset.prototype.movePrev=function (){try{var $opq=this.$tuS;var $hh3=$opq.$Jr3;var $iv4=null;if($opq){$iv4=$opq.getPrevRecord();if((this.$RqD||this.$1yF)&&!this.$ywO){var $yxP=false;if($iv4!=null){if($iv4.$Jr3<$hh3-1){$yxP=true;}}else {if($hh3>1){$yxP=true;}};if($yxP){this.$dAx($hh3-1);$iv4=$opq.getPrevRecord();}}};if($iv4==null){var $rqf=this.$Fqw;this.$Fqw=true;this.$d8l=(this.$tuS==null);if(!$rqf){this.broadcastDatasetMessage($ye4,null);}}else {this.$3VU($iv4);}}catch(e){$o7u(e);}};Dataset.prototype.moveNext=function (){try{var $opq=this.$tuS;var $hh3=$opq.$Jr3;var $iv4=null;if($opq){$iv4=$opq.getNextRecord();if((this.$RqD||this.$1yF)&&!this.$ywO){var $yxP=false;if($iv4!=null){if($iv4.$Jr3>$hh3+1){$yxP=true;}}else {var $jwL=this.$qhU.$V5k;if($hh3<$jwL){$yxP=true;}};if($yxP){this.$dAx($hh3+1);$iv4=$opq.getNextRecord();}}};if($iv4==null){this.$Fqw=(this.$tuS==null);this.$d8l=true;this.broadcastDatasetMessage($ye4,null);}else {this.$3VU($iv4);}}catch(e){$o7u(e);}};Dataset.prototype.moveLast=function (){try{var $jwL=this.$qhU.$V5k;if((this.$RqD||this.$1yF)&&!this.$ywO&&!this.isPageLoaded($jwL)){var $l51=new Array();if(this.$qhU.$3rC<this.$7O8){$l51.push($jwL-1);};$l51.push($jwL);this.$dAx($l51.join(","));};var $iv4=this.getLastRecord();this.$3VU($iv4);this.$Fqw=($iv4==null);this.$d8l=true;this.broadcastDatasetMessage($ye4,null);}catch(e){$o7u(e);}};Dataset.prototype.move=function ($LVF){if($LVF==0){return ;};var $iv4=this.$tuS;if($iv4!=null){if(!(this.$RqD||this.$1yF)){if($LVF>0){for(var i=0;i<$LVF;i++){$iv4=$iv4.getNextRecord();if($iv4==null)break;};if($iv4!=null){this.setCurrent($iv4);}else {this.moveLast();}}else {$LVF=$LVF*(-1);for(var i=0;i<$LVF;i++){$iv4=$iv4.getPrevRecord();if($iv4==null)break;};if($iv4!=null){this.setCurrent($iv4);}else {this.moveFirst();}}}else {var i,$hh3=$iv4.$Jr3;var $f9z=$iv4;if($LVF>0){for(i=0;i<$LVF;i++){$iv4=$iv4.getNextRecord();if($iv4==null)break;if($iv4.$Jr3-$hh3>1){var $bWX=($iv4.$Jr3-$hh3)*this.$ZKn;if(i+$bWX>$LVF){$iv4=null;break;}else {i+=$bWX;}};$hh3=$iv4.$Jr3;$f9z=$iv4;};if($iv4!=null){this.setCurrent($iv4);}else {$hh3+=parseInt(($LVF-i-1)/this.$ZKn)+1;$LVF=($LVF-i-1)%this.$ZKn+1;var $rPU=$LVF;var $l51=new Array();if($LVF<this.$7O8&&$hh3-1>0&&!this.isPageLoaded($hh3-1)){$rPU+=this.$ZKn;$l51.push($hh3-1);};$l51.push($hh3);if((this.$ZKn-$LVF)<this.$7O8&&$hh3+1<this.getPageCount()){$l51.push($hh3+1);};if(this.$dAx($l51.join(","),false,false)>0){$iv4=$f9z;for(i=0;i<$rPU;i++){var $JsP=$iv4.getNextRecord();if($JsP==null)break;$iv4=$JsP;};this.setCurrent($iv4);}else {this.moveLast();}}}else {$LVF=$LVF*(-1);for(i=0;i<$LVF;i++){$iv4=$iv4.getPrevRecord();if($iv4==null)break;if($hh3-$iv4.$Jr3>1){var $bWX=($hh3-$iv4.$Jr3)*this.$ZKn;if(i+$bWX>$LVF){$iv4=null;break;}else {i+=$bWX;}};$hh3=$iv4.$Jr3;$f9z=$iv4;};if($iv4!=null){this.setCurrent($iv4);}else {$hh3-=parseInt(($LVF-i-1)/this.$ZKn)+1;$LVF=($LVF-i-1)%this.$ZKn+1;var $rPU=$LVF;var $l51=new Array();if($LVF<this.$7O8&&$hh3-1>0){$l51.push($hh3-1);};$l51.push($hh3);if((this.$ZKn-$LVF)<this.$7O8&&$hh3+1<this.getPageCount()&&!this.isPageLoaded($hh3+1)){$rPU+=this.$ZKn;$l51.push($hh3+1);};if(this.$dAx($l51.join(","),false,false)>0){$iv4=$f9z;for(i=0;i<$rPU;i++){var $JsP=$iv4.getPrevRecord();if($JsP==null)break;$iv4=$JsP;};this.setCurrent($iv4);}else {this.moveFirst();}}}}}};Dataset.prototype.isPageLoaded=function ($hh3){if($hh3<=this.getPageCount()){var $CEC=this.$qhU.$5r5($hh3);return (typeof($CEC)!="undefined");}else {return false;}};Dataset.prototype.$GwI=function ($hh3,$OcJ,$B2B){var $jwf=this.$ZKn;if(!($jwf>-1))$jwf=0;var $mgo,$FLH;if($onF==$0oD){$mgo=new ActiveXObject("Msxml.DOMDocument");$FLH=$mgo;}else {$mgo=$$("DOM");$FLH=document;};var $hvh=$FLH.createElement("rpc");$mgo.appendChild($hvh);$hvh.setAttribute("datasetId",this.$jui);$hvh.setAttribute("datasetType",this.$khb);$hvh.setAttribute("pageIndex",$hh3);$hvh.setAttribute("pageSize",$jwf);var $viv=$jlV($FLH,this.$khq);if($viv!=null)$hvh.appendChild($viv);var $CHi=$P0N($FLH,this.$bMv.$oSU);if($CHi!=null)$hvh.appendChild($CHi);var $1K0=$VD6($FLH,this.$N9l);if($1K0!=null)$hvh.appendChild($1K0);var $S0W;if($onF==$0oD){$S0W=$mgo.xml;}else {$S0W=$mgo.innerHTML;};delete $mgo;$mgo=null;if($OcJ){$Zjp(this.$bMv,this.$aUj,"loadData",$S0W,this.$H8a,this.id,$B2B);return null;}else {var $mgo=$2Tg(this.$bMv,this.$aUj,"loadData",$S0W,this.$H8a,this.id);return $mgo;}};Dataset.prototype.$6VU=function ($mgo){var $V0r=null;try{if($mgo!=null){this.$uQA.clear();this.$aUG.clear();var $Dt9=$mgo.documentElement;if(parseBoolean($Dt9.getAttribute("succeed"))){$HzF(this.$aUG,$Dt9);$cBh(this.$uQA,$Dt9);$ZUC($Dt9,this.getViewModel().properties());var $t4c=this.$cqa.size();for(var i=0;i<$t4c;i++){this.$cqa.get(i).$QJT=null;};if($onF==$0oD){$V0r=$Dt9.selectSingleNode("records");}else {$V0r=$Dt9.getElementsByTagName("records")[0];}}else {var $kwF;if($onF==$0oD){$kwF=$Dt9.selectSingleNode("message").text;}else {var $IQg=$Dt9.getElementsByTagName("message")[0].firstChild;if($IQg!=null)$kwF=$IQg.nodeValue;};throw __DATASET_LOADDATA_ERROR+"\n"+$kwF;};delete $mgo;}else {throw __DATASET_LOADDATA_ERROR;}}catch(e){$o7u(e);};return $V0r;};Dataset.prototype.loadData=function ($R5m){var $KR9=0;if(!this.$cH2){var $mgo=this.$GwI(1,false);if($mgo!=null){var $V0r=this.$6VU($mgo);if($V0r!=null){$KR9=this.$zEm($V0r,true,null,$R5m);}}}else {var $uQq=this;var $TQa=$uQq.$qhU;this.$GwI(1,true,function ($CF9,$mgo){var $V0r=$uQq.$6VU($mgo);if($V0r!=null){$uQq.$zEm($V0r,true,$TQa,$R5m);}});};return $KR9;};Dataset.prototype.loadPage=function ($hh3,$B2B){return this.$dAx($hh3,false,true,$B2B);};Dataset.prototype.$dAx=function ($hh3,$jE5,$oEg,$B2B){var $wRt;if(typeof($hh3)=="number"){$wRt=[$hh3];}else {$wRt=$hh3.split(",");};var $l51=new Array();var $TQa=this.$qhU;var $jwL=$TQa.$V5k;for(var i=0;i<$wRt.length;i++){var $1XF=parseInt($wRt[i]);if($1XF>0&&$1XF<=$jwL){var $CEC=$TQa.$5r5($1XF);if($CEC==null){$l51.push($1XF);}}};if($l51.length>0){if(typeof($oEg)=="undefined"){$oEg=true;}return this.$U5e($l51.join(","),$jE5,$oEg,$B2B);}else {return 0;}};Dataset.prototype.$U5e=function ($hh3,$jE5,$oEg,$B2B){if($jE5){this.$VSX();var $TQa=this.$qhU;var $e9e=$TQa.$4N7;if($e9e!=null){$e9e=new Object();$TQa.$4N7=$e9e;};this.$tuS=null;this.$Fqw=true;this.$d8l=true;this.broadcastDatasetMessage($qfi,null);};var $KR9=0;if(!this.$cH2){try{var $mgo=this.$GwI($hh3,false);if($mgo!=null){var $V0r=this.$6VU($mgo);if($V0r!=null){$KR9=this.$zEm($V0r,$oEg,null,null);}}}finally{if($jE5&&$KR9==0){this.setCurrent(null);}}}else {var $uQq=this;var $TQa=$uQq.$qhU;this.$GwI($hh3,true,function ($aIE,$mgo){if($aIE){if($jE5){$uQq.$VSX();$uQq.$tuS=null;$uQq.$Fqw=true;$uQq.$d8l=true;};var $V0r=$uQq.$6VU($mgo);if($V0r!=null){$KR9=$uQq.$zEm($V0r,$oEg,$TQa,null);}};if($jE5&&$KR9==0){$uQq.setCurrent(null);}if($B2B!=null)$B2B($aIE);});};return $KR9;};Dataset.prototype.moveToPage=function ($hh3){var $cf8=$wJA(this,"beforeMoveToPage",[this,$hh3]);if($cf8!=null)throw $cf8;if(this.$RqD||this.$1yF){this.$dAx($hh3);};var $iv4=this.getFirstRecord();while($iv4!=null){if($iv4.$Jr3==$hh3){this.setCurrent($iv4);break;};$iv4=$iv4.getNextRecord();}$wJA(this,"afterMoveToPage",[this,$hh3]);};Dataset.prototype.getVisibleCount=function (){var $TQa=this.$qhU;if($TQa.$coN==-1||this._onFilterRecord!=null){var $KR9=0;var $iv4=this.getFirstRecord();while($iv4!=null){$iv4=$iv4.getNextRecord();$KR9++;};$TQa.$coN=$KR9;};return $TQa.$coN;};Dataset.prototype.$OsO=function ($3xU){if(!this.$hFG)return ;if(this.$tuS!=null){this.$syB(this.$tuS);};if(this.$V8A<=0){var $cf8=$wJA(this,"beforeInsert",[this]);if($cf8!=null)throw $cf8;};var $iv4=new Record(this);var $t4c=this.$cqa.size();for(var i=0;i<$t4c;i++){var $l86=this.$cqa.get(i);var $JFm=$l86.$CKO;if($JFm!=null){if(typeof($JFm)=="string"&&$JFm.startsWith("#eval[")&&$JFm.endsWith("]")){var $zKn=$JFm.substr("#eval[".length,$JFm.length-"]".length-"#eval[".length);var $cf8;eval("$cf8="+$zKn+";");$iv4.$ju1($l86.$Bys,$cf8);}else if(typeof($JFm)=="string"&&$JFm.startsWith("#class[")&&$JFm.endsWith("]")){var $zKn=$JFm.substr("#class[".length,$JFm.length-"]".length-"#class[".length);}else $iv4.$ju1($l86.$Bys,$JFm);}};var $iCl=this.$D7L;if($iCl!=null){var $1QD=$iCl.$o5W;var $5kT=$1QD.$tuS;var $m79=$iCl.$bcn;var $xwp=$iCl.$IDW;if($5kT!=null&&($m79.length==$xwp.length)){for(var i=0;i<$m79.length;i++){$iv4.$ju1($xwp[i],$5kT.getValue($m79[i]));}}};switch($3xU){case "before":;case "after":{$iv4.$Jr3=this.$tuS.$Jr3;break;};case "begin":{$iv4.$Jr3=1;break;};default:{$iv4.$Jr3=this.$qhU.$V5k;break;}};var $TQa=this.$qhU;$TQa.insertElement($iv4,$3xU,this.$tuS);$iv4.setState($7ex);$iv4.$sCJ=true;this.setCurrent($iv4);if($TQa.$coN>=0)$TQa.$coN++;if($TQa.$adx>=0)$TQa.$adx++;if(this.$V8A<=0){$wJA(this,"afterInsert",[this,$3xU]);};return $iv4;};Dataset.prototype.insertRecord=function ($3xU){try{return this.$OsO($3xU);}catch(e){$o7u(e)}};Dataset.prototype.appendRecord=function (){this.insertRecord();};Dataset.prototype.insertRecords=function ($9y9,$3xU){if($9y9.length==0)return ;try{var $opq=this.getCurrent();var $lJJ=new Collection();var $iv4;for(var i=0;i<$9y9.length;i++){$iv4=$9y9[i];$iv4.setState($tzn);$lJJ.insertElement($iv4);};var $TQa=this.$qhU;$TQa.insertCollection($lJJ,$3xU,this.$tuS);this.setCurrent($iv4);if($TQa.$coN>=0)$TQa.$coN+=$9y9.length;if($TQa.$adx>=0)$TQa.$adx+=$9y9.length;if($opq!=null){this.setCurrent($opq);}else {this.moveFirst();}this.broadcastDatasetMessage($qfi,null);}catch(e){$o7u(e)}};Dataset.prototype.$dlM=function ($iv4){$iv4.$sCJ=false;if($iv4.$Oc4==$7ex||$iv4.$Oc4==$tzn){this.$qhU.removeElement($iv4);$iv4.$Oc4=$Yjk;}else {$iv4.setState($Yjk);};var $TQa=this.$qhU;if($TQa.$coN>=0)$TQa.$coN--;var $t4c=this.$cqa.size();for(var i=0;i<$t4c;i++){var $l86=this.$cqa.get(i);if($l86.$yyV){var $e9e=$TQa.$4N7;if($e9e==null){$e9e=new Object();$TQa.$4N7=$e9e;};var $NI9="_"+$l86.$Bys;var $rge=$e9e[$NI9];if(typeof($rge)!="number"){$rge=0;};var $hF2=parseFloat($iv4.getValue(i));if(!isNaN($hF2))$rge-=$hF2;$e9e[$NI9]=$rge;}}};Dataset.prototype.$OOt=function ($iv4){if($iv4==null)$iv4=this.$tuS;if($iv4==null){throw __DATASET_ERR_NO_CURRENT.replace(/%s/g,this.id+".deleteRecord");return ;};if(this.$V8A<=0){var $cf8=$wJA(this,"beforeDelete",[this,$iv4]);if($cf8!=null)throw $cf8;};var $IP0=null;if($iv4==this.$tuS){$IP0=$iv4.getNextRecord();if($IP0==null){$IP0=$iv4.getPrevRecord();}}else {$IP0=this.$tuS;};var $Ryl=$iv4.$Oc4==$7ex;this.$dlM($iv4);if($IP0!=this.$tuS){this.setCurrent($IP0);};this.broadcastDatasetMessage($JHr,[$iv4]);if(this.$V8A<=0){$wJA(this,"afterDelete",[this,$iv4]);};if($Ryl)$iv4.destroy();};Dataset.prototype.deleteRecord=function ($iv4){try{this.$OOt($iv4);}catch(e){$o7u(e)}};Dataset.prototype.cancelRecord=function (){var $opq=this.$tuS;if($opq==null){alert(__DATASET_ERR_NO_CURRENT.replace(/%s/g,this.id+".cancelRecord"));return ;};$opq.cancel();};Dataset.prototype.postRecord=function (){var $opq=this.$tuS;if($opq==null){alert(__DATASET_ERR_NO_CURRENT.replace(/%s/g,this.id+".postRecord"));return false;};return $opq.post();};Dataset.prototype.getValue=function (name){var $opq=this.$tuS;if($opq==null){alert(__DATASET_ERR_NO_CURRENT.replace(/%s/g,this.id+".getValue(\""+name+"\")"));return null;};return $opq.getValue(name);};Dataset.prototype.setValue=function (name,$0DL){var $opq=this.$tuS;if($opq==null){alert(__DATASET_ERR_NO_CURRENT.replace(/%s/g,this.id+".setValue(\""+name+"\","+$0DL+")"));return false;};return $opq.setValue(name,$0DL);};Dataset.prototype.getString=function (name){var $opq=this.$tuS;if($opq==null){alert(__DATASET_ERR_NO_CURRENT.replace(/%s/g,this.id+".getString(\""+name+"\")"));return null;};return $opq.getString(name);};Dataset.prototype.getValidRecord=function ($iv4){if($iv4==null){return this.getCurrent().getValidRecord();}else {return $iv4.getValidRecord();}};Dataset.prototype.getOldRecord=function ($iv4){if($iv4==null){return this.getCurrent().getOldRecord();}else {return $iv4.getOldRecord();}};Dataset.prototype.broadcastDatasetMessage=function ($kwF,$hL1){if(this.$EED>0)return ;var $LRy=this.$qJG.$Fqw;while($LRy){var $lbV=$LRy.getData();if($lbV.$9RO<=0){$lbV.processDatasetMessage($kwF,this,$hL1);};$LRy=$LRy.$s8S;}};Dataset.prototype.$nAH=function ($1QD,$5kT){function $Vdh($B91,$1QD,$5kT,$m79){for(var i=0;i<$m79.length;i++){var $ET8=$m79[i];var $xJQ=$B91[i];var $2xZ=1;var $l86=$1QD.getField($ET8);if($l86){$2xZ=$l86.$jEM;};if($5kT!=null){$Pl8.setValue($xJQ,$5kT.getValue($ET8),$2xZ);}else {$Pl8.setValue($xJQ,null,$2xZ);}}};var $L8I=this.$qhU;var $iCl=this.$D7L;var $m79=$iCl.$bcn;var $B91=$iCl.$VWH;var $TQa=null;var $Pl8=this.$khq;if($5kT!=null){$TQa=$5kT.$lNx(this.id);if(!$iCl.$tNW)$TQa.$heQ.flushData();if($5kT.$Oc4==$7ex){$TQa.$NKo(1);}};$Vdh($B91,$1QD,$5kT,$m79);if($L8I!=$TQa){this.disableControls();this.$1yF=true;this.$zrF($TQa);this.$1yF=false;this.enableControls();}};Dataset.prototype.processDatasetMessage=function ($kwF,$uQq,$hL1){if($kwF==$qfi||$kwF==$n9z){var $iCl=this.$D7L;var $1QD=$iCl.$o5W;if($iCl!=null&&$1QD==$uQq){this.$nAH($1QD,$1QD.$tuS);this.refreshControls();}}};Dataset.prototype.validateCurrent=function (){if(this.$tuS==null||!this.isRecordVisible(this.$tuS)){this.setCurrent(this.getFirstRecord());}};Dataset.prototype.refreshControls=function (){this.validateCurrent();this.broadcastDatasetMessage($qfi,null);};Dataset.prototype.disableControls=function (){this.$EED++;};Dataset.prototype.enableControls=function (){if(this.$EED<1){this.$EED=0;}else {this.$EED--;}};Dataset.prototype.disableEvents=function (){this.$V8A++;};Dataset.prototype.enableEvents=function (){if(this.$V8A<1){this.$V8A=0;}else {this.$V8A--;}};Dataset.prototype.flushData=function ($B2B){try{if(this.$V8A<=0){var $cf8=$wJA(this,"beforeFlushData",[this]);if($cf8!=null)throw $cf8;};this.$7u9.clear();if(!this.$cH2){this.$U5e(this.$qhU.$Jr3,true,true);if(this.$V8A<=0){$wJA(this,"afterFlushData",[this]);}return true;}else {var $uQq=this;this.$U5e(this.$qhU.$Jr3,true,true,function ($aIE){if($aIE){if($uQq.$V8A<=0){$wJA($uQq,"afterFlushData",[$uQq]);}};if($B2B!=null)$B2B($uQq,$aIE);});}}catch(e){$o7u(e);return false;}};Dataset.prototype.flushDataAsync=function ($B2B){var $OcJ=this.$cH2;this.$cH2=true;this.flushData($B2B);this.$cH2=$OcJ;return -1;};Dataset.prototype.appendFromXml=function (){if(this.$Avr)return ;this.$Avr=true;var $mgo=$("__"+this.id);if($mgo!=null){this.$uQA.clear();this.$aUG.clear();var $Dt9;if($onF==$0oD){$Dt9=$mgo.documentElement;}else {$Dt9=$mgo.getElementsByTagName("rpc")[0];};if($Dt9!=null){$HzF(this.$aUG,$Dt9);$cBh(this.$uQA,$Dt9);var $V0r;if($onF==$0oD){$V0r=$Dt9.selectSingleNode("records");}else {$V0r=$Dt9.getElementsByTagName("records")[0];}if($V0r!=null)this.$zEm($V0r,true,null,null);}}else {if(this.$aUj){var $nRR=this.$H8a;this.$H8a=false;var $mgo=this.$GwI(1,false);if($mgo!=null){var $V0r=this.$6VU($mgo);if($V0r!=null){this.$zEm($V0r,true,null,null);}}}this.$H8a=$nRR;}if(this.$yMb&&this.getCurrent()==null){this.insertRecord();}};Dataset.prototype.$zEm=function ($Dt9,$oEg,$TQa,$R5m){function $fK($TQa,$tcE,$wAh,$TGY){var $iv4;if($TGY==null){$iv4=$TQa.$Fqw;}else {$iv4=$TGY;};if($iv4!=null){do{if($iv4.$Jr3>=$tcE&&$iv4.$Jr3<=$wAh&&$iv4.$zUj){$TQa.removeElement($iv4);}else if($iv4.$Jr3>$wAh){return $iv4;};$iv4=$iv4.$s8S;}while($iv4!=null);};return null;};var $G0O=this.$bMv;var $64y=$G0O.$I84;if(typeof($64y)=="undefined"&&$G0O.$oSU.getValue("__recordMapRef")>0){$64y=new Object();$G0O.$I84=$64y;};var $KR9=0;if($TQa==null)$TQa=this.$qhU;$TQa.$V5k=parseInt($Dt9.getAttribute("pageCount"));var $HSU=true;var $8dt=parseInt($Dt9.getAttribute("possibleCount"));if(isNaN($8dt)){$TQa.$adx=0;$TQa.$coN=-1;$HSU=false;}else {if(this.$RqD){if($TQa.$coN>-1){$TQa.$coN=$8dt+($TQa.$coN-$TQa.$adx);}else {$TQa.$coN=$8dt;}}else {$HSU=false;};$TQa.$adx=$8dt;$TQa.$3rC=$8dt%this.$ZKn;};var $wRt=new Array();var $urr=$Dt9.getAttribute("loadedPages");if($urr!=null){var $Vb3=$urr.split(",");for(var i=0;i<$Vb3.length;i++){var $hh3=parseInt($Vb3[i]);$wRt.push($hh3);$TQa.$NKo($hh3);}};var $2vA=$Dt9.childNodes;var $opq=null;var $VFN=null;if($R5m==null){$VFN=$fK($TQa,$wRt[0],$wRt[$wRt.length-1],$VFN);}else {switch($R5m){case "begin":$VFN=$TQa.$Fqw;break;case "before":$VFN=this.$tuS;break;case "after":if(this.$tuS!=null){$VFN=this.$tuS.getNextRecord();};break;default:break;}};var $6ty=0;var $hbq;for(var i=0;i<$2vA.length;i++){var $tmp=$2vA[i];if($onF!=$0oD&&$tmp.nodeName.charAt(0)=='#'){continue;};var $iv4=new Record(this,$TQa);$iv4.$Kgz=$tmp;var $QJo=$tmp.getAttribute("id");if($QJo!=null){$iv4.$ldQ=$QJo;};if($64y!=null){$64y[$iv4.$ldQ]=$iv4;};if(parseBoolean($tmp.getAttribute("isCurrent"))){$opq=$iv4;};var $hh3=parseInt($tmp.getAttribute("pageIndex"));if(!($hh3>0))$hh3=1;$iv4.$Jr3=$hh3;if($hh3!=$hbq){$hbq=$hh3;$6ty=0;}$iv4.$LcF=++$6ty;if($VFN!=null){$TQa.insertElement($iv4,"before",$VFN);}else {$TQa.insertElement($iv4);};var $H8o=$tmp.getAttribute("canDelete");if($H8o!=null)$iv4.$82o=parseBoolean($H8o);var $550=$tmp.getAttribute("canUpdate");if($550!=null)$iv4.$MqA=parseBoolean($550);var $4Mf=$tmp.getAttribute("canSelect");if($4Mf!=null)$iv4.$eAe=parseBoolean($4Mf);$iv4.$Oc4=$tmp.getAttribute("state");if($iv4.$Oc4!=null){if($iv4.$Oc4==$7ex){$iv4.$sCJ=true;}else if($iv4.$Oc4==$MiA){$iv4.$sCJ=true;$iv4.$S54();}};if($iv4.$Oc4!=$Yjk){$KR9++;if(!$HSU)$TQa.$coN++;}};var $AHK=new Array();var $t4c=this.$cqa.size();for(var i=0;i<$t4c;i++){var $l86=this.$cqa.get(i);if($l86.$yyV){$AHK.push($l86.$Bys);}};if(this.$uQA.size()>0){var $e9e=$TQa.$4N7;if($e9e==null){$e9e=new Object();$TQa.$4N7=$e9e;};for(var i=0;i<$AHK.length;i++){$e9e["_"+$AHK[i]]=parseFloat(this.$uQA.getValue($AHK[i]));}var $Pl8=this.$uQA.$khq;for(var i=0;i<$Pl8.size();i++){var $57q=$Pl8.get(i);if($e9e["_"+$57q.$Bys]==null&&this.$aUG.getParameter($57q.$Bys)==null){this.$aUG.setDataType($57q.$Bys,$57q.$jEM);this.$aUG.setValue($57q.$Bys,$57q.$toY);}};}else if($AHK.length>0){this.disableControls();var $e9e=$TQa.$4N7;if($e9e==null){$e9e=new Object();$TQa.$4N7=$e9e;};var $iv4=this.getFirstRecord();while($iv4){for(var i=0;i<$AHK.length;i++){var $0DL=$e9e["_"+$AHK[i]]+"";if($0DL=="undefined"||$0DL=="null"||$0DL=="NaN"){$e9e["_"+$AHK[i]]=0;}$e9e["_"+$AHK[i]]+=parseFloat($iv4.getValue($AHK[i]));}$iv4=$iv4.getNextRecord();}this.enableControls();}if($oEg){this.disableControls();if($opq!=null&&$TQa==this.$qhU){this.setCurrent($opq);}else if(this.$tuS==null){var $iv4=this.getFirstRecord();this.$3VU($iv4);this.$Fqw=true;};this.enableControls();this.broadcastDatasetMessage($qfi,null);};return $KR9;};Dataset.prototype.restore=function (){var $iv4=this.$qhU.$Fqw;while($iv4){$iv4.$f2X();$iv4=$iv4.$s8S;}};Dataset.prototype.sort=function ($IV5){function $hS0($UOA,$xYK,$rDo,$JIA){function $0bI($iv4,$w1x){if($xYK.length>0){var $afs,minus;for(var i=0;i<$xYK.length;i++){var $xjk=$xYK[i];if($xjk.ascent){$afs=1;minus=-1;}else {$afs=-1;minus=1;};var $0DL=$iv4.getValue($xjk.field);var $re9=$w1x.getValue($xjk.field);if($0DL>$re9){return $afs;}else if($0DL<$re9){return minus;}}}else {if($iv4.$Jr3>$w1x.$Jr3){return 1;}else if($iv4.$Jr3<$w1x.$Jr3){return -1;}else {if($iv4.$ldQ>$w1x.$ldQ){return 1;}else if($iv4.$ldQ<$w1x.$ldQ){return -1;}}};return 0;};var $VJi=$rDo;var $dg5=$JIA;var $6Nl=parseInt(($VJi+$dg5)/2);var $w1x=$UOA[$6Nl];do{while($0bI($UOA[$VJi],$w1x)<0)$VJi++;while($0bI($UOA[$dg5],$w1x)>0)$dg5--;if($VJi<=$dg5){var $2Mg=$UOA[$VJi];$UOA[$VJi]=$UOA[$dg5];$UOA[$dg5]=$2Mg;$VJi++;$dg5--;}}while($VJi<=$dg5)if($dg5>$rDo)$hS0($UOA,$xYK,$rDo,$dg5);if($JIA>$VJi)$hS0($UOA,$xYK,$VJi,$JIA);};var $TQa=this.$qhU;if(this.$RqD&&$TQa.$V5k>1){alert(__DATASET_SORT_NOT_SUPPORTED);return false;};var $xYK=new Array();if($IV5){var $R89=$IV5.split(",");for(var i=0;i<$R89.length;i++){var $xjk=new Object();var $fm6=$R89[i];var $cAl=$fm6.charAt(0);if($cAl=="+"){$xjk.ascent=true;$xjk.field=$fm6.substring(1);}else if($cAl=="-"){$xjk.ascent=false;$xjk.field=$fm6.substring(1);}else {$xjk.ascent=true;$xjk.field=$fm6;};$xYK.push($xjk);}};if(this.getCurrent()!=null){var $UOA=new Array();var $iv4=$TQa.$Fqw;while($iv4!=null){$UOA.push($iv4);$iv4=$iv4.$s8S;};$hS0($UOA,$xYK,0,$UOA.length-1);$TQa.$4G0();$TQa.$Fqw=null;$TQa.$d8l=null;$TQa.$RxL=0;for(var i=0;i<$UOA.length;i++){$TQa.insertElement($UOA[i]);};this.$Fqw=false;this.$d8l=false;};var $t4c=this.$cqa.size();for(var i=0;i<$t4c;i++){this.$cqa.get(i).$QJT=null;};for(var i=0;i<$xYK.length;i++){var $xjk=$xYK[i];this.$cqa.get($xjk.field.toLowerCase()).$QJT=(($xjk.ascent)?"ascent":"descent");};this.$ywO=($xYK.length>0);this.broadcastDatasetMessage($qfi,null);};Dataset.prototype.copyRecord=function ($iv4){if($iv4==null)return ;if(this.$tuS==null){this.insertRecord();};var $opq=this.$tuS;$opq.copyRecord($iv4);this.postRecord();this.broadcastDatasetMessage($qfi,null);};Dataset.prototype.getSum=function ($l86){var $e9e=this.$qhU.$4N7;if($e9e!=null){var $rge=$e9e["_"+$l86];if(typeof($rge)=="number"){return $rge;}};return 0;};Dataset.prototype.find=function ($Wym,$NBv,$TGY,$VNk,$Gn9){function $LLP($l86,$6Cb){if($l86&&($l86.$jEM==10||$l86.$jEM==11||$l86.$jEM==12)&&typeof($NBv[i])=="object"){return $6Cb.getTime();}else return $6Cb;}if($Wym.length>0&&$Wym.length==$NBv.length){var $iv4=(($TGY!=null)?$TGY:(!$Gn9?this.getFirstRecord():this.getLastRecord()));while($iv4!=null){var $R7O=true;for(var i=0;i<$Wym.length;i++){var $l86=this.getField($Wym[i]);var $6Cb=$LLP($l86,$NBv[i]);var $Wsy=$LLP($l86,$iv4.getValue($Wym[i]));if($Wsy!=$6Cb){$R7O=false;break;}};if($R7O){if(!$VNk||($VNk&&$iv4.$Oc4!=$7ex))return $iv4;};$iv4=(!$Gn9?$iv4.getNextRecord():$iv4.getPrevRecord());}};return null;};Dataset.prototype.saveToDatabase=function ($nNH){function $KUD($uQq){if(!$uQq.$6e1){var $JXp=buildKingfisherElement("UpdateCommand",null,$dw2());$JXp.setAction("/kingfisher/autoDataLoad.do");$JXp.setShowLoadingTip($uQq.$H8a);var $UVt=$1gz;if($uQq.getField("select"))$UVt=$LM5;var $G3w=$JXp.addDatasetInfo($uQq,$UVt);if($nNH!=null)$G3w.setFlushDataOnSuccess($nNH);var $QWV=$uQq.$kiH;if($QWV!=null){var $e7Q=$QWV.iterator();while($e7Q.hasNext()){var dl=$e7Q.next();var $kdh=dl.$fpj;var $UVt=$1gz;if($kdh.getField("select"))$UVt=$LM5;$JXp.addDatasetInfo($kdh,$UVt);}};addKingfisherEvent($JXp,"onSuccess",function ($JXp){return false;});$uQq.$6e1=$JXp;}return $uQq.$6e1;};if(!this.$D7L){var $JXp=$KUD(this);return $JXp.execute();}else alert("The method only master dataset use.");};Dataset.prototype.isDirty=function (){var $TQa=this.$qhU;var $iv4=$TQa.$Fqw;while($iv4!=null){if($iv4.$Oc4==$tzn||$iv4.$Oc4==$MiA||$iv4.$Oc4==$Yjk||$iv4.isDirty()){return true;};$iv4=$iv4.$s8S;};return false;};function Validator(){this.$4Qt=true;this.$HIW=null;this.$BKV=true;};Validator.prototype.isValidateImmediately=function (){return this.$4Qt;};Validator.prototype.setValidateImmediately=function ($Uj6){this.$4Qt=$Uj6;};Validator.prototype.getErrorMessage=function (){return this.$HIW;};Validator.prototype.setErrorMessage=function ($6HC){this.$HIW=$6HC;};Validator.prototype.isEnabled=function (){return this.$BKV;};Validator.prototype.setEnabled=function ($dXJ){this.$BKV=$dXJ;};Validator.prototype.getFinalErrorMessage=function (){return this.$HIW;};Validator.prototype.throwException=function (){throw this.getFinalErrorMessage();};function RequiredValidator(){this.$gJz="RequiredValidator";this.$4Qt=false;this.$HIW=__VALIDATOR_REQUIRED_MESSAGE;};RequiredValidator.prototype=new Validator();RequiredValidator.prototype.validate=function ($0DL){if(typeof($0DL)=="undefined"||$0DL==null||$0DL.length==0){return false;};return true;};function LengthValidator(){this.$gJz="LengthValidator";this.$HIW=__VALIDATOR_LENGTH_MESSAGE;this.$4IE=0;this.$Nem=0;};LengthValidator.prototype=new Validator();LengthValidator.prototype.getMinLength=function (){return this.$4IE;};LengthValidator.prototype.setMinLength=function ($xPC){this.$4IE=$xPC;};LengthValidator.prototype.getMaxLength=function (){return this.$Nem;};LengthValidator.prototype.setMaxLength=function ($yJH){this.$Nem=$yJH;};LengthValidator.prototype.validate=function ($0DL){if(!this.$BKV)return true;var $AFm=0;if($0DL!=null){$AFm=new String($0DL).length;};if(this.$4IE>0&&$AFm<this.$4IE){return false;};if(this.$Nem>0&&$AFm>this.$Nem){return false;};return true;};var $h09="ignore";var $FNA="allow_equals";var $Dae="not_allow_equals";function RangeValidator(){this.$gJz="RangeValidator";this.$HIW=__VALIDATOR_RANGE_MESSAGE;this.$FHA=0;this.$JvM=$h09;this.$o6u=0;this.$ZS6=$h09;};RangeValidator.prototype=new Validator();RangeValidator.prototype.getMin=function (){return this.$FHA;};RangeValidator.prototype.setMin=function ($wMx){this.$FHA=$wMx;};RangeValidator.prototype.getMinMatchRule=function (){return this.$JvM;};RangeValidator.prototype.setMinMatchRule=function ($pcv){this.$JvM=$pcv;};RangeValidator.prototype.getMax=function (){return this.$o6u;};RangeValidator.prototype.setMax=function ($FdE){this.$o6u=$FdE;};RangeValidator.prototype.getMaxMatchRule=function (){return this.$ZS6;};RangeValidator.prototype.setMaxMatchRule=function ($f6U){this.$ZS6=$f6U;};RangeValidator.prototype.validate=function ($0DL){if(!this.$BKV)return true;var n=parseFloat($0DL);if(isNaN(n))n=0;var $5CN=false;if(this.$JvM==$FNA){if(!(n>=this.$FHA)){$5CN=true;}}else if(this.$JvM==$Dae){if(!(n>this.$FHA)){$5CN=true;}};if(this.$ZS6==$FNA){if(!(n<=this.$o6u)){$5CN=true;}}else if(this.$ZS6==$Dae){if(!(n<this.$o6u)){$5CN=true;}};if($5CN){return false;};return true;};function ListValidator(){this.$gJz="ListValidator";this.$HIW=__VALIDATOR_LIST_MESSAGE;this.$4Ap=null;this.$ZaF=null;};ListValidator.prototype=new Validator();ListValidator.prototype.getValues=function (){return this.$4Ap;};ListValidator.prototype.setValues=function ($NBv){this.$4Ap=$NBv;if($NBv!=null){this.$ZaF=$NBv.split(",");}else {this.$ZaF=null;}};ListValidator.prototype.validate=function ($0DL){if(!this.$BKV)return true;var s="";if($0DL!=null){s=$0DL+"";};if(s.length>0&&this.$ZaF!=null&&this.$ZaF.length>0){for(var i=0;i<this.$ZaF.length;i++){if(this.$ZaF[i]==s)return true;};return false;};return true;};function PatternValidator(){this.$gJz="PatternValidator";this.$HIW=__VALIDATOR_PATTERN_MESSAGE;this.$jm4=null;this.$qJV=null;};PatternValidator.prototype=new Validator();PatternValidator.prototype.getPattern=function (){return this.$jm4;};PatternValidator.prototype.setPattern=function ($1Yq){this.$jm4=$1Yq;};PatternValidator.prototype.validate=function ($0DL){if(!this.$BKV)return true;var s="";if($0DL!=null){s=$0DL+"";if(s.length>0&&this.$jm4!=null){var $IS2=new RegExp();$IS2.compile(this.$jm4,"g");return $IS2.test(s);}};return true;};function CustomValidator(){this.$gJz="CustomValidator";this.$HIW=__VALIDATOR_CUSTOM_MESSAGE;this.$Kb1=null;};CustomValidator.prototype=new Validator();CustomValidator.prototype.getMethod=function (){return this.$Kb1;};CustomValidator.prototype.setMethod=function ($s0l){this.$Kb1=parseString($s0l);};CustomValidator.prototype.validate=function ($0DL){if(!this.$BKV)return true;var $cf8;eval("$cf8="+this.$Kb1+"($0DL);");return parseBoolean($cf8);};