function FrontendTextareaMaxLength( id , maxlength ) {
	$("#"+id).data( "maxlength" , maxlength );
	$("#"+id).keypress( function() { FrontendTextareaLimitLength( id , maxlength ) } );
}

function FrontendTextareaLimitLength( id , maxlength ) {
	var v = $("#"+id).val();
	if (v.length<=maxlength) return;
	v = v.substr( 0 , maxlength );
	$("#"+id).val( v );
}
