var req;
var yorum;
var sx;
var cx;
function Initialize()
{
ShowDiv("loading");
    try
    {req=new ActiveXObject("Msxml2.XMLHTTP");}
    catch(e)
    {
        try
        {req=new ActiveXObject("Microsoft.XMLHTTP");}
        catch(oc)
        {req=null;}
    }

    if(!req&&typeof XMLHttpRequest!="undefined")
    {
        req= new XMLHttpRequest();
		
}
	homedirr =''

} 
function BodyLoad()
{
	ShowDiv("loading");
	SorguGonder('islogin','login');
	HideDiv("loading");
}
function SorguGonder(is,key)
    {
	ShowDiv("loading");
	iss = is
	keyy = key
	td = new Date()
	month = td.getMonth() + 1
	day = td.getDate()
	year = td.getFullYear()
	s = ""
	h=td.getHours()
	m=td.getMinutes()
	as=td.getSeconds()
	tk= month + s + day + s + year + s + h + s + m + s + as
   
	Initialize(); varurl= homedirr + "/ajax.php?islem=" + is + "&t=" + tk + "&tm="+key;

    if(req!=null)
    {
        req.onreadystatechange = Process;
        req.open("GET", varurl, true);
		req.setRequestHeader("Content-type", "application/x-www-form-urlencoded;charset=utf-8");
        req.send(null);
	}
}
function Process(){
		if (req.readyState == 4) { 
      if (req.status == 200) { 
			eval(req.responseText);		
		      } else {
			alert("Hata: " + req.statusText);
      }
    }
}
function ShowDiv(divid)
{
   if (document.layers) document.layers[divid].style.display="inline";
   else document.getElementById(divid).style.display="inline";
}
function HideDiv(divid)
{
   if (document.layers) document.layers[divid].style.display="none";
   else document.getElementById(divid).style.display="none";
}

function DivUpdate(divid,val)
{
   if (document.layers) document.layers[divid].innerHTML=val;
   else document.getElementById(divid).innerHTML=val;
}
function BodyLoad()
{
	ShowDiv("loading");
	HideDiv("loading");
}
