//------------------------------ CLASE NumericValidator-------------------------/

NumericValidator = function ( nombre, maximo, minimo) {
	this.Validator = Validator;
	this.maximo = maximo;
	this.minimo = minimo;
	this.Validator(nombre);
	this.nombre=nombre;
	this.mensaje = '(El número debe estar entre '+(minimo)+' y '+(maximo)+')';
}

NumericValidator.prototype = new Validator();
NumericValidator.prototype.validateOld = NumericValidator.prototype.validate

NumericValidator.prototype.validate = function () {
	var valor=document.getElementById(this.nombre).value;
	if (isNumeric(valor.toString())) {
		if (parseFloat(this.maximo)>parseFloat(this.minimo)) {
			if ((parseFloat(valor) >= parseFloat(this.minimo)) && (parseFloat(valor) <= parseFloat(this.maximo)))
			{return true;}
			else
			{return false;}
		}		
		else
			{return true;}
	}
	else
	{return false;}
}

NumericValidator.prototype.getMensaje = function () {
	if(this.maximo && this.minimo) {
		return this.mensaje;
	}
	else {
		return '';
	}
}
