// this function checks whether the form at "/about/manufacturerRequest.asp" is completed// and submits the form ONLY if the required fields are formatted correctly.// it is called when the user clicks the "submit" button.function verify_manufacturer() {var themessage = "PLEASE COMPLETE THE FOLLOWING FIELDS: ";if (document.manufacturer_request.name.value=="") {themessage += "\n\nName";}if (document.manufacturer_request.company.value=="") {themessage += "\n\nCompany";}if (document.manufacturer_request.country.value=="") {themessage += "\n\nCountry";}if (document.manufacturer_request.email.value=="") {themessage += "\n\nE-mail";}if (document.manufacturer_request.product.value=="") {themessage += "\n\nProduct";}if (document.manufacturer_request.manufacturer_name.value=="") {themessage += "\n\nManufacturer Name";}//alert if fields are empty and cancel form submitif (themessage == "You are required to complete the following fields: ") {document.manufacturer_request.submit();}// if variable "themessage" contains a limited valueif (themessage == "PLEASE COMPLETE THE FOLLOWING FIELDS: ") {// submit the formdocument.manufacturer_request.submit();}// otherwise alert and cancel form submitelse {alert(themessage);return false;   }}//---------------------------------------// this function checks whether the form at "/about/contact.asp" is completed// and submits the form ONLY if the required fields are formatted correctly.// it is called when the user clicks the "submit" button.function verify_contact() {var themessage = "PLEASE COMPLETE THE FOLLOWING FIELDS: ";if (WithoutContent(document.rw_contact.name.value)) {themessage += "\n\nName";}if (WithoutContent(document.rw_contact.company.value)) {themessage += "\n\nCompany";}if ((WithoutContent(document.rw_contact.areacode.value)) && (WithoutContent(document.rw_contact.phone1.value)) && (WithoutContent(document.rw_contact.phone2.value))) {themessage += "\n\nPhone (format: XXX XXX XXXX)";}if ((WithoutCheck(document.rw_contact.websearch)) && (WithoutCheck(document.rw_contact.referral)) && (WithoutCheck(document.rw_contact.manurep)) && (WithoutCheck(document.rw_contact.advertisement)) && (WithoutCheck(document.rw_contact.other)) && (WithoutContent(document.rw_contact.manuname.value)) && (WithoutContent(document.rw_contact.publication.value)) && (WithoutContent(document.rw_contact.specify.value))) {themessage += "\n\nHow did you hear about us? (check one)";}if (!(WithoutCheck(document.rw_contact.manurep)) && (WithoutContent(document.rw_contact.manuname.value))) {themessage += "\n\nManufacturer Rep (company)";}if (!(WithoutCheck(document.rw_contact.advertisement)) && (WithoutContent(document.rw_contact.publication.value))) {themessage += "\n\nAdvertisement (publication)";}if (!(WithoutCheck(document.rw_contact.other)) && (WithoutContent(document.rw_contact.specify.value))) {themessage += "\n\nOther (specify)";}if ((WithoutCheck(document.rw_contact.manurep)) && !(WithoutContent(document.rw_contact.manuname.value))) {themessage += "\n\nThe \"Manufacturer Rep\" box must be checked.";}if ((WithoutCheck(document.rw_contact.advertisement)) && !(WithoutContent(document.rw_contact.publication.value))) {themessage += "\n\nThe \"Advertisement\" box must be checked.";}if ((WithoutCheck(document.rw_contact.other)) && !(WithoutContent(document.rw_contact.specify.value))) {themessage += "\n\nThe \"Other\" box must be checked.";}// if variable "themessage" contains a limited valueif (themessage == "PLEASE COMPLETE THE FOLLOWING FIELDS: ") {// submit the formdocument.rw_contact.submit();}// otherwise alert and cancel form submitelse {alert(themessage);return false;   }}// this function checks whether the form at "/demo/download.asp" is completed// and submits the form ONLY if the required fields are formatted correctly.// it is called when the user clicks the "submit" button.function verify_download() {var themessage = "PLEASE COMPLETE THE FOLLOWING FIELDS: ";if (WithoutContent(document.rw_download.company.value)) {themessage += "\n\nCompany";}if (WithoutContent(document.rw_download.name.value)) {themessage += "\n\nName";}if (WithoutContent(document.rw_download.address.value)) {themessage += "\n\nAddress";}if (WithoutContent(document.rw_download.city.value)) {themessage += "\n\nCity";}if (WithoutContent(document.rw_download.state.value)) {themessage += "\n\nState";}if (WithoutContent(document.rw_download.zip.value)) {themessage += "\n\nZip";}if (WithoutContent(document.rw_download.country.value)) {themessage += "\n\nCountry";}if ((WithoutContent(document.rw_download.areacode.value)) && (WithoutContent(document.rw_download.phone1.value)) && (WithoutContent(document.rw_download.phone2.value))) {themessage += "\n\nPhone (format: XXX XXX XXXX)";}if ((WithoutCheck(document.rw_download.websearch)) && (WithoutCheck(document.rw_download.referral)) && (WithoutCheck(document.rw_download.manurep)) && (WithoutCheck(document.rw_download.advertisement)) && (WithoutCheck(document.rw_download.other)) && (WithoutContent(document.rw_download.manuname.value)) && (WithoutContent(document.rw_download.publication.value)) && (WithoutContent(document.rw_download.specify.value))) {themessage += "\n\nHow did you hear about us? (check one)";}if (!(WithoutCheck(document.rw_download.manurep)) && (WithoutContent(document.rw_download.manuname.value))) {themessage += "\n\nManufacturer Rep (company)";}if (!(WithoutCheck(document.rw_download.advertisement)) && (WithoutContent(document.rw_download.publication.value))) {themessage += "\n\nAdvertisement (publication)";}if (!(WithoutCheck(document.rw_download.other)) && (WithoutContent(document.rw_download.specify.value))) {themessage += "\n\nOther (specify)";}if ((WithoutCheck(document.rw_download.manurep)) && !(WithoutContent(document.rw_download.manuname.value))) {themessage += "\n\nThe \"Manufacturer Rep\" box must be checked.";}if ((WithoutCheck(document.rw_download.advertisement)) && !(WithoutContent(document.rw_download.publication.value))) {themessage += "\n\nThe \"Advertisement\" box must be checked.";}if ((WithoutCheck(document.rw_download.other)) && !(WithoutContent(document.rw_download.specify.value))) {themessage += "\n\nThe \"Other\" box must be checked.";}// if variable "themessage" contains a limited valueif (themessage == "PLEASE COMPLETE THE FOLLOWING FIELDS: ") {// submit the formdocument.rw_download.submit();}// otherwise alert and cancel form submitelse {alert(themessage);return false;   }}function verify_download2() {var themessage = "PLEASE COMPLETE THE FOLLOWING FIELDS: ";if (WithoutContent(document.rw_download.first_name.value)) {themessage += "\n\nFirst Name";}if (WithoutContent(document.rw_download.last_name.value)) {themessage += "\n\nLast Name";}if (WithoutContent(document.rw_download.company.value)) {themessage += "\n\nCompany";}if (WithoutContent(document.rw_download.email.value)) {themessage += "\n\nEmail";}if (WithoutContent(document.rw_download.phone.value)) {themessage += "\n\nPhone";}if (WithoutContent(document.rw_download.street.value)) {themessage += "\n\nAddress";}if (WithoutContent(document.rw_download.city.value)) {themessage += "\n\nCity";}if (WithoutContent(document.rw_download.state.value)) {themessage += "\n\nState/Province";}if (WithoutContent(document.rw_download.zip.value)) {themessage += "\n\nZip/Postal Code";}// if variable "themessage" contains a limited valueif (themessage == "PLEASE COMPLETE THE FOLLOWING FIELDS: ") {// submit the formdocument.rw_download.submit();}// otherwise alert and cancel form submitelse {alert(themessage);return false;   }}// this function checks whether the form at "/websites/servicemagic/html/rw_download.htm"// is completed and submits the form ONLY if the required fields are formatted correctly.// it is called when the user clicks the "submit" button.function verify_sm_download() {var themessage = "PLEASE COMPLETE THE FOLLOWING FIELDS: ";if (WithoutContent(document.sm_download.company.value)) {themessage += "\n\nCompany";}if (WithoutContent(document.sm_download.name.value)) {themessage += "\n\nName";}if (WithoutContent(document.sm_download.address.value)) {themessage += "\n\nAddress";}if (WithoutContent(document.sm_download.city.value)) {themessage += "\n\nCity";}if (WithoutContent(document.sm_download.state.value)) {themessage += "\n\nState";}if (WithoutContent(document.sm_download.zip.value)) {themessage += "\n\nZip";}if (WithoutContent(document.sm_download.country.value)) {themessage += "\n\nCountry";}if ((WithoutContent(document.sm_download.areacode.value)) && (WithoutContent(document.sm_download.phone1.value)) && (WithoutContent(document.sm_download.phone2.value))) {themessage += "\n\nPhone (format: XXX XXX XXXX)";}// if variable "themessage" contains a limited valueif (themessage == "PLEASE COMPLETE THE FOLLOWING FIELDS: ") {// submit the formdocument.sm_download.submit();}// otherwise alert and cancel form submitelse {alert(themessage);return false;   }}// this function checks whether the form at "/homeowner/affiliates.asp" is completed// and submits the form ONLY if the required fields are formatted correctly. it is// called when the user clicks the "submit" button.function verify_affiliates() {var themessage = "PLEASE COMPLETE THE FOLLOWING FIELDS: ";if (WithoutContent(document.rw_affiliates.name.value)) {themessage += "\n\nName";}if ((WithoutContent(document.rw_affiliates.areacode.value)) && (WithoutContent(document.rw_affiliates.phone1.value)) && (WithoutContent(document.rw_affiliates.phone2.value))) {themessage += "\n\nPhone (format: XXX XXX XXXX)";}if (WithoutContent(document.rw_affiliates.email.value)) {themessage += "\n\nEmail";}// if variable "themessage" contains a limited valueif (themessage == "PLEASE COMPLETE THE FOLLOWING FIELDS: ") {// submit the formdocument.rw_affiliates.submit();}// otherwise alert and cancel form submitelse {alert(themessage);return false;   }}// this function checks whether the form at "/newsletter/signup.asp" is completed// and submits the form ONLY if the required fields are formatted correctly.// it is called when the user clicks the "submit" button.function verify_signup() {var themessage = "PLEASE COMPLETE THE FOLLOWING FIELDS: ";if (WithoutContent(document.rw_signup.company.value)) {themessage += "\n\nCompany";}if (WithoutContent(document.rw_signup.name.value)) {themessage += "\n\nName";}if (WithoutContent(document.rw_signup.email.value)) {themessage += "\n\nEmail";}if ((WithoutCheck(document.rw_signup.websearch)) && (WithoutCheck(document.rw_signup.referral)) && (WithoutCheck(document.rw_signup.manurep)) && (WithoutCheck(document.rw_signup.advertisement)) && (WithoutCheck(document.rw_signup.other)) && (WithoutContent(document.rw_signup.manuname.value)) && (WithoutContent(document.rw_signup.publication.value)) && (WithoutContent(document.rw_signup.specify.value))) {themessage += "\n\nHow did you hear about us? (check one)";}if (!(WithoutCheck(document.rw_signup.manurep)) && (WithoutContent(document.rw_signup.manuname.value))) {themessage += "\n\nManufacturer Rep (company)";}if (!(WithoutCheck(document.rw_signup.advertisement)) && (WithoutContent(document.rw_signup.publication.value))) {themessage += "\n\nAdvertisement (publication)";}if (!(WithoutCheck(document.rw_signup.other)) && (WithoutContent(document.rw_signup.specify.value))) {themessage += "\n\nOther (specify)";}if ((WithoutCheck(document.rw_signup.manurep)) && !(WithoutContent(document.rw_signup.manuname.value))) {themessage += "\n\nThe \"Manufacturer Rep\" box must be checked.";}if ((WithoutCheck(document.rw_signup.advertisement)) && !(WithoutContent(document.rw_signup.publication.value))) {themessage += "\n\nThe \"Advertisement\" box must be checked.";}if ((WithoutCheck(document.rw_signup.other)) && !(WithoutContent(document.rw_signup.specify.value))) {themessage += "\n\nThe \"Other\" box must be checked.";}// if variable "themessage" contains a limited valueif (themessage == "PLEASE COMPLETE THE FOLLOWING FIELDS: ") {// submit the formdocument.rw_signup.submit();}// otherwise alert and cancel form submitelse {alert(themessage);return false;   }}// this function calculates the 2 subtotals and the grand total for the form// at "/demo/purchase.asp" and it is called when the user clicks a checkbox// in the form or changes the quantity for item #1. this ensures that the// form data is recalculated whenever there is a change in the order form.function calculate() {var base_license = 400;var base_branding = 150;// if item #1 checkbox is checked and there is a number greater than 0 in the quantity fieldif (document.SendForm.x_license.checked && document.SendForm.qty && document.SendForm.qty.value > 0) {// calculate and display cost (subtotal) for item #1document.SendForm.cost_license.value = parseInt(document.SendForm.qty.value) * base_license;}else {// otherwise set the cost (subtotal) for item #1 to zero (0)document.SendForm.cost_license.value = 0;}// if item #2 checkbox is checkedif (document.SendForm.x_branding.checked) {// display cost (subtotal) for item #2document.SendForm.cost_branding.value = base_branding;}else {// otherwise set the cost (subtotal) for item #2 to zero (0)document.SendForm.cost_branding.value = 0;}// calculate, display and submit the grand totaldocument.SendForm.cost_total.value = parseInt(document.SendForm.cost_license.value) + parseInt(document.SendForm.cost_branding.value) + ".00";document.SendForm.AMOUNT.value = document.SendForm.cost_total.value;}// function verify_SendForm goes here// this function checks the form at "/demo/purchase.asp" and alerts// if the variable "cost_total" contains a value that is NOT greater// than zero. it is called when the user clicks the "pay now" button.function verify_total(){var errormsg = "If you wish you submit this form, please check at least one item to purchase.";calculate();// if total cost field is greater than zeroif (document.SendForm.cost_total.value > 0) {// then submit formdocument.SendForm.submit();}// otherwise alert and cancel form submitelse {alert(errormsg);return false;   }}// this function checks radio buttonsfunction WithoutCheck(ss) {if(ss.checked) { return false; }return true;}// this function checks text box contentfunction WithoutContent(ss) {if(ss.length > 0) { return false; }return true;}// this function calculates the grand total for the form at "/homeowner/purchase.asp"// and it is called when the user clicks a checkbox in the form or changes the quantity.// this ensures that the form data is recalculated whenever there is a change in the form.function h_calculate() {var base_license = 24.99;// if item #1 checkbox is checked and there is a number greater than 0 in the quantity fieldif (document.SendForm.x_license.checked && document.SendForm.qty && document.SendForm.qty.value > 0) {// calculate and display cost (subtotal) for item #1document.SendForm.cost_license.value = parseInt(document.SendForm.qty.value) * base_license;}else {// otherwise set the cost (subtotal) for item #1 to zero (0)document.SendForm.cost_license.value = 0;}// calculate the grand total and send string to the "cost_total" variabledocument.SendForm.cost_total.value = parseFloat(document.SendForm.cost_license.value);// then round the number off to the nearest centdocument.SendForm.cost_total.value = Math.round(document.SendForm.cost_total.value*100)/100;// display and send the grand total into the required "AMOUNT" variabledocument.SendForm.AMOUNT.value = document.SendForm.cost_total.value;}// TRADESHOW SPECIAL OFFER// this function calculates the grand total for the form at "/homeowner/purchase_homeshowspecial.asp"// and it is called when the user clicks a checkbox in the form or changes the quantity.// this ensures that the form data is recalculated whenever there is a change in the form.function hts_calculate() {var base_license = 16.95;// if item #1 checkbox is checked and there is a number greater than 0 in the quantity fieldif (document.SendForm.x_license.checked && document.SendForm.qty && document.SendForm.qty.value > 0) {// calculate and display cost (subtotal) for item #1document.SendForm.cost_license.value = parseInt(document.SendForm.qty.value) * base_license;}else {// otherwise set the cost (subtotal) for item #1 to zero (0)document.SendForm.cost_license.value = 0;}// calculate the grand total and send string to the "cost_total" variabledocument.SendForm.cost_total.value = parseFloat(document.SendForm.cost_license.value);// then round the number off to the nearest centdocument.SendForm.cost_total.value = Math.round(document.SendForm.cost_total.value*100)/100;// display and send the grand total into the required "AMOUNT" variabledocument.SendForm.AMOUNT.value = document.SendForm.cost_total.value;}// this function checks the form at "/homeowner/purchase.asp" and alerts// when the variable "cost_total" contains a value that is NOT greater// than zero. it is called when the user clicks the "pay now" button.function h_verify_total(){var errormsg = "If you wish you submit this form, please check at least one item to purchase.";h_calculate();// if total cost field is greater than zeroif (document.SendForm.cost_total.value > 0) {// then submit formdocument.SendForm.submit();}// otherwise alert and cancel form submitelse {alert(errormsg);return false;   }}