var maxLength; maxLength = 2000; 
	function setCharsLeft(){ 
		document.commentForm.frmCharsLeft.value = maxLength; 
	} 
function charsLeft(){ 
	var myForm, comment, returnValue; 
		myForm = document.commentForm; 
		commentLength = myForm.frmComment.value.length; 
			if(commentLength > maxLength) { 
		myForm.frmComment.value = myForm.frmComment.value.substring(0,maxLength); 
		myForm.frmComment.blur(); 
		errorMessage = "Maximum number of allowed characters (" + maxLength + ") has been reached"; 
		alert(errorMessage); returnValue = false; 
	} else { 
		returnValue = true; 
	} 
myForm.frmCharsLeft.value = maxLength - commentLength; 
} 