/******xmlHttp对象**********/
function XmlHttp()
{
       var xmlHttp = null;
    //非IE浏览器创建XmlHttpRequest对象
    
    if(window.XmlHttpRequest)
    {
         xmlHttp=new XmlHttpRequest();
    }
    //IE浏览器创建XmlHttpRequest对象
    
    if(window.ActiveXObject)
    {
        try
        {
             xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");     
        }
        catch(e)
        {
            try
            {
                 xmlHttp=new ActiveXObject("msxml2.XMLHTTP");
            }
            catch(ex){}
        }
    }
    return xmlHttp;

}


/****************AJAX异步Text无刷新****************/
//type     传输类型 POST/GET 大小写不区分
//uri      传输网址 绝对地址/相对地址
//sendParm 发送数据 可以字符串、btye数据流
//method   函数名称
//传输方式 true(异步)
/**************************************************/

function ExecuteMethod(type,url,sendParm,method)
{
    var result = "未定义错误！";
    var xmlHttp = XmlHttp();
       
    try
    {
       xmlHttp.open(type,url,true);
       xmlHttp.onreadystatechange = function() 
       { 
            if (xmlHttp.readyState == 4 && xmlHttp.status == 200) 
            { 
	            result = xmlHttp.responseText;
	            method(result);
	            xmlHttp = null;
            } 
        }
        xmlHttp.send(sendParm);
    }
    catch(e)
    {
   
    }
}