function resetCount(textArea,counterField,maxLength)
{
   counterField.value = maxLength - textArea.value.length;
}
function countCharacters(textArea, counterField, maxLength)
{		
   if(textArea !=null && textArea.value != null) {

      if (textArea.value.length > maxLength){
         alert("Text may not exceed " +  maxLength +" characters in length.");
         textArea.value = textArea.value.substring( 0, maxLength);
         //alert(textArea.value);
      } else {
         counterField.value = maxLength - textArea.value.length;
      }
   }
}
function Checkifcount()
{
   if ( window.SetCharCount )
   {
      SetCharCount()
   }
}