var _loading = "<img src=loading.gif /> Loading ...";

function newXMLHttp(){
	var xmlHttp = null;

	try{
		xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
	}catch(e){
		try{
			xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
		}catch(e){
			xmlHttp = null;
		}
	}

	if(!xmlHttp && document.createElement)
		xmlHttp = new XMLHttpRequest();
	if(!xmlHttp)
		alert("Can't create connection.");

	return xmlHttp;
}

function divRefresh(divID, url){
	document.getElementById(divID).innerHTML = _loading;
	xmlHttp = newXMLHttp();
	xmlHttp.open("GET", url, false);
	xmlHttp.send(null); 
	document.getElementById(divID).innerHTML = xmlHttp.responseText;
}

