function GetXmlHttpObject(handler)
{
  var objXMLHttp=null
  if (window.XMLHttpRequest)
  {
      objXMLHttp=new XMLHttpRequest()
  }
  else if (window.ActiveXObject)
  {
      objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
  }
  return objXMLHttp
}

function stateChanged()
{ 
  if (xmlHttp.readyState==1 || xmlHttp.readyState==2 || xmlHttp.readyState==3) {
		  if(document.getElementById("MatchReportDIV")) {
			  document.getElementById("MatchReportDIV").innerHTML="<center>Loading...</center>";
		  }		  
  }
  if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
  {    
  			var html = xmlHttp.responseText;
			  if(document.getElementById("MatchReportDIV")) {
				  document.getElementById("MatchReportDIV").innerHTML=html;
			  }
			  
  }
  else {
          //alert(xmlHttp.status);
  }
}

function htmlData(url, qStr)
{

  if (url.length==0)
  {
      document.getElementById("MatchReportDIV").innerHTML="";
      return;
  }
  xmlHttp=GetXmlHttpObject()
  if (xmlHttp==null)
  {
      alert ("Browser does not support HTTP Request");
      return;
  }
  
  url=url+"&"+qStr;
  xmlHttp.onreadystatechange=stateChanged;
  xmlHttp.open("GET",url,true) ;
  xmlHttp.send(null);
}


