function CheckInputs(){	this.inputs = new Array();		this.push = function(obj) {		this.inputs[this.inputs.length] = obj;	}	this.addElement = function(obj){		this.inputs[this.inputs.length] = obj;	}	this.clear = function(obj){		this.inputs = new Array();	}} var neededinputs = new CheckInputs();var validationForm = null;var validationFormSubmitted = false;function setValidationForm(form) {   validationForm = form;}function getValidationForm() {   if (validationForm == null) {      alert("Validation form has not been set");   }   else {      return validationForm;   }}function submitForm() {   if (!validationFormSubmitted) {      if (validationForm == null) {         alert("Validation form has not been set");      }      else if(validateform()){   	   validationFormSubmitted = true;         validationForm.submit();      }   }}function dosubmit() {	if(!validationFormSubmitted && validateform()) {	   validationFormSubmitted = true;		thisform.submit();	}}function validateform(){	return(validateformItems(neededinputs.inputs));}function submitFormOnChange(selector, submitmethod){	var inputsobjs = $(validationForm).find(selector);	var inputype = null;	var inputname = null;	var tagname = null;	var usesubmitmethod = submitmethod?submitmethod:submitForm;	var jinput = null;	for(var i=0; i<inputsobjs.length; i++)	{		jinput = $(inputsobjs[i]);		inputype = jinput.attr("type");		inputname = jinput.attr("name");		tagname = inputsobjs[i].tagName.toLowerCase();		if(inputype == "text" || tagname == "textarea"){			jinput.keypress(function(event) {				  if (event.keyCode == 10) {					  usesubmitmethod();				   }			});			if(inputname.indexOf("Date")<0){				jinput.blur(function(event) {					usesubmitmethod();				});			}			if(inputype == "text"){				jinput.keypress(function(event) {					  if (event.keyCode == 13) {						  usesubmitmethod();					   }				});			}		}else if(inputype == "checkbox" || inputype == "radio"){			jinput.click(function(event) {				usesubmitmethod();			});		}else if(tagname == "select" || (typeof inputype != 'undefined' && inputype.indexOf("select")==0)){			jinput.change(function(event) {				usesubmitmethod();			});		}	}}
