

function countChars(oFormEle) {
  var iCharsTyped, iMaxLimit; var sComments;
    iMaxLimit = 1700
    iCharsTyped = 0;
    sComments = '';

if (oFormEle.type.toLowerCase() == 'textarea')  {
  iCharsTyped = oFormEle.value.length;
  if (iCharsTyped > iMaxLimit) {
    alert('LIMIT REACHED FOR CHARACTER COUNT\nYOU CANNOT TYPE IN MORE THAN 1700 CHARACTERS');
    sComments = oFormEle.value.substring(0,Math.min(oFormEle.value.length,iMaxLimit));
	oFormEle.value = sComments;
  } else {
    document.getElementById('showCharsRemaining').innerHTML = (iMaxLimit-iCharsTyped).toString();
  }
} else if (oFormEle.type.toLowerCase() == 'input') {

} else  {

return -1;

}

}


