var http = false;
function getHTTP()
{
	var http = false;

	if(navigator.appName == "Microsoft Internet Explorer")
	{
	  http = new ActiveXObject("Microsoft.XMLHTTP");
	}
	else
	{
	  http = new XMLHttpRequest();
	}
	return http;
}

function SendAjax(method, url, id, loading_image)
{	
	http = getHTTP();
	
    http.open(method, url, true);
    http.onreadystatechange=function()
	{
      if(http.readyState == 4)
	  {	
		result = http.responseText;
		document.getElementById(id).innerHTML=result;
      }
	  else
	  {
		  	document.getElementById(id).innerHTML="<img src='"+loading_image+"' border='0'>";			
	  }
   }
   
   http.send(null);
}