 function getHTTPObject() {
/*@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 @*/
  var xmlhttp;
  if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
    try {
      xmlhttp = new XMLHttpRequest();
    } catch (e) {
      xmlhttp = false;
    }
  }
  return xmlhttp;
}


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

// ajax(spanID+'reply', commentsPostURL+'?comment='+comment+'&parent='+parent+'&what='+what+'&name='+name, '[please wait]');
function ajax( element , url , params , message , type ) {
	currentElement = element;
	document.getElementById(currentElement).innerHTML='';
	document.getElementById(currentElement).innerHTML=message;
	xmlhttp = getHTTPObject();
	if ( type == 1 ) {
  	 xmlhttp.open("POST", url , true);		
	} else {
		 xmlhttp.open("GET", url + "?" + params , true);
	}
	xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
	xmlhttp.onreadystatechange= function() {
		if ( xmlhttp.readyState == 4 ) {
				 results = xmlhttp.responseText;
				 document.getElementById(currentElement).innerHTML = results;
				}
 	}
	if ( type == 1 ) {
		 xmlhttp.send(params);
	} else {
		 xmlhttp.send(null);
	} // else

} // end function ajax
