function INPUTFIELD(parent, input){
	
	this.id = undefined; //input id
	this.name = undefined; //input name
	this.type = "text"; //text, password, select
	this.required = "no"; //yes, no
	this.errors = new Array();
	this.errors_container = undefined; //TD object where errors are alerted;
	this.validation_type = "normal"; /* date_day, date_year, date, 
										numeric, numeric_extended, 
										alphanumeric, alphanumeric_extended,
										alpha, alpha_extended,
										oldpassword, password, retypepassword,
										email, emails, normal(no validation),
										float, integer -> for keypress and keyup actions
										arhive*/
	this.validation_network_type = "normal"; //client, server, normal
	this.input = input; //input Object
	if (this.input)
		this.input.readOnly = false;
	this.parent = parent; // PARENT Object, etc
	this.form = undefined; //input's form object
	this.error_div = undefined;
	this.data = new String(); //input value
	this.extentedChars = new Array();
	this.docTypes = new Array(); //arhive types like zip, rar, doc, pdf
	this.ajaxF = function(){};
	this.ajaxReturn = false;
	this.submit_ready = true;
	this.submitF = null;
	
	this.decimals = 0; //for float object
	this.negative = false; //for float and integer objects
	this.onkeyupF = function(){};//for float and integer objects
	this.onblurF = function(){};//for float and integer objects, or others
	this.afterBlurF = function(){};//for float and integer objects, or others
	this.beforeBlurF = function(){};//for float and integer objects, or others
	
	this.runOnBlurF = "none"; //after, before, none
	this.maxval = Infinity; //for float and integer objects (onkeypress)
	this.minval = - Infinity; //for float and integer objects (onkeypress)
	
	
	this.setId = _inputField_setId;
	this.setName = _inputField_setName;
	this.setInput = _inputField_setInput;
	this.setForm = _inputField_setForm;
	this.addErrors = _inputField_addErrors;
	this.setErrorsContainer = _inputField_setErrorsContainer;
	this.displayError = _inputField_displayError;
	this.hideError = _inputField_hideError;
	this.setType = _inputField_setInputType;
	this.setValidationType = _inputField_setValidationType;
	this.setValidationNetworkType = _inputField_setValidationNetworkType;
	this.setAJAXFunction = _inputField_setAJAXFunction;
	this.setOnKeyUpFunction = _inputField_setOnKeyUpFunction;
	this.setAfterBlurFunction = _inputField_setAfterBlurFunction;
	this.setBeforeBlurFunction = _inputField_setBeforeBlurFunction;
	this.setOnBlurFunction = _inputField_setOnBlurFunction;
	this.setRequired = _inputField_setRequired;
	this.addData = _inputField_addData;
	this.resetData = _inputField_resetData;
	this.removeData = _inputField_removeData;
	this.addExtendedChars = _inputField_addExtendedChars;
	this.addDocTypes = _inputField_addDocTypes;
	this.setReadySubmit = _inputField_setReadySubmit;
	this.setSubmitFunction = _inputField_setSubmitFunction;
	this.initActions = _inputField_initActions;

}

function _inputField_setId(Id){
	this.id = Id;
}

function _inputField_setName(Name){
	this.name = Name;
}

function _inputField_setInputType(InputType){
	this.type = InputType;	
}

function _inputField_setInput(InputObj){
	this.input = InputObj;
}

function _inputField_setForm(FormObj){
	this.form = FormObj;	
}

function _inputField_addErrors(ErrorsArray){
	for (var i=0; i<ErrorsArray.length; i++){
		this.errors.push(ErrorsArray[i]);
	}
}

function _inputField_setErrorsContainer(ContainerObj){
	this.errors_container = (this.parent.DOMDoc.getElementById(ContainerObj) != null) ? this.parent.DOMDoc.getElementById(ContainerObj) : null;
}

