<!--
function validateform(form) {
   
   var domain = "";
   var illegal = new Array;

   if (form.domain.value.length != 0) {
      domain = form.domain.value + "";
      illegal = domain.match(/[^a-zA-Z0-9-]/g);
      if (domain.length > 62) {
         alert ("Your domain name must be less than 63 characters.");
         form.domain.focus();
         return (false);
      } else if ((domain.indexOf(".com") != -1) && (domain.indexOf(".net") != -1) && (domain.indexOf(".org") != -1)) {
         alert ("Your domain name must include one of the top level domains .com, .net or .org.");
         form.domain.focus();
         return (false);
      } else if ((domain.indexOf(".com") != -1) && ((domain.indexOf(".net") != -1) || (domain.indexOf(".org") != -1))) {
         alert ("Your domain name must include only one of the top level domains .com, .net or .org.");
         form.domain.focus();
         return (false);
      } else if ((domain.indexOf(".net") != -1) && ((domain.indexOf(".com") != -1) || (domain.indexOf(".org") != -1))) {
         alert ("Your domain name must include only one of the top level domains .com, .net or .org.");
         form.domain.focus();
         return (false);
      } else if ((domain.indexOf(".org") != -1) && ((domain.indexOf(".com") != -1) || (domain.indexOf(".net") != -1))) {
         alert ("Your domain name must include only one of the top level domains .com, .net or .org.");
         form.domain.focus();
         return (false);
      } else if (illegal) {
         alert ("Your domain name can only contain letters, numbers and/or dash (-) characters (" + illegal + ").");
         form.domain.focus();
         return (false);
      }
   } else
   {
      alert ("The domain name is required to complete registration.");
      form.domain.focus();
      return (false);
   }
   if (form.reglength.selectedIndex == 0) {
      alert ("You must select the registration period to complete registration.");
      form.reglength.focus();
      return (false);
   }
   if (form.emailfrom.value.length == 0) {
      alert ("Your domain owner email address is required to complete registration.");
      form.emailfrom.focus();
      return (false);
   }
   if (form.org.value.length == 0) {
      alert ("Your domain owner organization or individual name is required to complete registration.");
      form.org.focus();
      return (false);
   }
   if (form.add.value.length == 0) {
      alert ("The domain owner address is required to complete registration.");
      form.add.focus();
      return (false);
   }
   if (form.city.value.length == 0) {
      alert ("The domain owner city is required to complete registration.");
      form.city.focus();
      return (false);
   }
   if (form.state.selectedIndex == 0) {
      alert ("The domain owner state is required to complete registration.");
      form.state.focus();
      return (false);
   }
   if (form.zip.value.length == 0) {
      alert ("The domain owner zip code is required to complete registration.");
      form.zip.focus();
      return (false);
   }
   if (form.country.selectedIndex == 0) {
      alert ("The domain owner country is required to complete registration.");
      form.country.focus();
      return (false);
   }

   if (form.anic.value.length != 0) {
      if ((form.aname.value.length != 0) ||
          (form.aadd.value.length != 0) ||
          (form.acity.value.length != 0) ||
          (form.astate.selectedIndex != 0) ||
          (form.azip.value.length != 0) ||
          (form.acountry.selectedIndex != 0) ||
          (form.aphone.value.length != 0) ||
          (form.aemail.value.length != 0)) {
         alert ("Please enter the administrative NIC by itself or enter administrative contact information for a new NIC assignment.");
         form.anic.focus();
         return (false);
      }
   } else
   {
      if (form.aname.value.length == 0) {
         alert ("The administrative contact name is required to complete registration.");
         form.aname.focus();
         return (false);
      }
      if (form.aadd.value.length == 0) {
         alert ("The administrative contact address is required to complete registration.");
         form.aadd.focus();
         return (false);
      }
      if (form.acity.value.length == 0) {
         alert ("The administrative contact city is required to complete registration.");
         form.acity.focus();
         return (false);
      }
      if (form.astate.selectedIndex == 0) {
         alert ("The administrative contact state is required to complete registration.");
         form.astate.focus();
         return (false);
      }
      if (form.azip.value.length == 0) {
         alert ("The administrative contact zip code is required to complete registration.");
         form.azip.focus();
         return (false);
      }
      if (form.acountry.selectedIndex == 0) {
         alert ("The administrative contact country is required to complete registration.");
         form.acountry.focus();
         return (false);
      }
      if (form.aphone.value.length == 0) {
         alert ("The administrative contact phone number is required in order to complete your account setup.");
         form.aphone.focus();
         return (false);
      }
      if (form.aemail.value.length == 0) {
         alert ("The administrative contact email address is required to complete registration.");
         form.aemail.focus();
         return (false);
      }
   }

   if (form.bnic.value.length != 0) {
      if ((form.bname.value.length != 0) ||
          (form.badd.value.length != 0) ||
          (form.bcity.value.length != 0) ||
          (form.bstate.selectedIndex != 0) ||
          (form.bzip.value.length != 0) ||
          (form.bcountry.selectedIndex != 0) ||
          (form.bphone.value.length != 0) ||
          (form.bemail.value.length != 0)) {
         alert ("Please enter the billing NIC by itself or enter billing contact information for a new NIC assignment.");
         form.bnic.focus();
         return (false);
      }
   } else
   {
      if (form.bname.value.length == 0) {
         alert ("The billing contact name is required to complete registration.");
         form.bname.focus();
         return (false);
      }
      if (form.badd.value.length == 0) {
         alert ("The billing contact address is required to complete registration.");
         form.badd.focus();
         return (false);
      }
      if (form.bcity.value.length == 0) {
         alert ("The billing contact city is required to complete registration.");
         form.bcity.focus();
         return (false);
      }
      if (form.bstate.selectedIndex == 0) {
         alert ("The billing contact state is required to complete registration.");
         form.bstate.focus();
         return (false);
      }
      if (form.bzip.value.length == 0) {
         alert ("The billing contact zip code is required to complete registration.");
         form.bzip.focus();
         return (false);
      }
      if (form.bcountry.selectedIndex == 0) {
         alert ("The billing contact country is required to complete registration.");
         form.bcountry.focus();
         return (false);
      }
      if (form.bphone.value.length == 0) {
         alert ("The billing contact phone number is required in order to complete your account setup.");
         form.bphone.focus();
         return (false);
      }
      if (form.bemail.value.length == 0) {
         alert ("The billing contact email address is required to complete registration.");
         form.bemail.focus();
         return (false);
      }
   }
   return (true);
}
//-->



