function sendHTTPRequest(httpObject, url, pram, doneEvent) {
	httpObject.open("POST", url, true);
	httpObject.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
	if(doneEvent != null)
		httpObject.onreadystatechange = doneEvent;
	httpObject.send(pram);
}

/*	
	parameters:
		httpObject - used to execute ajax request, returned by getHTTPObject()
		serverPage - url of document you are calling including concatinated get variables
		objID - id of dom object to fill with out from serverPage
		doneEvent - function to call upon completion ex. 'functionName()'
*/
function getMyHTML(httpObject, serverPage, objID, doneEvent) {
	httpObject.open("GET", serverPage);
	httpObject.onreadystatechange = function() {
		if (httpObject.readyState == 4 && httpObject.status == 200) {
			if(objID != null)
				document.getElementById(objID).innerHTML = httpObject.responseText;
			if(doneEvent)
				eval(doneEvent);
		}
	}
	httpObject.send(null);
}

/*	
	parameters:
		httpObject - used to execute ajax request, returned by getHTTPObject()
		serverPage - url of document you are calling
		postData - concatinated 'variable=value' list being passed with the request. Variables should be seperated by &.
		objID - id of dom object to fill with out from serverPage
		doneEvent - function to call upon completion ex. 'functionName()'
*/
function postMyHTML(httpObject, serverPage, postData, objID, doneEvent) {
	if(objID != null)
		var obj = document.getElementById(objID);
	httpObject.open("POST", serverPage);
	httpObject.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	httpObject.onreadystatechange = function() {
		if (httpObject.readyState == 4 && httpObject.status == 200) {
			if(objID != null)
				obj.innerHTML = httpObject.responseText;
			if(doneEvent)
				eval(doneEvent);
		}
	}
	httpObject.send(postData);
}

//initiates the XMLHttpRequest object
//as found here: http://www.webpasties.com/xmlHttpRequest
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;
}