function check_numeric (x) { if (x.value == "") return true; if (parseInt(x.value) != x.value) { x.value=""; x.focus(); return false; } return true; } /* end of function */ function check_alphaNumeric (x){ var regex=/^[0-9a-zA-Z\s]+$/; if(regex.test(x.value)) return true; x.value=""; x.focus(); return false; } /* end of function */