function isNumber(value)
{
  var a = new String;
  a = value
  for (i = 0; i < a.length; i++) {
    if (a.charAt(i) > '9' || a.charAt(i) < '0') return false;
  }
  
  return true;
} // end isNumber()

function charCount(value)
{
  var a = new String;
  a = value;
  
  return a.length;
} // end charCount()

function trim(inputString) {
   if (typeof inputString != "string") { return inputString; }
   var retValue = inputString;
   var ch = retValue.substring(0, 1);
   while (ch == " ") { // Check for spaces at the beginning of the string
      retValue = retValue.substring(1, retValue.length);
      ch = retValue.substring(0, 1);
   }
   ch = retValue.substring(retValue.length-1, retValue.length);
   while (ch == " ") { // Check for spaces at the end of the string
      retValue = retValue.substring(0, retValue.length-1);
      ch = retValue.substring(retValue.length-1, retValue.length);
   }

   return retValue;
}

