<!-- Begin
function isNotEmpty(isWhenKeyIn) {
  var thisObj = khGetCurObj();
//  var value = khGetObjValBasedType(thisObj);
//  if (value == null || value == '')
//    return (-1);
  if (!thisObj || thisObj.value == null || thisObj.value == '')
    return (-1);
}

function isLegalChar(isWhenKeyIn) {
  if (isNumeric(isWhenKeyIn) < 0 && isAlphabetic(isWhenKeyIn) < 0)
    return (-1);
}

function isNumeric(isWhenKeyIn) {
  var keyString;
  if (isWhenKeyIn == 'whenKeyIn')
    keyString = khGetCurKey();
  else
    keyString = khGetObjValBasedType(khGetCurObj());
  var kLen = (keyString == null) ? 0 : keyString.length;
  for (var i = 0; i < kLen; i++) {
    var c = keyString.charAt(i);
    if (('0' > c || c > '9') && c != '.')
      return (-1);
  }
}

function isAlphabetic(isWhenKeyIn) {
  var keyString;
  if (isWhenKeyIn == 'whenKeyIn')
    keyString = khGetCurKey();
  else
    keyString = khGetObjValBasedType(khGetCurObj());
  var kLen = (keyString == null) ? 0 : keyString.length;
  for (var i = 0; i < kLen; i++) {
    var c = keyString.charAt(i);
    if (('A' > c || c > 'Z') && ('a' > c || c > 'z') && c != ' ')
      return (-1);
  }
}
//  End -->

