var Validator=function(a){this.formName=a;this.errMsg=new Array();this.required=function(b,d){var c=document.forms[this.formName].elements[b];if(typeof(c)=="undefined"||Utils.trim(c.value)==""){this.addErrorMsg(d)}};this.isEmail=function(b,e,d){var c=document.forms[this.formName].elements[b];c.value=Utils.trim(c.value);if(!d&&c.value==""){return}if(!Utils.isEmail(c.value)){this.addErrorMsg(e)}};this.eqaul=function(b,f,e){var c=document.forms[this.formName].elements[b];var d=document.forms[this.formName].elements[f];if(c!=null&&d!=null){if(c.value==""||c.value!=d.value){this.addErrorMsg(e)}}};this.gt=function(b,f,e){var c=document.forms[this.formName].elements[b];var d=document.forms[this.formName].elements[f];if(c!=null&&d!=null){if(c.value<=d.value){this.addErrorMsg(e)}}};this.isNumber=function(b,e,d){var c=document.forms[this.formName].elements[b];c.value=Utils.trim(c.value);if(c.value==""&&!d){return}else{if(!Utils.isNumber(c.value)){this.addErrorMsg(e)}}};this.isInt=function(b,e,d){var c=document.forms[this.formName].elements[b];c.value=Utils.trim(c.value);if(c.value==""&&!d){return}else{if(!Utils.isInt(c.value)){this.addErrorMsg(e)}}};this.isNullOption=function(b,d){var c=document.forms[this.formName].elements[b];c.value=Utils.trim(c.value);if(c.value>"0"){return}else{this.addErrorMsg(d)}};this.isTime=function(b,e,d){var c=document.forms[this.formName].elements[b];c.value=Utils.trim(c.value);if(c.value==""&&!d){return}else{if(!Utils.isTime(c.value)){this.addErrorMsg(e)}}};this.requiredCheckbox=function(b,f){var e=document.forms[this.formName].elements[controlId];var d=false;for(var c=0;c<objects.length;c++){if(objects[c].type.toLowerCase()!="checkbox"){continue}if(objects[c].checked){d=true;break}}if(!d){this.addErrorMsg(f)}};this.passed=function(){if(this.errMsg.length>0){var b="";for(i=0;i<this.errMsg.length;i++){b+="- "+this.errMsg[i]+"\n"}alert(b);return false}else{return true}};this.addErrorMsg=function(b){this.errMsg.push(b)}};function showNotice(a){var b=document.getElementById(a);if(b){if(b.style.display!="block"){b.style.display="block"}else{b.style.display="none"}}}function addItem(d,e){for(var a=0;a<d.length;a++){var b=d.options[a];if(b.selected&&b.value!=""){var c=b.cloneNode(true);c.className="";e.appendChild(c)}}d.selectedIndex=-1}function delItem(b){for(var a=b.length-1;a>=0;a--){var c=b.options[a];if(c.selected){b.options[a]=null}}}function joinItem(a){var c=new Array();for(var b=0;b<a.length;b++){c[c.length]=a.options[b].text+"|"+a.options[b].value}return c.join(",")}function joinItemValue(a){var c=new Array();for(var b=0;b<a.length;b++){c[c.length]=a.options[b].value}return c.join(",")};
