var xmlHttp2

function showCustCnt()
{ 
xmlHttp2=GetXmlHttpObject();
if (xmlHttp2==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
  var url="/cls/Ajax/ajxCountCustomer.asp";
  url=url+"?sid="+Math.random();

  xmlHttp2.onreadystatechange=stateChangedCount;
  xmlHttp2.open("GET",url,true);
  xmlHttp2.send(null);
}

function stateChangedCount() 
{ 

  if (xmlHttp2.readyState == 1)   // loading
  { 
    document.getElementById("kundeteller").innerHTML="<img src='/images/pleasewait.gif'>";
  }  

  else if (xmlHttp2.readyState == 4)
  { 
    document.getElementById("kundeteller").innerHTML=xmlHttp2.responseText;
  }
}


function GetXmlHttpObject()
{
var xmlHttp2=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp2=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp2=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp2=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp2;
}
