function frm_ik_ctrl(onay_kod_deger){
	if (document.getElementById("ad_soyad").value == ""){
		window.alert("Ad Soyad Yazılması Zorunludur.");
		document.getElementById("ad_soyad").focus();
		return false;
	}
	if (document.getElementById("dyer").value != "" && document.getElementById("dtarih").value == ""){
		window.alert("Doğum Tarihi Yazılması Zorunludur.");
		document.getElementById("dtarih").focus();
		return false;
	}	
	if (document.getElementById("dtarih").value != "" && document.getElementById("dyer").value == ""){
		window.alert("Doğum Yeri Yazılması Zorunludur.");
		document.getElementById("dyer").focus();
		return false;
	}
	if (document.getElementById("diger_uyruk").style.display == '' && (document.getElementById("diger_uyruk").value == "" || document.getElementById("diger_uyruk").value == "Uyruğunuzu Yazınız")){
		window.alert("Uyruk Yazılması Zorunludur.");
		document.getElementById("diger_uyruk").value = '';
		document.getElementById("diger_uyruk").focus();
		return false;
	}
	if (document.getElementById("mahkum_sebep").style.display == '' && (document.getElementById("mahkum_sebep").value == "" || document.getElementById("mahkum_sebep").value == "Sebenini Yazınız")){
		window.alert("Mahkumiyet Sebebinin Yazılması Zorunludur.");
		document.getElementById("mahkum_sebep").value = '';
		document.getElementById("mahkum_sebep").focus();
		return false;
	}
//email
	if (document.getElementById("email").value == ""){
		window.alert("E-Mail Adresi Yazılması Zorunludur.");
		document.getElementById("email").focus();
		return false;
	}
	var kod=document.getElementById("email").value;
	if ((kod.indexOf ('@',0) == -1) || (kod.indexOf('.',0) == -1) || (kod.indexOf(' ',0) != -1) || (kod.length<6)){
		alert ("E-Mail Adresinde Hata Bulunmaktadır.");
		document.getElementById("email").focus();
		return false;
	}
	var epostad="1234567890abcdefghijklmnopqrstuvyzxwABCDEFGHIJKLMNOPQRSTUVYZXW.@_-";
	for (var i=0;i<kod.length;i++){
	if (epostad.indexOf (kod.substr(i,1),0) == -1){
        alert ("E-Mail Adresinde Hata Bulunmaktadır.");
       	document.getElementById("email").focus();
		return false;
		}
	}
	var atler = 0;
	for (var i=0;i<kod.length;i++) if (kod.substr(i,1) == '@') atler = atler + 1;
	if (atler > 1){
		alert ("E-Mail Adresinde Hata Bulunmaktadır.");
       	document.getElementById("email").focus();
		return false;
	}
	var at, nokta
	at =  kod.indexOf('@',0)
	nokta = kod.indexOf('.',at)
	if ((at < 1) || (nokta-at) < 2 ) {
		alert ("E-Mail Adresinde Hata Bulunmaktadır.");
       	document.getElementById("email").focus();
		return false;
	}
	var noktavar = true;
	if (''+document.getElementById("email").value.charAt(0)=='.') noktavar = false;
	if (''+document.getElementById("email").value.charAt(document.getElementById("email").value.length-1)=='.') noktavar = false;
	if (noktavar == false){
		alert("E-Mail Adresinde Hata Bulunmaktadır.");
		document.getElementById("email").focus();
		return noktavar;
	}
//email
	if (document.getElementById("ehliyet").value == "Var" && document.getElementById("ehliyet_sinif").value == ""){
		window.alert("Ehliyet Sınıfı Yazılması Zorunludur.");
		document.getElementById("ehliyet_sinif").focus();
		return false;
	}
	if (document.getElementById("onay_kod").value == ""){
		window.alert("Onay Kodunu Yazınız.");
		document.getElementById("onay_kod").focus();
		return false;
	}
	if (document.getElementById("onay_kod").value != onay_kod_deger){
		window.alert("Onay Kodunu Yanlış Yazdınız.");
		document.getElementById("onay_kod").focus();
		return false;
	}
	return true;	
}