function _inputField_displayError(Error){
	if (this.errors_container){
		$('#'+this.errors_container.id+' p.error_text',this.parent.DOMDoc).remove();
		$('#'+this.errors_container.id,this.parent.DOMDoc).append("<p class='error_text'>"+ Error +"</p>");
	}
	
}

function _inputField_hideError(){
	if (this.errors_container){
		$('#'+this.errors_container.id+' p.error_text',this.parent.DOMDoc).remove();
	}
}

function _inputField_setValidationType(ValidType){
	this.validation_type = ValidType;
}

function _inputField_setValidationNetworkType(NetworkType){
	this.validation_network_type = NetworkType;
}

function _inputField_setRequired(RequiredType){
	this.required = RequiredType;
}

function _inputField_addData(Data){
	this.data = Data;
}

function _inputField_resetData(){
	this.data = "";
	this.input.value = "";
	if (this.required == "yes"){
		this.setReadySubmit(false);	
		
		if (this.input.type == "radio"){
			this.setReadySubmit(true);		
		}
	}
	else{
		this.setReadySubmit(true);		
	}
	this.hideError();
}

function _inputField_removeData(){
	this.data = "";
	this.input.value = "";
}

function _inputField_addExtendedChars(charsArray){
	for (var i=0; i<charsArray.length; i++){
		this.extentedChars.push(charsArray[i]);
	}
}

function _inputField_addDocTypes(typesArray){
	for (var i=0; i<typesArray.length; i++){
		this.docTypes.push(typesArray[i]);
	}
}

function _inputField_setReadySubmit(bool){
	this.submit_ready = bool;
}

function _inputField_setSubmitFunction(innerFunction){
	this.submitF = innerFunction;
}

function _inputField_initActions(){
	this.input.JSObject = this;
	
	if (this.validation_type != "float" && this.validation_type != "integer" && this.validation_type != "pagination"){
		this.input.onkeypress = _inputField_onKeyPress;
		this.input.onblur = _inputField_onKeyBlur;
	}
	else{
		this.input.onkeypress = _inputField_onKeyPress;
		this.input.onkeyup = _inputField_onKeyUp;
		this.input.onblur = _inputField_onKeyBlur;
	}
}



