var xmlhttp;

function displayContent(url,div){
	xmlhttp=null;
	// code for Mozilla, etc.
	if (window.XMLHttpRequest) {
	  xmlhttp=new XMLHttpRequest();
	}
	// code for IE
	else if (window.ActiveXObject) {
	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	if (xmlhttp!=null) {
	  xmlhttp.onreadystatechange= function() {state_Change(div);};
	  xmlhttp.open("GET",url,true);
	  xmlhttp.send(null);
	}
}

function state_Change(div) {
	// if xmlhttp shows "loaded"
	if (xmlhttp.readyState==4) {
	  // if "OK"
		if (xmlhttp.status==200) {
			document.getElementById(div).innerHTML = xmlhttp.responseText;
		}
	  	else {
			alert("Problem retrieving data:" + xmlhttp.statusText);
		}
	}
	else {
		document.getElementById(div).innerHTML = "<p>Please Wait....</p>";
	}
}
