var useGET = true;
var asyncMode = true;
var useStatusBar = true;

function loadData(sUrl) {
	//prompt("call-back",sUrl);
	var req = window.XMLHttpRequest? 
    new XMLHttpRequest(): 
    new ActiveXObject("Microsoft.XMLHTTP");
  req.onreadystatechange = function() {
		//alert(req.readyState);
		switch(req.readyState)
		{
			case 0:
				if(useStatusBar)showStatusbarMSG("The object has been created but has not been initialized because open method has not been called.");
				break;
			case 1:
				if(useStatusBar)showStatusbarMSG("The object has been created but the send method has not been called.");
				break;
			case 2:
				if(useStatusBar)showStatusbarMSG("The send method has been called and the status and headers are available, but the response is not yet available.");
				break;
			case 3:
				if(useStatusBar)showStatusbarMSG("Some data has been received. You can call responseBody and responseText to get the current partial results.");
				break;
			case 4:
				if(useStatusBar)showStatusbarMSG("All the data has been received, and the complete data is available in responseBody and responseText.");
				if(useStatusBar)showStatusbarMSG ("WebTracking's status: OK");
				break;
		}
		//if (req.readyState==4) {
			//loadData('http://vci-internet.the-second.com/WebTracking/default.aspx','')
     //alert(req.readyState);
    //}
		return true;
  }
  if (useGET) {
		req.open("GET",sUrl,asyncMode);
    req.send("");
  } else {
    var post = sUrl.split("?",2);
    req.open("POST",post[0],asyncMode);
    req.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
    req.send(post[1]);
  }
}

function getObj(id) {
  return document.getElementById(id);
} // End getObj

