﻿// JScript File
function ShowChrs(txtArea, txtLimit)
{
	var maxchars = 2000;
	//Return number of characters remaining
	TypedText = document.getElementById(txtArea);
	Chars = document.getElementById(txtLimit);
	var tCount = TypedText.value.length;
	Chars.value = Math.max((maxchars - tCount),0);
	//Prevent over-spill.  Maxlength doesn't work on multiline
	//textboxes, possibly as they are output as text areas.
	if(tCount > maxchars)
 {
  TypedText.value = TypedText.value.substring(0,maxchars);
  alert('Maximum text reached');
 }
}