// Author: PAUL FOSTER
// Date: Feb 5th  2008
// Adapted from the following links
// http://www.codingforums.com/showthread.php?t=71251
// http://www.w3schools.com/ajax/tryit.asp?filename=tryajax_httprequest_js1
var xmlhttp;
function ajax(url){
	xmlhttp=null;
	if (window.XMLHttpRequest)
  {// code for Firefox, Opera, IE7, etc.
  xmlhttp=new XMLHttpRequest();
  }
else if (window.ActiveXObject)
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
if (xmlhttp!=null)
  {
  xmlhttp.onreadystatechange=function(){
	if (xmlhttp.readyState==4){// 4 = "loaded"
  		if (xmlhttp.status==200){// 200 = "OK"
		
		// OLD WAY FRO A SINGLE REQUEST RESPONSE
		//document.getElementById("").innerHTML = xmlhttp.responseText; 
		
		// FOR MULTIPLE REGION REQUESTS Adpated from http://www.seopher.com/articles/multiple_ajax_responses_with_1_request_mootools_and_php
		starResult(xmlhttp.responseText); 
		
			
 		}else{
    		alert("Problem retrieving data:" + xmlhttp.statusText + xmlhttp.readyState + xmlhttp.responseText);
 		}
	}else{
		//document.getElementById(TargetId).innerHTML='<div style="text-align:center; padding:20px;"><img src="../images/loading.gif" /><br><br>Loading...
	}
}
  xmlhttp.open("GET",url,true);
  xmlhttp.send(null);
  }
else
  {
  alert("Your browser does not support XMLHTTP.");
  }
}
