// Javascript function to count the remaining number of characters available in a TextArea box.
// include the following script in your head section:
// <script language="Javascript" src="includes/count_remaining.js" Type="text/javascript"></script>
// on the textarea box include an onKeyUp="countRemaining()" event handler and pass the appropriate values.

	function countRemaining(iMax, oField, sLabel)
		{
		var sNote = new String(oField.value);
		var iLen = new Number(sNote.length);
		if (iLen > iMax)
			{
			var sBlock = new String(oField.value);
			sBlock = sBlock.substr(0, iMax);
			oField.value = sBlock;
			iLen = iMax;
			}
		var iLeft = new Number(iMax - iLen);
		document.getElementById(sLabel).innerHTML = iLeft + ' Characters Left';
		}			
		
