function startAjax(){
	// returns an ajax object if possible
	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;
}

/*
THE FOLLOWING IS AN EXAMPLE OF USING AJAX:

ajaxObject=startAjax();
if(ajaxObject==null)
{
	alert("Your browser doesn't support AJAX");
	// do whatever needs to be done here
}
else
{
	ajaxObject.open("GET","whatever.php",true); // this requests the document from the server
	ajaxObject.onreadystatechange=stateChanged; // this is a function that's called when the state changes
	ajaxObject.send(null); // sends the request off to the server
}


// the function to catch changes:
function stateChanged()
{
	if(ajaxObject.readyState==4) // the request is complete
	{
		var data=ajaxObject.responseText; // do whatever you like with it!
	}
}
*/
