$(document).ready(function() {
	$("textarea#comment").keypress(function() {
		var maxlength = 500;
		var nowlength = $("textarea#comment").val().length;
		
		if (nowlength>maxlength) {
			$("textarea#comment").val($("textarea#comment").val().substr(0, maxlength));
		}
	});
});