// This function establishes how the XMLHTTP request will be handled
// depending on whether the client is using IE or not.
function createRequestObject() {
	var req;
	var browser = navigator.appName;
	if(browser == "Microsoft Internet Explorer"){
		req = new ActiveXObject("Microsoft.XMLHTTP");
	}
	else{
		req = new XMLHttpRequest();
	}
	return req;
}

var http = createRequestObject();

// Next, we handle the triggered event. In this case, if JavaScript
// is enabled, we will send the request and wait for a response.
function sndReq(url) {
	http.open('get', url);
	http.onreadystatechange = handleResponse;
	http.send(null);
}

// Normally, you would do something to handle the response from the
// PHP request. In this case, we need to track only debugging
// information should something go wrong. 
function handleResponse() {
	if(http.readyState == 4 && http.responseText!=''){
		// alert(http.responseText);
		// uncomment to help debug your script
	}
}