function validate_form(theForm)
{

  if (theForm.name.value == "")
  {
    alert("Please enter your Name.");
    theForm.name.focus();
    return (false);
  }

  if (theForm.company.value == "")
  {
    alert("Please enter your Company Name.");
    theForm.company.focus();
    return (false);
  }


  if (theForm.phone.value == "")
  {
    alert("Please enter a Phone Number.");
    theForm.phone.focus();
    return (false);
  }

  if (theForm.phone.value.length < 10)
  {
    alert("Phone Number should be at least 10 characters.");
    theForm.phone.focus();
    return (false);
  }

  var checkOK = "0123456789--)( \t\r\n\f";
  var checkStr = theForm.phone.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }

  if (!allValid)
  {
    alert("Please enter only digit, whitespace and \"-)(\" characters in the \"Phone\" field.");
    theForm.phone.focus();
    return (false);
  }

  if (theForm.city.value == "")
  {
    alert("Please enter a City.");
    theForm.city.focus();
    return (false);
  }

  if (theForm.state.selectedIndex == 0)
  {
    alert("Please select one of the States.");
    theForm.state.focus();
    return (false);
  }

  if (theForm.email.value == "")
  {
    alert("Please enter your e-mail address.");
    theForm.email.focus();
    return (false);
  }
 
  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ0123456789-@,_,.";
  var checkStr = theForm.email.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }

  if (!allValid)
  {
    alert("Please enter only letter, digit and \"@,_,.\" characters in the \"Email\" field.");
    theForm.email.focus();
    return (false);
  }


if (theForm.send_to.selectedIndex == 0)
  {
    alert("Please select one of the Subjects.");
    theForm.send_to.focus();
    return (false);
  }


  return (true);

}

function validate_newsletter(theForm)
{

  if (theForm.first_name.value == "")
  {
    alert("Please enter your First Name.");
    theForm.first_name.focus();
    return (false);
  }

  if (theForm.last_name.value == "")
  {
    alert("Please enter your Last Name.");
    theForm.last_name.focus();
    return (false);
  }

  if (theForm.email.value == "")
  {
    alert("Please enter your e-mail address.");
    theForm.email.focus();
    return (false);
  }
 
  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ0123456789-@,_,.";
  var checkStr = theForm.email.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }

  if (!allValid)
  {
    alert("Please enter only letter, digit and \"@,_,.\" characters in the \"Email\" field.");
    theForm.email.focus();
    return (false);
  }

  return (true);

}
function validate_conference(theForm)
{

  if (theForm.conference.selectedIndex == 0)
  {
    alert("Please select one of the Conferences.");
    theForm.conference.focus();
    return (false);
  }

  if (theForm.email.value == "")
  {
    alert("Please enter your e-mail address.");
    theForm.email.focus();
    return (false);
  }
 
  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ0123456789-@,_,.";
  var checkStr = theForm.email.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }

  if (!allValid)
  {
    alert("Please enter only letter, digit and \"@,_,.\" characters in the \"Email\" field.");
    theForm.email.focus();
    return (false);
  }

  if (theForm.first_name.value == "")
  {
    alert("Please enter your First Name.");
    theForm.first_name.focus();
    return (false);
  }

  if (theForm.last_name.value == "")
  {
    alert("Please enter your Last Name.");
    theForm.last_name.focus();
    return (false);
  }

  if (theForm.work_phone.value == "")
  {
    alert("Please enter your Work Phone Number.");
    theForm.work_phone.focus();
    return (false);
  }

  if (theForm.work_phone.value.length < 10)
  {
    alert("Phone Number should be at least 10 characters.");
    theForm.work_phone.focus();
    return (false);
  }

  var checkOK = "0123456789--)( \t\r\n\f";
  var checkStr = theForm.work_phone.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }

  if (!allValid)
  {
    alert("Please enter only digit, whitespace and \"-)(\" characters in the \"Phone\" field.");
    theForm.work_phone.focus();
    return (false);
  }

  return (true);

}

function validate_refferalform(theForm)
{

  if (theForm.referral_name.value == "")
  {
    alert("Please enter your Name.");
    theForm.referral_name.focus();
    return (false);
  }

  if (theForm.referral_company.value == "")
  {
    alert("Please enter your Company Name.");
    theForm.referral_company.focus();
    return (false);
  }

  if (theForm.referral_email.value == "")
  {
    alert("Please enter your e-mail address.");
    theForm.referral_email.focus();
    return (false);
  }
 
  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ0123456789-@,_,.";
  var checkStr = theForm.referral_email.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }

  if (!allValid)
  {
    alert("Please enter only letter, digit and \"@,_,.\" characters in the \"Email\" field.");
    theForm.referral_email.focus();
    return (false);
  }

  if (theForm.claimant_name.value == "")
  {
    alert("Please enter Claimant Name.");
    theForm.claimant_name.focus();
    return (false);
  }
  
    if (theForm.claimant_address.value == "")
  {
    alert("Please enter Claimant Address.");
    theForm.claimant_address.focus();
    return (false);
  }
  
  if (theForm.claimant_city.value == "")
  {
    alert("Please enter Claimant City.");
    theForm.claimant_city.focus();
    return (false);
  }

  if (theForm.claimant_state.selectedIndex == 0)
  {
    alert("Please select one of the States.");
    theForm.claimant_state.focus();
    return (false);
  }

   if (theForm.claimant_zip.value == "")
  {
    alert("Please enter Claimant Zipcode.");
    theForm.claimant_zip.focus();
    return (false);
  }
  
  if (theForm.claimant_phone.value == "")
  {
    alert("Please enter Claimant Phone Number.");
    theForm.claimant_phone.focus();
    return (false);
  }

  if (theForm.claimant_phone.value.length < 10)
  {
    alert("Phone Number should be at least 10 characters.");
    theForm.claimant_phone.focus();
    return (false);
  }

  var checkOK = "0123456789--)( \t\r\n\f";
  var checkStr = theForm.claimant_phone.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }

  if (!allValid)
  {
    alert("Please enter only digit, whitespace and \"-)(\" characters in the \"Phone\" field.");
    theForm.claimant_phone.focus();
    return (false);
  }
  
if (theForm.claim_num.value == "")
  {
    alert("Please enter Claim Number.");
    theForm.claim_num.focus();
    return (false);
  }
  
  if (theForm.dol.value == "")
  {
    alert("Please enter Date of Loss.");
    theForm.dol.focus();
    return (false);
  }

  return (true);

}
