

//restrict number of characxters in textarea field
function textCounter(field, countfield, maxlimit) {
	if (field.value.length > maxlimit) {// if too long...trim it!
		field.value = field.value.substring(0, maxlimit);
		alert("Maxlength is " +maxlimit + " characters");
		// otherwise, update 'characters left counter
	}else { 
		countfield.value = maxlimit - field.value.length;
		
	}
}
