
/* GO AWAY!!! NOW!!! DON'T CHANGE THIS GENERATED FILE!!! CHANGES WILL BE LOST!!! */
function nxIntelliForm(){};nxIntelliForm.prototype=new nxObject;nxIntelliForm.superClass=nxObject.prototype;nxIntelliForm.prototype.objectInit=function(data){nxIntelliForm.superClass.objectInit.call(this,data);this.node=data.node;this.initPreSubmit();};nxIntelliForm.prototype.initPreSubmit=function(){this.defaultButton=document.createElement("input");var io=this.node.getElementsByTagName("input");this.defaultButton.disabled=true;for(var i=0;i<io.length;i++){if(io[i].type=="submit"||io[i].type=="image"){this.defaultButton.type="hidden";this.defaultButton.value=io[i].value;this.defaultButton.name=io[i].name;break;};};this.node.appendChild(this.defaultButton);for(var i=0;i<io.length;i++){if(io[i].type=="text"||io[i].type=="password"){var func=new Function("e","return __registry__.get('"+this.config.get("id")+"').preSubmit(e)");__node__.addEvent(io[i],"keypress",func);};};};nxIntelliForm.prototype.preSubmit=function(e){if(e.keyCode==13)
this.defaultButton.disabled=false;};
/* GO AWAY!!! NOW!!! DON'T CHANGE THIS GENERATED FILE!!! CHANGES WILL BE LOST!!! */
with(__settings__){trySet("nxForm","tags",["input","textarea","select"]);trySet("nxForm","useFormClass",true);trySet("nxForm","useFormHide",true);trySet("nxForm","useFieldClass",true);trySet("nxForm","useFieldDisable",true);};function nxForm(){};nxForm.prototype=new nxNode;nxForm.superClass=nxNode.prototype;nxAddProperty({"constructor":nxForm.prototype,"name":"enabled","type":"boolean"});nxForm.prototype.preInit=function(data){nxForm.superClass.preInit.call(this,data);this.elementNodes=[];};nxForm.prototype.objectInit=function(data){var n=data.node;var t=this.config.get("tags");for(var i=0;i<t.length;i++){e=n.getElementsByTagName(t[i]);for(var j=0;j<e.length;j++){this.elementNodes.push(e[j]);};};nxForm.superClass.objectInit.call(this,data);};nxForm.prototype.modifyEnabled=function(value){if(this.config.get("useFormClass")==true){var c=this.getClass();c=c.removeElement("enabled");c=c.removeElement("disabled");c=c.addElement(value?"enabled":"disabled");this.setClass(c);};if(this.config.get("useFormHide")==true){this.setDisplay(value?"block":"none");};var v;var c=value?"enabled":"disabled";var d=this.config.get("useFieldClass");var e=this.config.get("useFieldDisable");for(var i=0;i<this.elementNodes.length;i++){if(nxValid(this.elementNodes[i].getAttribute("nx"))){continue;};if(d){v=__node__.getClass(this.elementNodes[i]);v=v.removeElement("disabled");v=v.removeElement("enabled");v=v.addElement(c);__node__.setClass(this.elementNodes[i],v);};if(e){this.elementNodes[i].disabled=!value;};};return true;};
/* GO AWAY!!! NOW!!! DON'T CHANGE THIS GENERATED FILE!!! CHANGES WILL BE LOST!!! */
function nxSelect(){};nxSelect.prototype=new nxFormElement;nxSelect.superClass=nxFormElement.prototype;nxAddProperty({"constructor":nxSelect.prototype,"name":"selection","type":"string"});nxSelect.prototype.objectInit=function(id,node){nxSelect.superClass.objectInit.call(this,id,node);this.addNodeEvent("change","eval");};nxSelect.prototype.eval=function(e){this.setSelection(this.evalSelection(),[]);};nxSelect.prototype.modifySelection=function(value){this.node.value=value;return true;};nxSelect.prototype.evalSelection=function(){return this.node.options[this.node.selectedIndex].value;};
/* GO AWAY!!! NOW!!! DON'T CHANGE THIS GENERATED FILE!!! CHANGES WILL BE LOST!!! */
function nxCheckbox(){};nxCheckbox.prototype=new nxFormElement;nxCheckbox.superClass=nxFormElement.prototype;nxAddProperty({"constructor":nxCheckbox.prototype,"name":"checked","type":"boolean"});nxCheckbox.prototype.objectInit=function(data){nxCheckbox.superClass.objectInit.call(this,data);this.addNodeEvent("click","eval");this.addNodeEvent("focus","blur");};nxCheckbox.prototype.eval=function(){this.setChecked(this.evalChecked(),[],true);};nxCheckbox.prototype.blur=function(){if(this.getNode().blur)this.getNode().blur();};nxCheckbox.prototype.modifyChecked=function(value){this.getNode().checked=value;return true;};nxCheckbox.prototype.evalChecked=function(){var n=this.getNode();var v=n.getAttribute("checked")=="checked"||n.checked?true:false;n.removeAttribute("checked");return v;};
/* GO AWAY!!! NOW!!! DON'T CHANGE THIS GENERATED FILE!!! CHANGES WILL BE LOST!!! */
function nxRadio(){};nxRadio.prototype=new nxFormElement;nxRadio.superClass=nxFormElement.prototype;nxAddProperty({"constructor":nxRadio.prototype,"name":"checked","type":"boolean"});nxRadio.prototype.objectInit=function(data){nxRadio.superClass.objectInit.call(this,data);this.addNodeEvent("click","eval");this.initGroup();};nxRadio.prototype.initGroup=function(){var n=typeof this.config.get("group")!="undefined"?this.config.get("group"):this.node.name;var o=__registry__.get(n);if(!nxValid(o)){var data={};data.config=new nxHash();data.config.set("type","radioGroup");data.config.set("id",n);o=__registry__.add(data);};if(!nxValid(o))
return __core__.error("Radio:Needed RadioGroup doesn't exist!");o.add(this.getId(),this.node.value);};nxRadio.prototype.eval=function(){this.setChecked(this.evalChecked(),[],true);};nxRadio.prototype.blur=function(){if(this.getNode().blur)this.getNode().blur();};nxRadio.prototype.modifyChecked=function(value){this.getNode().checked=value;return true;};nxRadio.prototype.evalChecked=function(){var n=this.getNode();var v=n.getAttribute("checked")=="checked"||n.checked?true:false;n.removeAttribute("checked");return v;};
/* GO AWAY!!! NOW!!! DON'T CHANGE THIS GENERATED FILE!!! CHANGES WILL BE LOST!!! */
function nxRadioGroup(){};nxRadioGroup.prototype=new nxObject;nxRadioGroup.superClass=nxObject.prototype;nxAddProperty({"constructor":nxRadioGroup.prototype,"name":"selection","type":"string"});nxRadioGroup.prototype.objectInit=function(id){this.data=[];nxRadioGroup.superClass.objectInit.call(this,id);};nxRadioGroup.prototype.add=function(id,value){this.data.push([id,value]);__depend__.add({id1:this.getId(),id2:id,prop1:"selection",prop2:"checked",dynamic:function(x){return x?value:null;}});__depend__.add({id1:id,id2:this.getId(),prop1:"checked",prop2:"selection",dynamic:function(x){return x==value?true:false;}});};nxRadioGroup.prototype.modifySelection=function(value){for(var i=0;i<this.data.length;i++){var o=__registry__.get(this.data[i][0]);o.setChecked(o.node.value==value?true:false);};return true;};nxRadioGroup.prototype.evalSelection=function(){var o;for(var i=0;i<this.data.length;i++){o=__registry__.get(this.data[i][0]);if(o==null){return;};if(o.getChecked())
return this.data[i][1];};return "";};
/* GO AWAY!!! NOW!!! DON'T CHANGE THIS GENERATED FILE!!! CHANGES WILL BE LOST!!! */
with(__settings__){trySet("nxInputField","typeCheck",true);};function nxInputField(){};nxInputField.prototype=new nxFormElement;nxInputField.superClass=nxFormElement.prototype;nxAddProperty({"constructor":nxInputField.prototype,"name":"valid","type":"number"});nxInputField.prototype.preInit=function(data){nxInputField.superClass.preInit.call(this,data);var myid=this.getId();var value_to_valid=function(v){return v==""?0:__registry__.get(myid).validate()?1:2;};__depend__.add({"id":this.getId(),"prop1":"valid","prop2":"value","dynamic":value_to_valid});};nxInputField.prototype.objectInit=function(data){nxInputField.superClass.objectInit.call(this,data);this.addEvents();};nxInputField.prototype.postInit=function(data){nxInputField.superClass.postInit.call(this,data);};nxInputField.prototype.addEvents=function(){if(nxValid(this.config.get("jump")))
this.addNodeEvent("keyup","jumpCheck");var v=this.config.get("typeCheck");if(nxValid(v)&&v){var myid=this.getId();this.checker=window.setInterval("__registry__.get('"+myid+"').timeValidate()",50);};};nxInputField.prototype.jumpCheck=function(e){e=nxEvent(e);if(e.keyCode==9||e.keyCode==16)return;var n=this.getNode();var m=nxValid(n.maxlength)?parseInt(n.maxlength):parseInt(n.size);if(parseInt(n.value.length)>=m)
__registry__.get(this.config.get("jump")).focus();};nxInputField.prototype.focus=function(){this.getNode().focus();};nxInputField.prototype.timeValidate=function(e){this.setValue(this.getNode().value);};nxInputField.prototype.validate=function(){var v=this.config.get("validate");if(!nxValid(v)){__core__.error("Inputfield:Invalid Check:Missing Info");return null;};var f=eval("__validate__."+v);if(!nxValid(f)){__core__.error("Inputfield:Invalid Check:Undefined");return null;}
return f(this.getValue());};nxInputField.prototype.modifyValid=function(v){var m=this.config.get("mandatory");this.removeClass("valid");this.removeClass("invalid");if(nxValid(m)&&m)this.removeClass("mandatory");if(v==0){if(nxValid(m)&&m)this.addClass("mandatory");}
else {this.addClass(v==1?"valid":"invalid");};return true;};
