function is_numeric(value) {
  var anum= /(^\d+$)/;
  return (anum.test(value));
}

function is_price(value) {
  var anum= /(^\d+(,|.)\d{2}$)/;
  return (anum.test(value));
}

function is_dirname(value) {
  var anam= /^[\w- ]+$/;
  return (anam.test(value));
}

function is_email(value) {
  var aema= /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i;
  return (aema.test(value));
}

String.prototype.trim= function() {
    return (this.replace(/^\s*/, "").replace(/\s*$/, "") );
}

