function enforceTextAreaMaxLen() {
$('textarea[maxlength]').keyup(function () {
var textbox = $(this);
var maxlength = textbox.attr('maxlength');
if (maxlength != undefined) {
var x = parseInt(maxlength);
var s = textbox.val();
if (s != null && s.length > x) {
textbox.val(s.substring(0, x));
}
}
});
}