function textareaCharacterLimit(fieldToLimit,maxChars,spanID)
{
   var txtArea = document.getElementById(fieldToLimit)
   var strTemp = "";
    if (txtArea.value.length > maxChars)
    {
		alert("Sorry, you may only enter up to " + maxChars + " characters, including letters, numbers and underscores into this text field.  The counter will tell you how many characters you have remaining.");
		strTemp = txtArea.value.substring(0, maxChars);
		txtArea.value = strTemp;
    }
   document.getElementById(spanID).innerHTML = maxChars - txtArea.value.length;
}
   

//usage: <TEXTAREA NAME="comments" COLS="40" ROWS="5" ID="comments" onKeyUp="textareaCharacterLimit('comments',100,'charactersRemining');"></TEXTAREA><BR>
//			<SPAN CLASS='textnormal' ID='charactersRemining'>1000</SPAN> Characters Remaining"