//Limited text handler object

function LimitText(inputID, displayID){
	this.textLimit = 250;
	this.inputID = inputID;
	this.displayID = displayID;
}

LimitText.prototype.checkText = function(key){
	var textValue = $("#" + this.inputID).val();
	var lengthOk = false;
	if(textValue.length < this.textLimit || key == 8 || key == 0){
		$("#" + this.displayID).html(textValue.length + "/" + this.textLimit);
		lengthOk = true;
	}
	return lengthOk;
}

LimitText.prototype.setCount = function(){
	$("#" + this.displayID).html($("#" + this.inputID).val().length + "/" + this.textLimit);
}
