var xmlHttp;

if(window.XMLHttpRequest){
	//For Firefox, Safari, Opera
	xmlHttp = new XMLHttpRequest();
}else if(window.ActiveXObject){
	//For IE 5
	xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}else if(window.ActiveXObject){
	//For IE 6+
	xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
}else{
	//Error for an old browser
	alert('Your browser is not IE 5 or higher, or Firefox or Safari or Opera');
}

/*
xmlHttp.onreadystatechange = handleResponse;

function handleResponse(){
	if(xmlHttp.readyState == 1){
		//returned text from the PHP script
		//var response = xmlHttp.responseText;
		handleWaiting();
	}else if(xmlHttp.readyState == 4 && xmlHttp.status == 200){
		//returned text from the PHP script
		var response = xmlHttp.responseText;
	}
}
*/