function Highlight(){
document.ikform.eposta.focus();
document.ikform.eposta.select();
}

function ikkontrolu(theForm)
{

 if (theForm.istanimi.selectedIndex == 0)
  {
    alert("Lütfen Iş Tanımını Seçiniz...");
    theForm.istanimi.focus();
    return false;
  }



 else if (theForm.adi.value == "")
  {
	alert("Lütfen Isminizi Giriniz...");
    theForm.adi.focus();
    return false;
}

 else if (theForm.adi.value.length < 2)
  {
	alert("Isminiz En Az 3 Karakterden Oluşur...");
    theForm.adi.focus();
    return false;
  }

 else if (theForm.adi.value.length > 30)
  {
	alert("Isminiz En Az 30 Karakterden Oluşur...");
    theForm.adi.focus();
    return false;
  }

 else if (theForm.soyadi.value == "")
  {
	alert("Lütfen Soyadınızı Giriniz...");
    theForm.soyadi.focus();
    return false;
  }

 else if (theForm.soyadi.value.length < 2)
  {
	alert("Soyadınız En Az 3 Karakterden Oluşur...");
    theForm.soyadi.focus();
    return false;
  }

 else if (theForm.soyadi.value.length > 30)
  {
	alert("Soyadınız En Az 30 Karakterden Oluşur...");
    theForm.soyadi.focus();
    return false;
  }

 else if (theForm.cinsiyet.selectedIndex == 0)
  {
    alert("Cinsiyet seçilmemis");
    theForm.cinsiyet.focus();
    return false;
  }

 else if (theForm.dtarihi.value == "")
  {
    alert("Doğum Tarihi Girilmemis !");
    theForm.dtarihi.focus();
    return false;
  }



 else if (theForm.dyeri.value == "")
  {
    alert("Doğum Yerini Giriniz !");
    theForm.dyeri.focus();
    return false;
  }

 else if (theForm.dyeri.value.length < 3)
  {
    alert("Doğum Yerini Giriniz !");
    theForm.dyeri.focus();
    return false;
  }

 else if (theForm.dyeri.value.length > 30)
  {
    alert("Doğum Yerini En çok 30 harf Giriniz !");
    theForm.dyeri.focus();
    return false;
  }

 else if (theForm.medenidurum.selectedIndex == 0)
  {
    alert("Medeni Durumunuz seçilmemiş !");
    theForm.medenidurum.focus();
    return false;
  }

 else if (theForm.askerlikdurumu.selectedIndex == 0 && theForm.cinsiyet.selectedIndex == "bay")
  {
    alert("Askerlik Durumu seçilmelidir !");
    theForm.askerlikdurumu.focus();
    return false;
  }

 else if (theForm.ehliyet.selectedIndex == 0)
  {
    alert("Sürücü Belgesi Seçilmelidir !");
    theForm.ehliyet.focus();
    return false;
  }

 else if (theForm.arabavarmi.selectedIndex == 0)
  {
    alert("Arabaniz Varmi ?");
    theForm.arabavarmi.focus();
    return false;
  }

 else if (theForm.seyahatengeli.selectedIndex == 0)
  {
    alert("Seyahat Engeliniz varmi ?");
    theForm.seyahatengeli.focus();
    return false;
  }

 else if (theForm.sigarakullanim.selectedIndex == 0)
  {
    alert("Sigara kullaniyormusunuz ?");
    theForm.sigarakullanim.focus();
    return false;
  }

 else if (theForm.evinizkimin.selectedIndex == 0)
  {
    alert("Eviniz Kirami ?");
    theForm.evinizkimin.focus();
    return false;
  }
//-------------------------------------------------------------------------------------------------------
var eposta = theForm.eposta.value;
var blanks = ''*100;
var naughty = new Array("yarrak","yarak","dumbuk","erotik","erotic","sikisken","oglancil","siktir","orospu","lezbiyen","porno","penis","amcik","pezevenk","hacker","hack","warez","porn","crack");
var sneaky = eposta.toLowerCase();
var illegal = "Yanlış karakter girdiniz.\nİzin verilen karakterler aşşağıda sıralanmaktadır.\n\nAlfabetik Harfler [Büyük veya küçük]\nSayılar\nSadece 1 adet @\nBoşluk Olmamalı\nTürkçe Karakterler Olmamalı (ı ğ ü ş ö ç )\nKısa Çizgi [Tire]\nAlt Çizgi\n\n";
//mail kontrol
if (eposta <= blanks){
  alert("Lütfen E-Posta adresinizi giriniz.");
  Highlight();return false;
  }
else if (eposta.length > 62){
   alert('Tüm E-Postalerde en fazla 63 karakter bulunabilir.');
   Highlight();return false;
   }
else if (eposta.charAt(0) == " "){
   alert('E-Posta adresinizin başında boşluk olamaz');
   Highlight();return false;
   }
else if (eposta.charAt(eposta.length-1) == " "){
   alert('E-Posta adresinizin sonunda boşluk olamaz');
   Highlight();return false;
   }
else if (eposta.indexOf(" ") !=-1){
   alert('E-Posta adresinizin içinde boşluk olamaz');
   Highlight();return false;
   }

//CHECK FOR ILLEGAL CHARACTERS 1
for (i=0; i < eposta.length; i++){
var caps = "a".toUpperCase();
var E = eposta.substring(i, i + 1);
if ((E < "0" || "9" < E ) && E != "@"  && E !="." && E !="-"  && E !="_"  &&  E < caps || "z" < E){
 alert(illegal);
 Highlight();return false;
 }
}
//CHECK FOR ILLEGAL CHARACTERS 2
if ((eposta.indexOf('`',0) != -1) || (eposta.indexOf(String.fromCharCode(94)) != -1) || (eposta.indexOf(String.fromCharCode(92)) != -1) || (eposta.indexOf('[',0) != -1) || (eposta.indexOf(']',0) != -1)){
 alert(illegal);
 Highlight();return false;
}
//Yasak kelime kontrolu
for (i=0; i < eposta.length; i){  
 if (sneaky.indexOf(naughty[i]) != -1){
 alert('Lütfen bu kelimeleyi siliniz - '+naughty[i].toUpperCase());
 Highlight();return false;
 }
i++;
}
//GENERAL FORMATING
if (eposta.charAt(0) =="."){
 alert('Adresinizin başında nokta olamaz.');
 Highlight();return false;
}
else if (eposta.split('@').length > 2){
 alert('E-Posta adresinizde 1 adet @ bulunmalı.');
 Highlight();return false;
}
else if (eposta.indexOf ('@',0) == -1){
 alert("Adresinizde @ sembolü yok");
 Highlight();return false;
}
else if (eposta.indexOf("@") < 2){
 alert("Adresinizde @ sembolünden önce en az 2 karakter olmalı.");
 Highlight();return false;
}
else if (eposta.charAt(eposta.length-1) == "@"){
 alert('E-Posta adresiniz @ sembolü ile bitemez.');
 Highlight();return false;
}
else if (eposta.indexOf ('.') == -1){
 alert("E-Posta adresinizde en az 1 tane nokta olmalı.");
 Highlight();return false;
}
else if (eposta.indexOf('.',eposta.indexOf('@')) == -1){
 alert('Adresinizde @ sembolünden sonra en az 1 tane nokta olmalı.');
 Highlight();return false;
}
else if (eposta.substring(eposta.indexOf('@'),eposta.length).indexOf(".") < 4){
 alert('Adresinizde @ sembolünden sonra en az 3 karakter olmalı');  
 Highlight();return false;
}
else if (eposta.lastIndexOf(".")+2 == eposta.length){
 alert('Adresinizin sonunda nokta ile ayrılan bölümler en az 2 karakter olmalı.');
 Highlight();return false;
}
else if (eposta.substring(eposta.lastIndexOf("."),eposta.length).length > 4){
 alert('Adresinizin sonunda en fazla 3 karakter olmalı');
 Highlight();return false;
}
else if (eposta.charAt(eposta.length-1) =="."){
 alert('E-Posta adresiniz nokta ile bitemez.');
 Highlight();return false;
}
//-------------------------------------------------------------------------------------------------------

 else if (theForm.evadresi.value == "")
  {
    alert("Ev Adresini giriniz");
    theForm.evadresi.focus();
    return false;
  }

 else if (theForm.evadresi.value.length < 3)
  {
    alert("Ev Adresini giriniz");
    theForm.evadresi.focus();
    return false;
  }

 else if (theForm.evadresi.value.length > 100)
  {
    alert("Ev Adresini kisaltiniz (En çok 100 harf)");
    theForm.evadresi.focus();
    return false;
  }

 else if (theForm.evtelefonu.value == "")
  {
    alert("Lütfen ev telefonunuzu giriniz !");
    theForm.evtelefonu.focus();
    return false;
  }

 else if (theForm.ceptelefonu.value.length < 2)
  {
    alert("Lütfen Cep telefon numaranizi giriniz !");
    theForm.ceptelefonu.focus();
    return false;
  }

 else if (theForm.sehir.selectedIndex == 0)
  {
    alert("Lütfen Şehir Belirtiniz !");
    theForm.sehir.focus();
    return false;
  }
  
 else if (theForm.ilce.value.length < 2)
  {
    alert("Lütfen Ilçe Adini Giriniz !");
    theForm.ilce.focus();
    return false;
  }

else if (theForm.ilce.value.length > 30)
  {
    alert("Lütfen Ilçe Adini kisaltiniz (En fazla 30 harf)");
    theForm.ilce.focus();
    return false;
  }

	
		

 else if (theForm.egitimduzeyi.selectedIndex == 0)
  {
    alert("Lütfen Egitim Düzeyinizi Belirtiniz !");
    theForm.egitimduzeyi.focus();
    return false;
  }
  
  
 else  if(theForm.universite.value.length < 4 && theForm.egitimduzeyi.selectedIndex=="lisans" || theForm.egitimduzeyi.selectedIndex=="yukseklisans" || theForm.egitimduzeyi.selectedIndex.value=="doktora"){
		alert("Lütfen Mezun Oldugunuz Üniversite Adini Giriniz !");
		return false;
		}
			else	if(theForm.bolumu.value.length  < 4  && theForm.egitimduzeyi.selectedIndex=="lisans" || theForm.egitimduzeyi.selectedIndex=="yukseklisans" || theForm.egitimduzeyi.selectedIndex=="doktora"){
		alert("Lütfen Mezun Oldugunuz Böülümü Giriniz !");
		return false;
		}
			else	if(theForm.mezuniyettarih.value.length  < 4  && theForm.egitimduzeyi.selectedIndex=="lisans" || theForm.egitimduzeyi.selectedIndex=="yukseklisans" || theForm.egitimduzeyi.selectedIndex=="doktora"){
		alert("Lütfen Mezun Oldugunuz Yili Giriniz !");
		return false;
		}
		else		if(theForm.mezuniyetderece.value.length  < 2  && theForm.egitimduzeyi.selectedIndex=="lisans" || theForm.egitimduzeyi.selectedIndex=="yukseklisans" || theForm.egitimduzeyi.selectedIndex=="doktora"){
		alert("Lütfen Mezuniyet Derecenizi Giriniz !");
		return false;
		}

 else if (theForm.Son_Is_tecrubeniz_firmaAdi.value.length < 3 )
  {
    alert("En son isyeri Girilmelidir");
    theForm.Son_Is_tecrubeniz_firmaAdi.focus();
    return false;
  }

 else if (theForm.Son_Is_tecrubeniz_firmaAdi.value.length > 76)
  {
    alert("En son isyeri adi çok uzun (En çok 75 harf)");
    theForm.Son_Is_tecrubeniz_firmaAdi.focus();
    return false;
  }

 else if (theForm.Son_calistiginiz_Firma_departmani.value == "")
  {
    alert("En son çalisti&#287;iniz is yeri departmani adini giriniz");
    theForm.Son_calistiginiz_Firma_departmani.focus();
    return false;
  }

 else if (theForm.Son_calistiginiz_Firma_departmani.value.length < 3)
  {
    alert("En son çalisti&#287;iniz is yeri departmani adini giriniz");
    theForm.Son_calistiginiz_Firma_departmani.focus();
    return false;
  }

  
 else if (theForm.kariyerHedefi.value == "")
  {
    alert("Kariyer Hedefinizi giriniz");
    theForm.kariyerHedefi.focus();
    return false;
  }

 else if (theForm.kariyerHedefi.value.length < 5)
  {
    alert("Kariyer Hedefinizi giriniz");
    theForm.kariyerHedefi.focus();
    return false;
  }

 else if (theForm.kariyerHedefi.value.length > 300)
  {
    alert("Kariyer Hedefinizi kisa giriniz (En çok 300 harf)");
    theForm.kariyerHedefi.focus();
    return false;
  }

 else if (theForm.AylikGelirHedefi.selectedIndex == 0)
  {
    alert("Aylik Gelir hedefini Giriniz");
    theForm.AylikGelirHedefi.focus();
    return false;
  }
  
if(!durum){
	alert("Lütfen Zorunlu Alanları doldurunuz...");
 return false;}

}

function akontrol(cins){
	if(cins == "bay"){
		window.document.ikform.askerlikdurumu.disabled=false;
		}else{
		window.document.ikform.askerlikdurumu.disabled=true;
	}
}

function okontrol(ogrenim){
	var theForm = window.document.ikform;
	if(ogrenim != "ilkogretim" && ogrenim != "lise" && ogrenim != 0){
		window.document.ikform.universite.disabled=false;
		window.document.ikform.bolumu.disabled=false;
		window.document.ikform.mezuniyettarih.disabled=false;
		window.document.ikform.mezuniyetderece.disabled=false;
		
		}else{
		window.document.ikform.universite.disabled=true;
		window.document.ikform.bolumu.disabled=true;
		window.document.ikform.mezuniyettarih.disabled=true;
		window.document.ikform.mezuniyetderece.disabled=true;
	}

}
	