function checkLimit(obj,max) {

	if (obj.value.length>max) { 
		obj.value = obj.value.substring(0,max);
		alert('Your comments have reached the maximum limit of ' + max + ' characters.');
	}
	
	showCharCount(obj);
}




function showCharCount(obj) {
		var count = obj.value.length
		var countbox = obj.id
		countbox = countbox+"count"
	if (document.getElementById && document.getElementById(countbox)) {
		document.getElementById(countbox).value = count;
	}
}




