if (object_value.length == 0) return true; //Returns true if value is an integer defined as // having an optional leading + or -. // otherwise containing only the characters 0-9. var decimal_format = "."; var check_char; //The first character can be + - blank or a digit. check_char = object_value.indexOf(decimal_format) //Was it a decimal? if (check_char < 1) return _CF_checknumber(object_value); else return false; } function _CF_checknumber(object_value) { //Returns true if value is a number or is NULL //otherwise returns false if (object_value.length == 0) return true; //Returns true if value is a number defined as // having an optional leading + or -. // having at most 1 decimal point. // otherwise containing only the characters 0-9. var start_format = " .+-0123456789"; var number_format = " .0123456789"; var check_char; var decimal = false; var trailing_blank = false; var digits = false; //The first character can be + - . blank or a digit. check_char = start_format.indexOf(object_value.charAt(0)) //Was it a decimal? if (check_char == 1) decimal = true; else if (check_char < 1) return false; //Remaining characters can be only . or a digit, but only one decimal. for (var i = 1; i < object_value.length; i++) { check_char = number_format.indexOf(object_value.charAt(i)) if (check_char < 0) return false; else if (check_char == 1) { if (decimal) // Second decimal. return false; else decimal = true; } else if (check_char == 0) { if (decimal || digits) trailing_blank = true; // ignore leading blanks } else if (trailing_blank) return false; else digits = true; } //All tests passed, so... return true } function _CF_checkCFForm_1(_CF_this) { if (!_CF_checkinteger(_CF_this.reg_alta.value)) { if (!_CF_onError(_CF_this, _CF_this.reg_alta, _CF_this.reg_alta.value, "Please enter only a single digit.")) { return false; } } if (!_CF_checkinteger(_CF_this.Newsletter.value)) { if (!_CF_onError(_CF_this, _CF_this.Newsletter, _CF_this.Newsletter.value, "Please enter only a single digit.")) { return false; } } if (!_CF_checkinteger(_CF_this.book.value)) { if (!_CF_onError(_CF_this, _CF_this.book, _CF_this.book.value, "Please enter only a single digit.")) { return false; } } if (!_CF_checkinteger(_CF_this.preconference.value)) { if (!_CF_onError(_CF_this, _CF_this.preconference, _CF_this.preconference.value, "Please enter only a single digit.")) { return false; } } if (!_CF_checkinteger(_CF_this.regional.value)) { if (!_CF_onError(_CF_this, _CF_this.regional, _CF_this.regional.value, "Please enter only a single digit.")) { return false; } } if (!_CF_checkinteger(_CF_this.state_assoc.value)) { if (!_CF_onError(_CF_this, _CF_this.state_assoc, _CF_this.state_assoc.value, "Please enter only a single digit.")) { return false; } } if (!_CF_checkinteger(_CF_this.etraining.value)) { if (!_CF_onError(_CF_this, _CF_this.etraining, _CF_this.etraining.value, "Please enter only a single digit.")) { return false; } } if (!_CF_checkinteger(_CF_this.at_your_l.value)) { if (!_CF_onError(_CF_this, _CF_this.at_your_l, _CF_this.at_your_l.value, "Please enter only a single digit.")) { return false; } } if (!_CF_checkinteger(_CF_this.distance.value)) { if (!_CF_onError(_CF_this, _CF_this.distance, _CF_this.distance.value, "Please enter only a single digit.")) { return false; } } return true; } //-->
ALTA IS YOUR ORGANIZATION WITHIN THE AMERICAN LIBRARY ASSOCIATION
We provide information, training, and programs for library trustees and advocates. So that we may serve you better, please take a few minutes to fill out and submit this survey.