//FormElement Class, used to enable/disable or set to readonly
//Need a readonly style in your css
function FormElement(elementId) {
	
	var self = this;
	
	this.element = $("#" + elementId);
	
	this.disable = function () {
		this.element.attr("disabled", "disabled");
	}
	
	this.enable = function () {
		this.element.removeAttr("disabled");
	}
	
	this.readOnly = function (value) {
		if (value) {
			this.element.attr("readonly", true);
			this.element.addClass("readonly");
		} else {
			this.element.removeAttr("readonly");
			this.element.removeClass("readonly");
		}
	}
}


