function xmlhttpGet(strURL, loading) {
    var xmlHttpReq = false;
    var self = this;
    if (window.XMLHttpRequest) {
	self.xmlHttpReq = new XMLHttpRequest();
    }
    else if (window.ActiveXObject) {
      self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
    self.xmlHttpReq.open('GET', strURL, true);
	self.xmlHttpReq.onreadystatechange = function() {
          if (self.xmlHttpReq.readyState == 4) {
            updatepage(self.xmlHttpReq.responseText);
        }
		else{
			updatepage(loading);

		}
    }
    self.xmlHttpReq.send(null);
}
function updatepage(str){

	if (str=="#REDIRECT#") {
	alert("text")
	}
	else{
    document.getElementById("result").innerHTML = str;
}
}
