return false; } else if (obj_type == "SINGLE_VALUE_RADIO" || obj_type == "SINGLE_VALUE_CHECKBOX") { if (obj.checked) return true; else return false; } else if (obj_type == "RADIO" || obj_type == "CHECKBOX") { for (i=0; i < obj.length; i++) { if (obj[i].checked) return true; } return false; } } function _CF_checkinteger(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 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_checkcreditcard(object_value) { var white_space = " -"; var creditcard_string=""; var check_char; if (object_value.length == 0) return true; // squish out the white space for (var i = 0; i < object_value.length; i++) { check_char = white_space.indexOf(object_value.charAt(i)) if (check_char < 0) creditcard_string += object_value.substring(i, (i + 1)); } // if all white space return error if (creditcard_string.length == 0) return false; // make sure number is a valid integer if (creditcard_string.charAt(0) == "+") return false; if (!_CF_checkinteger(creditcard_string)) return false; // now check mod10 var doubledigit = creditcard_string.length % 2 == 1 ? false : true; var checkdigit = 0; var tempdigit; for (var i = 0; i < creditcard_string.length; i++) { tempdigit = eval(creditcard_string.charAt(i)) if (doubledigit) { tempdigit *= 2; checkdigit += (tempdigit % 10); if ((tempdigit / 10) >= 1.0) { checkdigit++; } doubledigit = false; } else { checkdigit += tempdigit; doubledigit = true; } } return (checkdigit % 10) == 0 ? true : false; } function _CF_checkregistration(_CF_this) { if (!_CF_hasValue(_CF_this.fname, "TEXT" )) { if (!_CF_onError(_CF_this, _CF_this.fname, _CF_this.fname.value, "Please enter your First Name")) { return false; } } if (!_CF_hasValue(_CF_this.lname, "TEXT" )) { if (!_CF_onError(_CF_this, _CF_this.lname, _CF_this.lname.value, "Please enter your Last Name")) { return false; } } if (!_CF_hasValue(_CF_this.title, "TEXT" )) { if (!_CF_onError(_CF_this, _CF_this.title, _CF_this.title.value, "Please enter your Title")) { return false; } } if (!_CF_hasValue(_CF_this.company, "TEXT" )) { if (!_CF_onError(_CF_this, _CF_this.company, _CF_this.company.value, "PLease enter your Company")) { return false; } } if (!_CF_hasValue(_CF_this.add1, "TEXT" )) { if (!_CF_onError(_CF_this, _CF_this.add1, _CF_this.add1.value, "Please enter your Address")) { return false; } } if (!_CF_hasValue(_CF_this.city, "TEXT" )) { if (!_CF_onError(_CF_this, _CF_this.city, _CF_this.city.value, "Please enter your City")) { return false; } } if (!_CF_hasValue(_CF_this.phone, "TEXT" )) { if (!_CF_onError(_CF_this, _CF_this.phone, _CF_this.phone.value, "Please enter your phone number")) { return false; } } if (!_CF_hasValue(_CF_this.fax, "TEXT" )) { if (!_CF_onError(_CF_this, _CF_this.fax, _CF_this.fax.value, "Please enter your fax number")) { return false; } } if (!_CF_hasValue(_CF_this.reg, "RADIO" )) { if (!_CF_onError(_CF_this, _CF_this.reg, _CF_this.reg.value, "Please select Registration type")) { return false; } } if (!_CF_hasValue(_CF_this.ccard, "RADIO" )) { if (!_CF_onError(_CF_this, _CF_this.ccard, _CF_this.ccard.value, "Please select Credit Card Type")) { return false; } } if (!_CF_hasValue(_CF_this.ccnumber, "TEXT" )) { if (!_CF_onError(_CF_this, _CF_this.ccnumber, _CF_this.ccnumber.value, "Please enter valid credit card number without spaces or dashes!")) { return false; } } if (!_CF_checkcreditcard(_CF_this.ccnumber.value)) { if (!_CF_onError(_CF_this, _CF_this.ccnumber, _CF_this.ccnumber.value, "Please enter valid credit card number without spaces or dashes!")) { return false; } } if (!_CF_hasValue(_CF_this.EXPDATE, "TEXT" )) { if (!_CF_onError(_CF_this, _CF_this.EXPDATE, _CF_this.EXPDATE.value, "Please enter Credit Card Expiration date")) { return false; } } if (!_CF_hasValue(_CF_this.ccname, "TEXT" )) { if (!_CF_onError(_CF_this, _CF_this.ccname, _CF_this.ccname.value, "Please enter Name as it Appears on Card")) { return false; } } return validate(_CF_this) return true; } //-->
|
Integrated
Nanosystems - Design, Synthesis & Applications Conference Registration
Form |
| All fields with * are required. |