/*
==========
Ajax的主类
==========
*/
var Http_Request;//http请求对象
var XMLDocument;//响应结果变量
function AjaxCls()
{
   this.sendUrl="";//URL请求地址
   //获得请求对象
   this.getRequest=function()
   {
       Http_Request=null;
       if(window.XMLHttpRequest)
       {
          Http_Request=new XMLHttpRequest();
          if(Http_Request.overrideMimeType)
             Http_Request.overrideMimeType("text/xml");
       }
       else
       {
          if(window.ActiveXObject)
          {
             try
             {
                Http_Request=new ActiveXObject("Msxml2.XMLHTTP");
             }
             catch(e)
             {
                try
                {
                   Http_Request=new ActiveXObject("Microsoft.XMLHTTP");
                }
                catch(e)
                {
                   Http_Request=null;
                }
             }
          }
       }
   };
   //获得响应对象
   this.getXMLResponse=function()
   {
       Http_Request.onreadystatechange=alertContents;//设置XML响应函数     
       Http_Request.open("get",this.sendUrl,true);//打开URL
       Http_Request.send(null);//发送数据   
   };
}
var oAjax=new AjaxCls();//创建Ajax的对象

