// returns the appropriate XmlHttp object according to the user agent/web browser 
function getSender() {

	var xmlhttp=false;
	
	if (window.ActiveXObject){
		try{
			xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 		} catch (e) {
  				try {
   					xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  				} catch (E) {
   						xmlhttp = false;
  				}
 		}
 	}
 	
 	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
		try {
			xmlhttp = new XMLHttpRequest();
		} catch (e) {
			xmlhttp=false;
		}
	}
	
	if (!xmlhttp && window.createRequest) {
		try {
			xmlhttp = window.createRequest();
		} catch (e) {
			xmlhttp=false;
		}
	}
	
	return xmlhttp;
}

// gets ajax response
function getResponse(url){

	try{
		var sender = getSender();
		if (!sender) {
					return null;
		}
		sender.open("GET", url, false); //synchronous 
		sender.send(null);
		return sender.responseText;  
	} catch( expError )
        {
          alert( expError.number + "   " + expError.description );
        }
}
