// Basic AJAX code to fill a specified div with content returned by a given URL:
function loadContent(divname, contenturl) 
{
	http_s.open("GET", contenturl, true);
	http_s.onreadystatechange = function() {
			if (http_s.readyState == 4) {	
				var divContent = document.getElementById(divname);
				divContent.innerHTML = http_s.responseText;
			}	
		}

	http_s.send(null);
}

function setContent(divname, content) {
				var divContent = document.getElementById(divname);
				divContent.innerHTML = content;
}	

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_s = getHTTPObject(); // We create the HTTP Object