function Form1_Validator(theForm)
{

  var radioSelected = false;
  for (i = 0;  i < theForm.corporate.length;  i++)
  {
    if (theForm.corporate[i].checked)
        radioSelected = true;
  }
  if (!radioSelected)
  {
    alert("\"法人・個人\" のいずれかを選択してください。");
    return (false);
  }

if (theForm.corporate[0].checked) {
  if (theForm.corporate_name.value == "")
  {
    alert("\"法人名\" を入力してください。");
    theForm.corporate_name.focus();
    return (false);
  }

  if (theForm.post_name.value == "")
  {
    alert("\"部署名\" を入力してください。");
    theForm.post_name.focus();
    return (false);
  }
}

  if (theForm.name.value == "")
  {
    alert("\"ご氏名\" を入力してください。");
    theForm.name.focus();
    return (false);
  }

  if (theForm.furi.value == "")
  {
    alert("\"フリガナ\" を入力してください。");
    theForm.furi.focus();
    return (false);
  }

  if (theForm.zip1.value == "")
  {
    alert("\"郵便番号（3桁）\" を入力してください。");
    theForm.zip1.focus();
    return (false);
  }

  if (theForm.zip1.value.length < 3)
  {
    alert("\"郵便番号（3桁）\" には 3桁の数字を入力してください。");
    theForm.zip1.focus();
    return (false);
  }

  if (theForm.zip1.value.length > 3)
  {
    alert("\"郵便番号（3桁）\" には 3桁の数字を入力してください。");
    theForm.zip1.focus();
    return (false);
  }

  var checkOK = "0123456789-";
  var checkStr = theForm.zip1.value;
  var allValid = true;
  var validGroups = true;
  var decPoints = 0;
  var allNum = "";
  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;
    }
    allNum += ch;
  }
  if (!allValid)
  {
    alert("\"郵便番号（3桁）\" には 数字 を入力してください。");
    theForm.zip1.focus();
    return (false);
  }

  if (theForm.zip2.value == "")
  {
    alert("\"郵便番号（4桁）\" を入力してください。");
    theForm.zip2.focus();
    return (false);
  }

  if (theForm.zip2.value.length < 4)
  {
    alert("\"郵便番号（4桁）\" には 4桁の数字を入力してください。");
    theForm.zip2.focus();
    return (false);
  }

  if (theForm.zip2.value.length > 4)
  {
    alert("\"郵便番号（4桁）\" には 4桁の数字を入力してください。");
    theForm.zip2.focus();
    return (false);
  }

  var checkOK = "0123456789-";
  var checkStr = theForm.zip2.value;
  var allValid = true;
  var validGroups = true;
  var decPoints = 0;
  var allNum = "";
  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;
    }
    allNum += ch;
  }
  if (!allValid)
  {
    alert("\"郵便番号（4桁）\" には 数字 を入力してください。");
    theForm.zip2.focus();
    return (false);
  }

  if (theForm.address.value == "")
  {
    alert("\"ご住所\" を入力してください。");
    theForm.address.focus();
    return (false);
  }

  if (theForm.tel1.value == "")
  {
    alert("\"電話番号（市外局番）\" を入力してください。");
    theForm.tel1.focus();
    return (false);
  }

  var checkOK = "0123456789-";
  var checkStr = theForm.tel1.value;
  var allValid = true;
  var validGroups = true;
  var decPoints = 0;
  var allNum = "";
  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;
    }
    allNum += ch;
  }
  if (!allValid)
  {
    alert("\"電話番号（市外局番）\" には 数字 を入力してください。");
    theForm.tel1.focus();
    return (false);
  }

  if (theForm.tel2.value == "")
  {
    alert("\"電話番号（局番）\" を入力してください。");
    theForm.tel2.focus();
    return (false);
  }

  var checkOK = "0123456789-";
  var checkStr = theForm.tel2.value;
  var allValid = true;
  var validGroups = true;
  var decPoints = 0;
  var allNum = "";
  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;
    }
    allNum += ch;
  }
  if (!allValid)
  {
    alert("\"電話番号（局番）\" には 数字 を入力してください。");
    theForm.tel2.focus();
    return (false);
  }

  if (theForm.tel3.value == "")
  {
    alert("\"電話番号\" を入力してください。");
    theForm.tel3.focus();
    return (false);
  }

  var checkOK = "0123456789-";
  var checkStr = theForm.tel3.value;
  var allValid = true;
  var validGroups = true;
  var decPoints = 0;
  var allNum = "";
  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;
    }
    allNum += ch;
  }
  if (!allValid)
  {
    alert("\"電話番号\" には 数字 を入力してください。");
    theForm.tel3.focus();
    return (false);
  }

  if (theForm.mail.value == "")
  {
    alert("\"電子メールアドレス\" を入力してください。");
    theForm.mail.focus();
    return (false);
  }

  return (true);
}
