  var  xmlHttp;
    function createXmlHttpRequest()
    {
       if (window.ActiveXObject)
       {
          try 
		  {
             xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
          }
		  catch (e)
		  {
			   xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
		  } 
       }
       else if (window.XMLHttpRequest)
       {
         xmlHttp = new XMLHttpRequest();
       }
    }

    function HelloAjax(localfile)
    {  
      createXmlHttpRequest();
      xmlHttp.open("Get", localfile, false);
      xmlHttp.send(null);
      document.getElementById("a").innerHTML = xmlHttp.responseText;
    }
	
	function StateChange()
	{
	   if(xmlHttp.readyState<4)
	   {
	     
	     document.getElementById("Msg").innerHTML =  "ÕýÔÚ¼ì²é......";
	   }
	   else if(xmlHttp.readyState==4)
	   {
	      document.getElementById("Msg").innerHTML = xmlHttp.responseText;		 
	   }
	}
	
	function checkUserPost()
	{
	   createXmlHttpRequest();
	   xmlHttp.open("Post","checkuser.asp",true);
	   xmlHttp.onreadystatechange = StateChange;
	   xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	   xmlHttp.send("user="+escape(document.form1.user.value));
	}