//Javascript to retrieve news

var xmlhttp;

function httpReq(url){

	if (window.XMLHttpRequest) { // Mozilla, Opera, IE7
		xmlhttp=new XMLHttpRequest();
		xmlhttp.onreadystatechange = stateChange;
		xmlhttp.open("GET", url, true);
		xmlhttp.send(null);
	} else if (window.ActiveXObject) { // IE 6 or earlier
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		xmlhttp.onreadystatechange = stateChange;
		xmlhttp.open("GET", url, true);
        xmlhttp.send();
	}
	
}

function stateChange(){
	
	if(xmlhttp.readyState==4){ //Action complete - no need for other code as not interested in anything else
		if(xmlhttp.status==200){ //OK - again not interested if anything else returned
			
			//Get DIV
			var newsDiv=document.getElementById("newsContent");
			newsDiv.innerHTML=xmlhttp.responseText;
			
		}
	}

}
