
// Validation routines for IMCCSRA Herman van Beek 13 Aug 2001
function validateContactInfo(theForm)
  {
   if (typeof(theForm.realname_f) != 'undefined') {
      if (theForm.realname_f.value == "") {
         alert("Please specify your first name.");
         theForm.realname_f.focus()
         return (false)
        }
     }
   if (typeof(theForm.realname_l) != 'undefined') {
      if (theForm.realname_l.value == "") {
         alert("Please specify your last name.");
         theForm.realname_l.focus()
         return (false)
        }
     }
   if (typeof(theForm.street) != 'undefined') {
      if (theForm.street.value == "") {
         alert("Please specify your street address.");
         theForm.street.focus()
         return (false)
        }
     }
   if (typeof(theForm.city) != 'undefined') {
      if (theForm.city.value == "") {
         alert("Please specify the city where you live.");
         theForm.city.focus()
         return (false)
        }
     }
   if (typeof(theForm.state) != 'undefined') {
      if (theForm.state.value == "") {
         alert("Please enter the state where you live.");
         theForm.state.focus()
         return (false)
        }
       else 
        {
         theForm.state.value = theForm.state.value.toUpperCase();
         if (!isUSState(theForm.state.value)) {
            theForm.state.focus()
            return (false)
           }
        }
     }
   if (typeof(theForm.zip) != 'undefined') {
      if (theForm.zip.value == "") {
         alert("Please specify your ZIP code.");
         theForm.zip.focus()
         return (false)
        }
     }
   if (typeof(theForm.phone) != 'undefined') {
      if (theForm.phone.value == "") {
         alert("Please specify your telephone number.");
         theForm.phone.focus()
         return (false)
        }
     }
   if (typeof(theForm.email) != 'undefined') {
      if (!theForm.email.value == "") {
         if (!emailCheck(theForm.email.value)) {
           theForm.email.focus()
           return (false);
          } 
        }
     }
   return (true);  
  }