function ajax_request(theScript,sync) {
	var xmlhttp;
	xmlhttp = GetXmlHttpObject();
	if (xmlhttp==null) {alert("Your browser does not support XMLHTTP!");}
	
	if (sync == true) {
		xmlhttp.onreadystatechange=function() {
			if(xmlhttp.readyState == 4) {
				script_response = xmlhttp.responseText;
				return script_response;
			}
		}
	}
	
	xmlhttp.open("GET",theScript,sync);
	xmlhttp.send(null);
	if (sync == false) {return xmlhttp.responseText;}
}



function GetXmlHttpObject() {
	if (window.XMLHttpRequest) {
  		// code for IE7+, Firefox, Chrome, Opera, Safari
 		 return new XMLHttpRequest();
 	}
	else if (window.ActiveXObject) {
  		// code for IE6, IE5
  		return new ActiveXObject("Microsoft.XMLHTTP");
  	}
}