﻿//首页--政务网站导航--其它ajax
var xmlHttp;
function GetIndex_Link_list(TitleLength,TopNum)
{
    createxmlHttp();
    var url = "/system/GetIndex_Link_list.aspx?TitleLength=" + TitleLength + "&TopNum=" + TopNum;
    xmlHttp.Open("GET", url, true);
    xmlHttp.onreadystatechange = GetIndex_Link_list_Return;
    xmlHttp.send(null);
}

function createxmlHttp()
{
    if (window.xmlHttpRequest) {
        xmlHttp = new xmlHttpRequest();
    }
    else if (window.ActiveXObject) {
        try {
            xmlHttp = new ActiveXObject("Msxml2.xmlHttp");
        }
        catch (e) {

        }
        try {
            xmlHttp = new ActiveXObject("Microsoft.xmlHttp");
        }
        catch (e) {

        }
        if (!xmlHttp) {
            window.alert('错误：不能创建xmlHttprequest对象！');
            return false;
        }
    }
}

function GetIndex_Link_list_Return()
{
    if (xmlHttp.readyState == 4) {
        if (xmlHttp.status == 200) {
            window.document.getElementById("ul_GetIndex_Link_list").innerHTML = (xmlHttp.responseText).toString();
        }
    }
}
