/*
	cillop.ajax v1.0.0 Emir Emiroğlu Nisan, 2007
	Örnek Kullanım:
		<a href="javascript: ajax('banabiseylergetir.php','POST veya GET','burayagetir','lütfen bekleyiniz...');">Naber Dünya?</a>
*/
function ajax(page, method, object, progress)
{
	var xmlhttp = false; 
	try
	{
		xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); 
	}
	catch(e)
	{
		try
		{
			xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); 
		}
		catch(E)
		{
			xmlhttp = false;
		}
	}	
	if(!xmlhttp && typeof XMLHttpRequest!='undefined')
	{
		xmlhttp = new XMLHttpRequest();
	}
	xmlhttp.open(method, page, true);     
	xmlhttp.onreadystatechange = function()
	{
		if(xmlhttp.readyState == 1)
		{
			if(progress)
			{
				document.getElementById(object).innerHTML = progress;
			}
		}
		else if(xmlhttp.readyState==4)
		{	
			var responsetext = xmlhttp.responseText; 
			if(responsetext)
			{
				document.getElementById(object).innerHTML = responsetext;
			}
		}
	}
	xmlhttp.send(null) 
	return;
}

