function textCounter(field,maxChars,spanName) {
    var txtArea = document.getElementById(field)
    if (txtArea.value.length > maxChars) {
		alert("Please shorten your note.\r\nYour note can contain up to " + maxChars + " characters, including letters, numbers and underscores.  Watch the text counter to tell how many characters you have remaining.");
    	txtArea.value = txtArea.value.substring(0, maxChars-2);
    }
	document.getElementById(spanName).innerHTML = maxChars - txtArea.value.length;
}