function sendAjax(url,handler) {
	//debug("in sendAjax, url=" + url + "&handler=" + handler);
	if(url=='' || handler=='') return;
	var myRandom=parseInt(Math.random()*99999999);  // cache buster
	//alert("http.onreadystatechange = "+handler+";");
	//if(url.indexOf("?") == -1) connector="?";
	//else
	connector="?";

	url = url.replace("?","&");
	//http_host is globally defined in index.php
	sslState = "http://";
	fullUrl = sslState+http_host + "/" + url + connector + "rand=" + myRandom;
	//fullUrl=url + connector + "rand=" + myRandom;
	debug("in sendAjax, fullUrl=" + fullUrl);
	//window.status = "in sendAjax, fullUrl=" + fullUrl + '  handler='+handler;
	//document.getElementById('content').innerHTML = "in sendAjax, fullUrl=" + fullUrl + '  handler='+handler;
	http.open("GET", fullUrl, true);
	eval("http.onreadystatechange = "+handler+";");
	http.send(null);
}

function postAjax(url,params,handler) {
	http.open("POST", url, true);
	http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	http.setRequestHeader("Content-length", params.length);
	http.setRequestHeader("Connection", "close");
	eval("http.onreadystatechange = "+handler+";");
	http.send(params);
}

function sendAjaxFrontend(url,handler) {
	//alert("in sendAjax, url=" + url + "&handler=" + handler);
	if(url=='' || handler=='') return;
	var myRandom=parseInt(Math.random()*99999999);  // cache buster
	//alert("http.onreadystatechange = "+handler+";");
	if(url.indexOf("?") == -1) connector="?";
	else connector="&";

	//http_host is globally defined in index.php
	//fullUrl="https://"+http_host + "/" + url + connector + "rand=" + myRandom;
	fullUrl=url + connector + "rand=" + myRandom;
	debug("in sendAjaxFrontend, fullUrl=" + fullUrl);
	http.open("GET", fullUrl, true);
	eval("http.onreadystatechange = "+handler+";");
	http.send(null);
}

function getHTTPObject() {
var xmlhttp;
/*@cc_on
 @if (@_jscript_version >= 5)
  try {
	  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	  } catch (e) {
	  try {
		  xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		  } catch (E) {
		  xmlhttp = false;
		  }
	  } 
 @else
  xmlhttp = false;
 @end @*/
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
 try {
   xmlhttp = new XMLHttpRequest();
   } catch (e) {
   xmlhttp = false;
   }
  }
  return xmlhttp;
}

var http = getHTTPObject(); // We create the HTTP Object

