var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
  try {
  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
  } catch (e) {
   try {
    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
   } catch (E) {
    xmlhttp = false;
   }
  }
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
  xmlhttp = new XMLHttpRequest();
}

function makeRequest(url, elementID) {
    var targetElement = document.getElementById(elementID);
	targetElement.innerHTML = '<br><br><nobr><b>Searching for events...</b></nobr><br><br>';
	xmlhttp.open("GET", url, true);
    xmlhttp.onreadystatechange = function() {
      if (xmlhttp.readyState == 4) {
	  targetElement.innerHTML = xmlhttp.responseText + '\n';
      }
    }
    xmlhttp.send(null);
}

var timeOutLoad=0;

function makePopRequest(id) {
	if(timeOutLoad==id){
		show(id);
	}
	else{
		displayTimeOut=setTimeout("makePopRequest('"+id+"')",500);
		timeOutLoad=id;
	}
}

function cancelRequest() {
	if(timeOutLoad){
		clearTimeout(displayTimeOut);
		timeOutLoad=0;
	}
}

/*function buildURL(base) {
	var ceiling = document.newUserForm.elements.length;
	var i = 0;
	var getURL = new String;
	getURL = base + "?";
	for(i = 0; i < ceiling; i++) {
		getURL += document.newUserForm.elements[i].name + "=" +  document.newUserForm.elements[i].value + "&";
	}
	makeRequest(getURL, 'messages');
}*/
