﻿var XMLhttpReq;
function createXMLHttpRequest()
{
    if(window.XMLHttpRequest)
    {
        XMLhttpReq = new XMLHttpRequest();
    }
    else if(window.ActiveXObject)
    {
            try
            {
                XMLhttpReq = new ActiveXObject("Msxm12.XMLHTTP");
            }catch(e)
            {
                try
                {
                    XMLhttpReq = new ActiveXObject("Microsoft.XMLHTTP");
                }catch(e){}
            }
    }
}

function getZSYZTree()
{
    createXMLHttpRequest();
    var url="Ajax/AjaxWebModule.aspx?Action=ZSYZ"
    XMLhttpReq.open("GET", url);
    XMLhttpReq.onreadystatechange = processResponse;
    XMLhttpReq.send(null);
}

//相应函数
function processResponse()
{
    if(XMLhttpReq.readyState == 4)//判断对象状态
    {
        if(XMLhttpReq.status == 200) //信息返回成功，开始处理
        {
            var res = XMLhttpReq.responseText;
            document.getElementById("ml").src="images/left_zsyz.gif";
            document.getElementById("myTree").innerHTML="";
            document.getElementById("myTree").innerHTML = res;
        }
        else
        {
            window.alert("您所请求的页面异常");
        }
    }
}