var xmlHttp
// ============================================================
//					doAJAX	                        
//=============================================================
//
// Uses AJAX to call [url] with [params] sending output to [target]
// [target] should be the DOM ID of the container tag
//
//=============================================================


function doAJAX(url,params,target)
{
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
	  {
	  alert ("Your browser does not support AJAX!");
	  return;
	  } 
	  
	var urlout=url;
	urlout=urlout+"?"+params;
	urlout=urlout+"&sid="+Math.random();
	
	
	xmlHttp.open("GET",urlout,false);
	
	xmlHttp.send(null);
	
	xmlHttp.onreadystatechange=stateChanged(target);
} 

function stateChanged(target) 
{ 
	if (xmlHttp.readyState==4)
	{ 
		document.getElementById(target).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;
}