var xmlHttp;

function giris(str,str2)
{ 
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
 {
 alert ("Tarayıcınız HTTP isteğini desteklememektedir");
 return;
 }
var url="loginajx.php";
url=url+"?emailx="+str+"&sifrex="+str2;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}

function stateChanged() 
{
	
	if (xmlHttp.readyState==1)
 { 
	 document.getElementById('yazi').innerHTML="";
 document.getElementById('yazi1').innerHTML='Giriş Yapılıyor...<img src="ajxloader.gif" width="20" height="20">';
setTimeout ( "sonuc()", 3500 );


} 
}
function sonuc()
{
	if (xmlHttp.readyState==4)
 { 
 
  document.getElementById('yazi1').innerHTML="";
  document.getElementById('yazi').innerHTML=xmlHttp.responseText;


if (xmlHttp.responseText=="E-mail adresinizi yanlış girdiniz")

{
 document.getElementById('yazi').innerHTML=xmlHttp.responseText;
	
	
	}

if (xmlHttp.responseText=="OK")

{
 document.getElementById('yazi').innerHTML='<strong>Bilgileriniz Doğrulandı</strong>,yönlendiriliyorsunuz';
	setTimeout ( 'window.location.href="profil.php"', 3500 );
	
	}
	
	
	if (xmlHttp.responseText=="Şifrenizi Yanlış Girdiniz")

{
 document.getElementById('yazi').innerHTML=xmlHttp.responseText;
	
	
	}
	
	
 } 


	
	}
	
	
		
	
		
	
 

function GetXmlHttpObject()
{
var xmlHttp=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}