function _inputField_onKeyBlur(){
	//daca trebuie executata o functie inainte de 'onblur'
	if (this.JSObject.runOnBlurF == "before"){
		this.JSObject.onblurF();
	}
	this.JSObject.beforeBlurF();
	
	switch (this.JSObject.validation_type){
		
		case "normal":
			this.JSObject.addData(this.value);
						
			
			if (this.JSObject.required == "no"){
				this.JSObject.setReadySubmit(true);
			}
			else if	(this.JSObject.required == "yes" && this.JSObject.data.length !=0){
				this.JSObject.hideError();
				this.JSObject.setReadySubmit(true);
			}
		
			
			if (this.JSObject.data.length == 0){
				this.JSObject.hideError();
					
				if (this.JSObject.required == "yes"){
					this.JSObject.setReadySubmit(false);
				}
				else{
					this.JSObject.hideError();
					this.JSObject.setReadySubmit(true);
				}
			}
			
			break;	
		
		
		case "alpha_extended":
			this.JSObject.addData(this.value);
			var valid = this.JSObject.data.isAlphaExtended(this.JSObject.extentedChars);
			
			if (valid==false){
				this.JSObject.displayError(this.JSObject.errors[1]);
				this.JSObject.setReadySubmit(false);
			}
			else{
				this.JSObject.setReadySubmit(true);
				
				//AJAX Validation
				if (this.JSObject.validation_network_type == "server" && this.JSObject.data.length > 0){
					this.JSObject.hideError();
					this.JSObject.ajaxF();
					
				}
				else{ 
					this.JSObject.hideError();
					if (this.JSObject.required == "no"){
						this.JSObject.setReadySubmit(true);
					}
					else if	(this.JSObject.required == "yes" && this.JSObject.data.length !=0){
						this.JSObject.setReadySubmit(true);
					}
				}
			}
			
			if (this.JSObject.data.length == 0){
				if (this.JSObject.required == "yes"){
					this.JSObject.setReadySubmit(false);
				}
				else{
					this.JSObject.hideError();
					this.JSObject.setReadySubmit(true);
				}
			}
			
			break;
		
		
		case "alphanumeric_extended":
			this.JSObject.addData(this.value);

			var valid = this.JSObject.data.isAlphaNumericExtended(this.JSObject.extentedChars);
			
			if (valid==false){
				this.JSObject.displayError(this.JSObject.errors[1]);
				this.JSObject.setReadySubmit(false);
			}
			else{
				
				this.JSObject.setReadySubmit(true);
				
				//AJAX Validation
				if (this.JSObject.validation_network_type == "server" && this.JSObject.data.length > 0){
					this.JSObject.hideError();
					this.JSObject.ajaxF();
					
				}
				else{ 
					this.JSObject.hideError();
					if (this.JSObject.required == "no"){
						this.JSObject.setReadySubmit(true);
					}
					else if	(this.JSObject.required == "yes" && this.JSObject.data.length !=0){
						this.JSObject.setReadySubmit(true);
					}
				}
			}
			//alert("pas 1: "+this.JSObject.submit_ready)		
			if (this.JSObject.data.length == 0){
				if (this.JSObject.required == "yes"){
					this.JSObject.setReadySubmit(false);
				}
				else{
					this.JSObject.hideError();
					this.JSObject.setReadySubmit(true);
				}
			}
			//alert("pas 2: "+this.JSObject.submit_ready)
			
			break;
			
		
		case "alphanumeric":
			this.JSObject.addData(this.value);
			var valid = this.JSObject.data.isAlphaNumeric();
			
			if (valid==false){
				this.JSObject.displayError(this.JSObject.errors[1]);
				this.JSObject.setReadySubmit(false);
			}
			else{
				
				this.JSObject.setReadySubmit(true);
				
				//AJAX Validation
				if (this.JSObject.validation_network_type == "server" && this.JSObject.data.length > 0){
					this.JSObject.hideError();
					this.JSObject.ajaxF();
					
				}
				else{ 
					this.JSObject.hideError();
					if (this.JSObject.required == "no"){
						this.JSObject.setReadySubmit(true);
					}
					else if	(this.JSObject.required == "yes" && this.JSObject.data.length !=0){
						this.JSObject.setReadySubmit(true);
					}
				}
			}
			
			if (this.JSObject.data.length == 0){
				if (this.JSObject.required == "yes"){
					this.JSObject.setReadySubmit(false);
				}
				else{
					this.JSObject.hideError();
					this.JSObject.setReadySubmit(true);
				}
			}
			
			
			break;
			
		
		case "numeric":
			this.JSObject.addData(this.value);
			var valid = this.JSObject.data.isNumeric();
			
			if (valid==false){
				this.JSObject.displayError(this.JSObject.errors[1]);
				this.JSObject.setReadySubmit(false);
			}
			else{
				
				this.JSObject.setReadySubmit(true);
				
				//AJAX Validation
				if (this.JSObject.validation_network_type == "server" && this.JSObject.data.length > 0){
					this.JSObject.hideError();
					this.JSObject.ajaxF();
					
				}
				else{ 
					this.JSObject.hideError();
					if (this.JSObject.required == "no"){
						this.JSObject.setReadySubmit(true);
					}
					else if	(this.JSObject.required == "yes" && this.JSObject.data.length !=0){
						this.JSObject.setReadySubmit(true);
					}
				}
			}
			
			if (this.JSObject.data.length == 0){
				if (this.JSObject.required == "yes"){
					this.JSObject.setReadySubmit(false);
				}
				else{
					this.JSObject.hideError();
					this.JSObject.setReadySubmit(true);
				}
			}
			
			
			break;
		
		
		case "numeric_extended":
			this.JSObject.addData(this.value);
			var valid = this.JSObject.data.isNumericExtended(this.JSObject.extentedChars);
			
			if (valid==false){
				this.JSObject.displayError(this.JSObject.errors[1]);
				this.JSObject.setReadySubmit(false);
			}
			else{
				
				this.JSObject.setReadySubmit(true);
				
				//AJAX Validation
				if (this.JSObject.validation_network_type == "server" && this.JSObject.data.length > 0){
					this.JSObject.hideError();
					this.JSObject.ajaxF();
					
				}
				else{ 
					this.JSObject.hideError();
					if (this.JSObject.required == "no"){
						this.JSObject.setReadySubmit(true);
					}
					else if	(this.JSObject.required == "yes" && this.JSObject.data.length !=0){
						this.JSObject.setReadySubmit(true);
					}
				}
			}
			
			if (this.JSObject.data.length == 0){
				if (this.JSObject.required == "yes"){
					this.JSObject.setReadySubmit(false);
				}
				else{
					this.JSObject.hideError();
					this.JSObject.setReadySubmit(true);
				}
			}
			
			break;
		
		
		case "email":
			this.JSObject.addData(this.value);
			var valid = this.JSObject.data.isEmail();
			
			if (valid==false){
				this.JSObject.displayError(this.JSObject.errors[1]);
				this.JSObject.setReadySubmit(false);
			}
			else{
				
				this.JSObject.setReadySubmit(true);
				
				//AJAX Validation
				if (this.JSObject.validation_network_type == "server" && this.JSObject.data.length > 0){
					this.JSObject.hideError();
					this.JSObject.ajaxF();
					
				}
				else{ 
					this.JSObject.hideError();	
					if (this.JSObject.required == "no"){
						this.JSObject.setReadySubmit(true);
					}
					else if	(this.JSObject.required == "yes" && this.JSObject.data.length !=0){
						this.JSObject.setReadySubmit(true);
					}
				}
			}
			
			if (this.JSObject.data.length == 0){
				if (this.JSObject.required == "yes"){
					this.JSObject.setReadySubmit(false);
				}
				else{
					this.JSObject.hideError();
					this.JSObject.setReadySubmit(true);
				}
			}
			
			break;
			
		case "emails":
			this.JSObject.addData(this.value);
			var valid = true;
			
			var emails = this.JSObject.data.split(/(?:\n)+/);  //split after new line separator(\n)
			for (var i=0; i<emails.length; i++){
				var email = emails[i].replace(/^\s*/,"");   //remove whitespaces before the string
				email = email.replace(/\s*$/,"");			//remove whitespaces after the string
				valid = email.isEmail();
				
				if (valid == false) {
					break;
				}			
			}
			
			if (valid==false){
				this.JSObject.displayError(this.JSObject.errors[1]);
				this.JSObject.setReadySubmit(false);
			}
			else{
				
				this.JSObject.setReadySubmit(true);
				
				//AJAX Validation
				if (this.JSObject.validation_network_type == "server" && this.JSObject.data.length > 0){
					this.JSObject.hideError();
					this.JSObject.ajaxF();
					
				}
				else{ 
					this.JSObject.hideError();	
					if (this.JSObject.required == "no"){
						this.JSObject.setReadySubmit(true);
					}
					else if	(this.JSObject.required == "yes" && this.JSObject.data.length !=0){
						this.JSObject.setReadySubmit(true);
					}
				}
			}
			
			if (this.JSObject.data.length == 0){
				if (this.JSObject.required == "yes"){
					this.JSObject.setReadySubmit(false);
				}
				else{
					this.JSObject.hideError();
					this.JSObject.setReadySubmit(true);
				}
			}
			
			
			break;
			
		
		case "oldpassword":
			this.JSObject.addData(this.value);
			this.JSObject.hideError();
			if (this.JSObject.required == "no"){
				this.JSObject.setReadySubmit(true);
			}
			else if	(this.JSObject.required == "yes" && this.JSObject.data.length !=0){
				this.JSObject.setReadySubmit(true);
			}
			
			
			break;
		
		case "password":
			this.JSObject.addData(this.value);
			
			if ((this.JSObject.data.length > 0 && this.JSObject.data.length < 6) || this.JSObject.data.length > 32){
				this.JSObject.displayError(this.JSObject.errors[1]);
				this.JSObject.setReadySubmit(false);
			}
			else{
				this.JSObject.hideError();	
				if (this.JSObject.required == "no"){
					this.JSObject.setReadySubmit(true);
				}
				else if	(this.JSObject.required == "yes" && this.JSObject.data.length !=0){
					this.JSObject.setReadySubmit(true);
				}
			}
			
			if (this.JSObject.data.length == 0){
				if (this.JSObject.required == "yes"){
					this.JSObject.setReadySubmit(false);
				}
				else{
					this.JSObject.hideError();
					this.JSObject.setReadySubmit(true);
				}
			}
			
			this.JSObject.onblurF();
			
			break;
			
		
		case "retypepassword":
			this.JSObject.addData(this.value);
			
			if ((this.JSObject.parent["_inp_Password"].data != this.JSObject.data || this.JSObject.parent["_inp_Password"].submit_ready == false)){
				this.JSObject.displayError(this.JSObject.errors[1]);
				this.JSObject.setReadySubmit(false);
			}
			else if (this.JSObject.parent["_inp_Password"].submit_ready == true){
				this.JSObject.hideError();	
				if (this.JSObject.required == "no"){
					this.JSObject.setReadySubmit(true);
				}
				else if	(this.JSObject.required == "yes" && this.JSObject.data.length !=0){
					this.JSObject.setReadySubmit(true);
				}
			}
			
			if (this.JSObject.data.length == 0){
				if (this.JSObject.required == "yes"){
					this.JSObject.hideError();
					this.JSObject.setReadySubmit(false);
				}
				else{
					this.JSObject.hideError();
					this.JSObject.setReadySubmit(true);
				}
			}
			
			
			break;
			
			
		case "date":
			this.JSObject.addData(this.value);
			
			if (this.JSObject.data.length == 0){
				var valid = true;	
			}
			else{
				var day  = Number(this.value.split("/")[0]);
				var month = Number(this.value.split("/")[1]);
				var year = Number(this.value.split("/")[2]);
				var valid = this.JSObject.data.isDate(month,day,year);
			}
			
			if (valid==false){
				this.JSObject.displayError(this.JSObject.errors[1]);
				this.JSObject.setReadySubmit(false);
			}
			else{
				this.JSObject.setReadySubmit(true);
				
				//AJAX Validation
				if (this.JSObject.validation_network_type == "server" && this.JSObject.data.length > 0){
					this.JSObject.hideError();
					this.JSObject.ajaxF();
					
				}
				else{ 
					this.JSObject.hideError();	
					if (this.JSObject.required == "no"){
						this.JSObject.setReadySubmit(true);
					}
					else if	(this.JSObject.required == "yes" && this.JSObject.data.length !=0){
						this.JSObject.setReadySubmit(true);
					}
				}
			}
			
			if (this.JSObject.data.length == 0){
				if (this.JSObject.required == "yes"){
					this.JSObject.setReadySubmit(false);
				}
				else{
					this.JSObject.hideError();
					this.JSObject.setReadySubmit(true);
				}
			}
			
			
			break;
			
			
		case "arhive":
			this.JSObject.addData(this.value);
			var valid = this.JSObject.data.isArhive(this.JSObject.docTypes);
			
			if (valid==false){
				this.JSObject.displayError(this.JSObject.errors[1]);
				this.JSObject.setReadySubmit(false);
			}
			else{
				this.JSObject.setReadySubmit(true);
				
				//AJAX Validation
				if (this.JSObject.validation_network_type == "server" && this.JSObject.data.length > 0){
					this.JSObject.hideError();
					this.JSObject.ajaxF();
					
				}
				else{ 
					
					this.JSObject.hideError();
					if (this.JSObject.required == "no"){
						this.JSObject.setReadySubmit(true);
					}
					else if	(this.JSObject.required == "yes" && this.JSObject.data.length !=0){
						this.JSObject.setReadySubmit(true);
					}
				}
			}
			//alert("pas 1: "+this.JSObject.submit_ready)		
			if (this.JSObject.data.length == 0){
				this.JSObject.hideError();
				if (this.JSObject.required == "yes"){
					this.JSObject.setReadySubmit(false);
				}
				else{
					this.JSObject.hideError();
					this.JSObject.setReadySubmit(true);
				}
			}
			
			break;
	
			
		case "float":
			if (this.value.substr(this.value.length-1,1) == '.'){ 
				this.value = parseFloat(this.value);
			}
			this.value = parseFloat(this.value);
			this.JSObject.addData(this.value);
			
			if (isNaN(this.value) == true || this.value == ''){ 
				
				if (this.JSObject.required == "yes"){
					this.value = 0;
					this.JSObject.hideError();
					this.JSObject.setReadySubmit(true);
					
				}
				else{
					this.value = "";
					this.JSObject.hideError();
					this.JSObject.setReadySubmit(true);
				}
				//se apeleaza functia handle pt onblur (functia de calcule)
				this.JSObject.addData(this.value);
			}
			else{
				this.JSObject.hideError();
				this.JSObject.setReadySubmit(true);	
			}
			this.JSObject.onblurF();
			
			break;
			
			
		case "integer":
			this.value = parseFloat(this.value);
			this.JSObject.addData(this.value);
			if (isNaN(this.value) == true || this.value == ''){ 
				if (this.JSObject.required == "yes"){
					this.value = 0;
					this.JSObject.hideError();
					this.JSObject.setReadySubmit(true);
				}
				else{
					this.value = "";
					this.JSObject.hideError();
					this.JSObject.setReadySubmit(true);
				}
				this.JSObject.addData(this.value);
				//se apeleaza functia handle pt onblur (functia de calcule)
				
			}
			else{
				this.JSObject.hideError();
				this.JSObject.setReadySubmit(true);	
			}
			this.JSObject.onblurF();
			
			break;
			
			
		case "pagination":
			this.value = parseFloat(this.value);
			this.JSObject.addData(this.value);
			if (isNaN(this.value) == true || this.value == ''){ 
				this.value = 0;
				this.JSObject.addData(this.value);
				//se apeleaza functia handle pt onblur (functia de calcule)
				
			}
			//this.JSObject.onblurF();
			
			break;
			
		
			
		default:
			break;
	}
	
	
	//daca trebuie executata o functie dupa de 'onblur'
	if (this.JSObject.runOnBlurF == "after"){
		this.JSObject.onblurF();
	}
	
	this.JSObject.afterBlurF();
	
}


