
function KullaniciAdiKontrol(KullaniciAdi){
	$.ajax({
		type: "GET",
		cache: false,
		url: "uye_ol_kullaniciadi.asp",
		data: "KullaniciAdi="+escape(KullaniciAdi),
		success: function(html){
			if (html=="Uygundur")
			{
				document.getElementById("KullaniciAdi").style.border='1px solid #00CC00'
				$("#KullaniciAdi_Kontrol").html('');
			}
			else{
				document.getElementById("KullaniciAdi").style.border='1px solid #CC0000'
				$("#KullaniciAdi_Kontrol").html(html);
			}
		}
	});
}

function SifreKontrol(Sifre){
	if (Sifre.length > 5 ) {
		document.getElementById("Sifrem").style.border='1px solid #00CC00'
	}
	else{
		document.getElementById("Sifrem").style.border='1px solid #CC0000'
	}
}
 
function AdKontrol(Ad){
	if (Ad.length > 2 ) {
		document.getElementById("AdSoyad").style.border='1px solid #00CC00'
	}
	else{
		document.getElementById("AdSoyad").style.border='1px solid #CC0000'
	}
}

function SifreTekrarKontrol(SifreTekrar){
	if (SifreTekrar.length > 5 && SifreTekrar==document.getElementById("Sifrem").value ) {
		document.getElementById("SifreTekrar").style.border='1px solid #00CC00'
	}
	else{
		document.getElementById("SifreTekrar").style.border='1px solid #CC0000'
	}
}

function MailKontrol(Eposta){
	$.ajax({
		type: "GET",
		cache: false,
		url: "uye_ol_eposta.asp",
		data: "Eposta="+escape(Eposta),
		success: function(html){
			if (html=="Uygundur")
			{
				document.getElementById("Epostam").style.border='1px solid #00CC00'
				$("#Eposta_Kontrol").html('');
			}
			else{
				document.getElementById("Epostam").style.border='1px solid #CC0000'
				$("#Eposta_Kontrol").html(html);
			}
		}
	});
}

function SehirGetir(SehirID) {

	var Ulke = document.getElementById('Ulke')

	if (Ulke.options[Ulke.selectedIndex].value != 0)
	{
		if (SehirBaglanti.readyState == 4 || SehirBaglanti.readyState == 0) {
			SehirBaglanti.open("GET","sehirgetir.asp?SehirID="+SehirID+"&Ulke="+Ulke.options[Ulke.selectedIndex].value+"&rand="+Math.floor(Math.random() * 1000000), true);
			SehirBaglanti.setRequestHeader("Content-type", "application/x-www-form-urlencoded;charset=iso-8859-9");
			SehirBaglanti.onreadystatechange = SehirYerlestir;
			SehirBaglanti.send(null);
		}
		
	}

	if (Ulke.options[Ulke.selectedIndex].value==0){
		document.getElementById("Sehir").style.display='none';
	}



}

function SehirYerlestir() {
	if (SehirBaglanti.readyState == 1) {document.getElementById("Sehir").style.display='';document.getElementById("Sehirler").innerHTML = "<img src='images/yukleniyor.gif' align='center'>";}
	if (SehirBaglanti.readyState == 4) {document.getElementById("Sehirler").innerHTML = SehirBaglanti.responseText;}
}

function getHTTPObject() {
  var xmlhttp;
  /*@cc_on
  @if (@_jscript_version >= 5)
    try {
      xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (E) {
        xmlhttp = false;
      }
    }
  @else
  xmlhttp = false;
  @end @*/
  if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
    try {
      xmlhttp = new XMLHttpRequest();
    } catch (e) {
      xmlhttp = false;
    }
  }
  return xmlhttp;
}

var SehirBaglanti = getHTTPObject();
