<!--
function FrontPage_Form1_Validator(theForm)
{

  if (theForm.firstname.value == "")
  {
    alert("Lütfen Adınızı Giriniz.");
    theForm.firstname.focus();
    return (false);
  }

  if (theForm.firstname.value.length < 2)
  {
    alert("Adınız En Az 2 Harfden Oluşmalıdır.");
    theForm.firstname.focus();
    return (false);
  }

  if (theForm.firstname.value.length > 64)
  {
    alert("Adınız En Fazla 64 Harfden Oluşmalıdır.");
    theForm.firstname.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzÇĞİÖŞÜçğıöşü \t\r\n\f";
  var checkStr = theForm.firstname.value;
  var allValid = true;
  var validGroups = 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("Adınız Sadece Harflerden Oluşmalıdır.");
    theForm.firstname.focus();
    return (false);
  }

  if (theForm.lastname.value == "")
  {
    alert("Lütfen Soyadınızı Giriniz.");
    theForm.lastname.focus();
    return (false);
  }

  if (theForm.lastname.value.length < 2)
  {
    alert("Soyadınız En Az 2 Harfden Oluşmalıdır.");
    theForm.lastname.focus();
    return (false);
  }

  if (theForm.lastname.value.length > 64)
  {
    alert("Soyadınız En Fazla 64 Harfden Oluşmalıdır.");
    theForm.lastname.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzÇĞİÖŞÜçğıöşü \t\r\n\f";
  var checkStr = theForm.lastname.value;
  var allValid = true;
  var validGroups = 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("Soyadınız Sadece Harflerden Oluşmalıdır.");
    theForm.lastname.focus();
    return (false);
  }

  if (theForm.username.value == "")
  {
    alert("Lütfen Kullanıcı Adı Giriniz.");
    theForm.username.focus();
    return (false);
  }

  if (theForm.username.value.length < 4)
  {
    alert("Kullanıcı Adı En Az 4 Karakter Olmalıdır.");
    theForm.username.focus();
    return (false);
  }

  if (theForm.username.value.length > 16)
  {
    alert("Kullanıcı Adı En Fazla 16 Karakter Olmalıdır.");
    theForm.username.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzÇĞİÖŞÜçğıöşü0123456789-_.";
  var checkStr = theForm.username.value;
  var allValid = true;
  var validGroups = 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("Kullanıcı Adı Harf, Sayı veya \". _ -\" Karakterlerini İçermelidir.");
    theForm.username.focus();
    return (false);
  }

  if (theForm.password.value == "")
  {
    alert("Lütfen Şifre Giriniz.");
    theForm.password.focus();
    return (false);
  }

  if (theForm.password.value.length < 4)
  {
    alert("Şifreniz En Az 4 Karakter Olmalıdır.");
    theForm.password.focus();
    return (false);
  }

  if (theForm.password.value.length > 16)
  {
    alert("Şifreniz En Fazla 16 Karakter Olmalıdır.");
    theForm.password.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzÇĞİÖŞÜçğıöşü0123456789-_.";
  var checkStr = theForm.password.value;
  var allValid = true;
  var validGroups = 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("Şifreniz Harf, Sayı veya \". _ -\" Karakterlerini İçermelidir.");
    theForm.password.focus();
    return (false);
  }


   if (theForm.password2.value == "")
  {
    alert("Lütfen Şifre2 Giriniz.");
    theForm.password2.focus();
    return (false);
  }

  if (theForm.password2.value.length < 4)
  {
    alert("Şifre2 En Az 4 Karakter Olmalıdır.");
    theForm.password2.focus();
    return (false);
  }

  if (theForm.password2.value.length > 16)
  {
    alert("Şifre2 En Fazla 16 Karakter Olmalıdır.");
    theForm.password2.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzÇĞİÖŞÜçğıöşü0123456789-_.";
  var checkStr = theForm.password2.value;
  var allValid = true;
  var validGroups = 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("Şifre2 Harf, Sayı veya \". _ -\" Karakterlerini İçermelidir.");
    theForm.password2.focus();
    return (false);
  }


     if (theForm.password.value != theForm.password2.value)
  {
    alert("Şifreler Uyuşmuyor.");
    theForm.password.focus();
    return (false);
  }



  if (theForm.mphone.value.length > 17)
  {
    alert("LÜTFEN CEP TEL ALANINA 17 KARAKTERDEN AZ GİRİNİZ.");
    theForm.mphone.focus();
    return (false);
  }
 if (theForm.mphone.value.length < 6 && theForm.mphone.value.length!= "")
  {
    alert("Mobil Telefon En Az 6 Karakter Olmalıdır.");
    theForm.mphone.focus();
    return (false);
  }
  var checkOK = "0123456789+ ";
  var checkStr = theForm.mphone.value;
  var allValid = true;
  var validGroups = 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("Mobil Telefon Sayı veya + Karakterlerini İçermelidir.");
    theForm.mphone.focus();
    return (false);
  }

  if (theForm.phone.value.length > 22)
  {
    alert("TELEFON ALANINA EN FAZLA 22 KARAKTER GİRİNİZ.");
    theForm.phone.focus();
    return (false);
  }
 if (theForm.phone.value.length < 6 && theForm.phone.value.length!= "")
  {
    alert("Telefon En Az 6 Karakter Olmalıdır.");
    theForm.phone.focus();
    return (false);
  }
  var checkOK = "0123456789/+ ";
  var checkStr = theForm.phone.value;
  var allValid = true;
  var validGroups = 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("Telefon Sayı veya / + Karakterleri İçermelidir.");
    theForm.phone.focus();
    return (false);
  }

  if (theForm.fax.value.length > 17)
  {
    alert("FAX ALANINA EN FAZLA 17 KARAKTER GİRİNİZ.");
    theForm.fax.focus();
    return (false);
  }
 if (theForm.fax.value.length < 6 && theForm.fax.value.length!= "")
  {
    alert("Faks En Az 6 Karakter Olmalıdır.");
    theForm.fax.focus();
    return (false);
  }
  var checkOK = "0123456789+ ";
  var checkStr = theForm.fax.value;
  var allValid = true;
  var validGroups = 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("Faks Sayı veya + Karakterleri İçermelidir.");
    theForm.fax.focus();
    return (false);
  }

  if (theForm.email.value == "")
  {
    alert("EPosta Giriniz.");
    theForm.email.focus();
    return (false);
  }

  if (theForm.email.value.length < 6)
  {
    alert("EPosta En Az 6 Karakter Olmalıdır.");
    theForm.email.focus();
    return (false);
  }

  if (theForm.email.value.length > 64)
  {
    alert("EPosta 64 Karakterden Fazla.");
    theForm.email.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-.@-_";
  var checkStr = theForm.email.value;
  var allValid = true;
  var validGroups = 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("Lütfen Epostaniz Sadece Harf, Rakam veya \".@-_\" Karakterlerinden Oluşmalıdır.");
    theForm.email.focus();
    return (false);
  }



  if (theForm.address.value.length > 250)
  {
    alert("Lütfen Adres için 250 karakterden az Giriniz.");
    theForm.address.focus();
    return (false);
  }

  if (theForm.city.value == "" && theForm.country.value != "TR")
  {
    alert("Lütfen önce Şehir sonra Ülke Seçiniz");
    theForm.country.focus();
    return (false);
  }
  
    if (theForm.city.value == "" && theForm.country.value == "TR")
  {
    alert("Lütfen Şehir Seçiniz.");
    theForm.city.focus();
    return (false);
  }
  
    if (theForm.city.value ==999 &&  theForm.country.value == "TR")
  {
    alert("Lütfen Şehir Seçiniz.");
    theForm.city.focus();
    return (false);
  }
  
  if (theForm.city.value !=999 &&  theForm.country.value != "TR")
  {
    alert("Şehiri Seçtiniz Lütfen Ülkeyi Türkiye Seçiniz.");
    theForm.country.focus();
    return (false);
  }
  

  if (theForm.city.value.length < 1)
  {
    alert("Please Select the \"CITY\" field2.");
    theForm.city.focus();
    return (false);
  }

  if (theForm.city.value.length > 3)
  {
    alert("Please enter at most 3 characters in the \"CITY\" field.");
    theForm.city.focus();
    return (false);
  }

  if (theForm.zip.value.length > 5)
  {
    alert("Posta Kodu 5 Karakterden Fazla.");
    theForm.zip.focus();
    return (false);
  }

  var checkOK = "0123456789\t\r\n\f";
  var checkStr = theForm.zip.value;
  var allValid = true;
  var validGroups = 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("Posta Koduna Rakam Giriniz.");
    theForm.zip.focus();
    return (false);
  }


  if (theForm.kod.value == "")
  {
    alert("Güvenlik Kodunu Giriniz.");
    theForm.email.focus();
    return (false);
  }

  if (theForm.kod.value.length > 5)
  {
    alert("Güvenlik Kodu 5 Karakterden Fazla.");
    theForm.kod.focus();
    return (false);
  }

  var checkOK = "abcdefghijklmnopqrstuvwxyz0123456789\t\r\n\f";
  var checkStr = theForm.kod.value;
  var allValid = true;
  var validGroups = 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("Güvenlik Koduna küçük harfler Giriniz.");
    theForm.kod.focus();
    return (false);
  }


  return (true);
}
//-->