function _inputField_onKeyPress(evt){
	
	//alert(this.JSObject.parent.DOMDoc.window)
	
	if (this.JSObject.parent.DOMDoc.parentWindow){
		var Code = this.JSObject.parent.DOMDoc.parentWindow.event.keyCode;
		var Event = this.JSObject.parent.DOMDoc.parentWindow.event;
	}
	else{
		var Code = evt.charCode || evt.which;	
		var Event = evt;
	}
	//alert(Code)	
	if (Code == 27){ 
		this.blur();
		Event.returnValue = false;
		return false;
	}
	
	if (Code == 13){
		if (this.JSObject.submitF){
			this.JSObject.addData(this.value);
			this.JSObject.submitF();
		}
		//Event.returnValue = false;
		//return false;
	}
	
	//alert(Code)
	
	switch (this.JSObject.validation_type){
		
		case "integer":
			
			if (this.JSObject.negative == false){
				if ((Code < 48 || Code > 57) && Code != 8 && Code != 0) return false;
			}
			else{
				if (Code != 45 && Code != 8 && Code != 0 && (Code < 48 || Code > 57)) return false;
				//pentru minus
				if (Code == 45){
					if (this.value != "" && this.value != '0')	{
						return false;	
					}
				}
			}
			
			//testez daca numarul introdus este mai mic decat MAXVALUE si mai mare decat MINVALUE
			var charC = "";
			switch (Code){
				case 48: charC +=0; break;
				case 49: charC +=1; break;
				case 50: charC +=2; break;
				case 51: charC +=3; break;
				case 52: charC +=4; break;
				case 53: charC +=5; break;
				case 54: charC +=6; break;
				case 55: charC +=7; break;
				case 56: charC +=8; break;
				case 57: charC +=9; break;
			}
			var currentValue = parseInt(this.value + charC);
			if (currentValue > this.JSObject.maxval) return false;
			if (currentValue < this.JSObject.minval) return false;
			
			if (this.value == "0") this.value = "";
			break;
			
		case "float":
			
			if (this.JSObject.negative == false){
				if (Code != 46 && Code != 8 && Code != 0 && (Code < 48 || Code > 57)) return false;
				if (Code == 46){
					if (isNaN(this.value+".")){
						return false;
					}
				}
				
				if (this.value.indexOf('.') != -1){
					var decimal = this.value.substring(this.value.indexOf('.')+1,this.value.length);
				}
				else decimal = '';

				if (decimal.length >= this.JSObject.decimals && Code != 0 && Code != 8) return false;
				if (Code != 46 && this.value == '0') this.value = '';
				
			}
			else{
				if (Code != 45 && Code != 46 && Code != 8 && Code != 0 && (Code < 48 || Code > 57)) return false;
				//pentru punctul zecimal
				if (Code == 46){
					if (isNaN(this.value+".")){
						return false;
					}
				}
				//pentru minus
				if (Code == 45){
					if (this.value != "" && this.value != '0')	{
						return false;	
					}
				}
				if (this.value.indexOf('.') != -1){
					var decimal = this.value.substring(this.value.indexOf('.')+1,this.value.length);
				}
				else decimal = '';
				if (decimal.length >= this.JSObject.decimals && Code != 0 && Code != 8) return false;
				if (Code != 46 && this.value == '0') this.value = '';	
			}
			
			//testez daca numarul introdus este mai mic decat MAXVALUE si mai mare decat MINVALUE
			var charC = "";
			switch (Code){
				case 48: charC +=0; break;
				case 49: charC +=1; break;
				case 50: charC +=2; break;
				case 51: charC +=3; break;
				case 52: charC +=4; break;
				case 53: charC +=5; break;
				case 54: charC +=6; break;
				case 55: charC +=7; break;
				case 56: charC +=8; break;
				case 57: charC +=9; break;
			}
			var currentValue = parseFloat(this.value + charC);
			if (currentValue > this.JSObject.maxval) return false;
			if (currentValue < this.JSObject.minval) return false;
			
			break;
		default: break;
	}
}

function _inputField_onKeyUp(event){
	this.JSObject.onkeyupF(event);	
}


function _inputField_setOnKeyUpFunction(innerFunction){
	this.onkeyupF = innerFunction;
}

function _inputField_setOnBlurFunction(innerFunction){
	this.onblurF = innerFunction;
}

function _inputField_setAfterBlurFunction(innerFunction){
	this.afterBlurF = innerFunction;
}

function _inputField_setBeforeBlurFunction(innerFunction){
	this.beforeBlurF = innerFunction;
}

function _inputField_setAJAXFunction(innerFunction){
	this.ajaxF = innerFunction;
	this.ajaxReturn = true;
}