var my_xmlHttp;
var divObject;

function getMyResponse(url, out) {
	//alert(url);
	my_xmlHttp=GetMyXmlHttpObject();
	if (my_xmlHttp==null) {
  		alert ("Your browser does not support AJAX!");
  		return;
  	}
	url=url+"&sid="+Math.random();
	divObject = out;
	document.getElementById(divObject).innerHTML="<img src='img/ajax-loader2.gif' border='0' style='margin-top: 100px;'>";
	my_xmlHttp.onreadystatechange=my_stateChanged;
	my_xmlHttp.open("GET",url,true);
	my_xmlHttp.send(null);
}

function my_stateChanged() {
	if (my_xmlHttp.readyState==4) {
		document.getElementById(divObject).innerHTML=my_xmlHttp.responseText;
	}
}

function GetMyXmlHttpObject() {
	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;
}