function textarea () {
	var maximos = new Array ();
	$("textarea").attr("maxlength", function (i) {
		if (maximos[i] = this.getAttribute('maxlength')) {
			$(this).keypress(function(event) {
				return ((event.which == 8) || (event.which == 9) || (this.value.length < maximos[i]));
			});
		}
	});
}

$(document).ready(function() {
	textarea();
});
