var TIME = 1;
var CROWDMAXSHOWCNT = 5;
var ZONEMAXSHOWCNT = 4;
var CRAZESEARCH_SHOWCNT = 10;
var FOCUSEVENT_SHOWCNT = 10;
var CHARACTER_SHOWCNT = 10;
var AMUSEMENT_SHOWCNT = 10;
var LIFE_SHOWCNT = 10;
var NEWSTITLE_LEN = 46;
var BAIKELEMMA_LEN = 46;
var KEYWORDSL_EN = 16;
var FIXEDWORDS = "更多";
var AjaxMan = new AjaxManage();
this.hasCacheData = false;
//window.onload = init;
Data = {};
Data.flashData = null;
function init() {
    var b = new Event();
    b.AddEvent("BORDER_OBJ_ID", "onmouseover", "EventOver", "over");
    b.AddEvent("BORDER_OBJ_ID", "onmouseout", "EventOut", "over");
    b.AddEvent("BLUEBA_OBJ_ID", "onmouseover", "EventOver", "over-g");
    b.AddEvent("BLUEBA_OBJ_ID", "onmouseout", "EventOut", "over-g");
    b.AddEvent("BLUEBA_OBJN_ID", "onmouseover", "EventOver", "over-g", "next", "BLUEBA_OBJ_ID");
    b.AddEvent("BLUEBA_OBJN_ID", "onmouseout", "EventOut", "over-g", "next", "BLUEBA_OBJ_ID");
    b.Init();
    if (baidu.swf.create && GetDomObj("flash1")) {
        baidu.swf.create({
            id: "TrendAnalyser1",
            width: "323",
            height: "160",
            ver: "9.0.0",
            errorMessage: "请下载最新的Flash播放器！",
            url: "TrendAnalyser.swf",
            bgcolor: "#FFFFFF",
            wmode: "window",
            allowscriptaccess: "always"
        },
		"flash1")
    }
    var a = 2;
    while (GetDomObj("flash" + a)) {
        baidu.swf.create({
            id: "TrendAnalyser" + a,
            width: "323",
            height: "107",
            ver: "9.0.0",
            errorMessage: "请下载最新的Flash播放器！",
            url: "TrendAnalyser.swf",
            bgcolor: "#FFFFFF",
            wmode: "window",
            allowscriptaccess: "always"
        },
		"flash" + a);
        a++
    }
}
function turnPage(l, a, h, e) {
    var p = 470;
    var o = 6;
    var g = 14;
    var f = 0;
    var i = GetDomObj(a);
    var j = i.getElementsByTagName("li");
    var b = false;
    if (e) {
        p = e
    }
    switch (h) {
        case "previous":
            var q = false;
            for (var c = 0; c < j.length; c++) {
                var k;
                var d = false;
                if ((j[c].style.display == "block" || j[c].style.display == "") && q == false) {
                    if (c > 0) {
                        j[c - 1].style.display = "block"
                    }
                    if (c == 1) {
                        l.className = "to-l-not"
                    }
                    q = true;
                    d = true
                }
                if (q == true) {
                    if (d == true && c > 0) {
                        f = strLen(j[c - 1].innerHTML) * o
                    }
                    k = strLen(j[c].innerHTML);
                    if (f == 0) {
                        f += k * o
                    } else {
                        if (f + (k * o) + g <= p && b == false) {
                            f += k * o + g;
                            if (l.nextSibling != null) {
                                l.nextSibling.className = "to-r-not"
                            }
                        } else {
                            if (l.nextSibling != null) {
                                l.nextSibling.className = "to-r-can"
                            }
                            j[c].style.display = "none";
                            b = true
                        }
                    }
                }
            }
            for (var c = j.length - 1; c >= 0; c--) {
                if (j[c].style.display == "none" && j[c].className == "on" && (c - 1) >= 0) {
                    nTabs(j[c - 1], (c - 1));
                    j[c - 1].onmouseover()
                }
            }
            break;
        case "next":
            var s = -1;
            var r = -1;
            var k;
            for (var c = 0; c < j.length; c++) {
                if (j[c].style.display == "block" || j[c].style.display == "") {
                    s = c
                }
                if (s >= 0 && j[c].style.display == "none") {
                    r = c;
                    if (c == j.length - 1) {
                        l.className = "to-r-not"
                    }
                    j[c].style.display = "block";
                    break
                }
            }
            if (r >= 0) {
                for (var c = r; c >= 0; c--) {
                    k = strLen(j[c].innerHTML);
                    if (f == 0) {
                        f += k * o
                    } else {
                        if (f + (k * o) + g <= p && b == false) {
                            f += k * o + g;
                            if (l.previousSibling != null) {
                                l.previousSibling.className = "to-l-not"
                            }
                        } else {
                            if (l.previousSibling != null) {
                                l.previousSibling.className = "to-l-can"
                            }
                            j[c].style.display = "none";
                            b = true
                        }
                    }
                }
            }
            for (var c = 0; c < j.length; c++) {
                if (j[c].style.display == "none" && j[c].className == "on" && (c + 1) <= j.length - 1) {
                    nTabs(j[c + 1], (c + 1));
                    j[c + 1].onmouseover()
                }
            }
            break;
        default:
            break
    }
}
function linkage(g, a, b, c, e, f) {
    var d = new LinkageEvent(g, a, b, c, e, f);
    d.Init()
}
function LinkageEvent(f, a, b, c, d, e) {
    this.id1 = f;
    this.id2 = a;
    this.crowdTabId = b;
    this.moreMenuId = c;
    this.index = e;
    this.obj1 = GetDomObj(f);
    this.obj2 = GetDomObj(a);
    this.crowdTabobj = GetDomObj(b);
    this.bid = d;
    if (this.obj1 == null || this.obj2 == null || this.crowdTabobj == null) {
        alert("对象ID不正！")
    }
}
LinkageEvent.prototype.Init = function () {
    this.Init1();
    this.Init2()
};
LinkageEvent.prototype.Init1 = function (b) {
    var c;
    if (!b) {
        b = AjaxMan.add(this, this.Init1, AjaxMan.getArgument(), this.index + "1", AjaxMan.GetVaneUrl(this.bid, "1"));
        return
    }
    var d = this.obj1.getElementsByTagName("li");
    if (b != null) {
        for (var f = 0; f < d.length; f++) {
            var e = d[f];
            if (f == 0) {
                c = e
            }
            if (b[f] != null) {
                this.Event(e, this.id1, this.moreMenuId, f, this.index, b[f].subbid, 1, 1);
                e.innerHTML = b[f].attname
            } else {
                this.ClearEvent(e, this.id1, f, 1)
            }
        }
        var a = this.crowdTabobj.getElementsByTagName("li");
        for (var g = 0; g < a.length; g++) {
            var e = a[g];
            e.onmouseover();
            break
        }
        if (c != null) {
            c.onmouseover()
        }
    }
};
LinkageEvent.prototype.Init2 = function (a) {
    var c;
    if (!a) {
        a = AjaxMan.add(this, this.Init2, AjaxMan.getArgument(), this.index + "2", AjaxMan.GetVaneUrl(this.bid, "2"));
        return
    }
    var b = this.obj2.getElementsByTagName("li");
    if (a != null) {
        for (var e = 0; e < b.length; e++) {
            var d = b[e];
            if (e == 0) {
                c = d
            }
            if (a[e] != null) {
                if (e < ZONEMAXSHOWCNT) {
                    if (a[e] != null) {
                        this.Event(d, this.id2, this.moreMenuId, e, this.index, a[e].subbid, 1, 2);
                        d.innerHTML = a[e].attname
                    }
                } else {
                    this.Event(d, this.id2, this.moreMenuId, e, this.index, this.bid, 2);
                    d.innerHTML = FIXEDWORDS
                }
            } else {
                this.ClearEvent(d, this.id2, e, 2)
            }
        }
        if (c != null) {
            c.onmouseover()
        }
    }
};
LinkageEvent.prototype.ClearEvent = function (c, d, e, a, f) {
    if (!f) {
        f = ""
    }
    if (c != null) {
        if (e == 0) {
            nMyTabs(c, e)
        }
        if (e == ZONEMAXSHOWCNT && a == 2) {
            c.className = "nor gray";
            c.innerHTML = ""
        } else {
            c.innerHTML = f
        }
        var b = GetDomObj(d + "-cont-" + e);
        if (b) {
            b.innerHTML = f
        }
        c.onmouseover = function () { };
        c.onmouseout = function () { }
    }
};
LinkageEvent.prototype.Event = function (j, d, e, h, g, i, f, c) {
    var a = j;
    var b = h;
    if (f == 1) {
        a.onmouseover = function () {
            (function () {
                nMyTabs(a, b);
                setInfoToPage(d + "-cont-" + b, i, g, c)
            })()
        }
    } else {
        a.onmouseover = function () {
            (function () {
                setMoreInfoToPage(a, e, d + "-cont-" + ZONEMAXSHOWCNT, i, g);
                mouseOver(e)
            })()
        };
        a.onmouseout = function () {
            (function () {
                mouseOut(e, a)
            })()
        }
    }
};
function initFloat(b, d, a, w) {
    var c = new FloatEvent(b, d, a, w);
    c.Init();
    b.onmouseover()
}
function setFlashData() {
    if (Data.flashData != null) {
        var a = Data.flashData;
        return a
    } else {
        return -1
    }
}
function FloatEvent(b, a, c, w) {
    this.obj = b;
    this.id = a;
    this.urlParmater = c;
    this.word = w;
    this.floatObj = GetDomObj(a)
}
FloatEvent.prototype.Init = function () {
    var f = this.MouseOverHover;
    var d = this.MouseOutHover;
    var a = this.GetChildNodeFirstTable;
    var e = this.obj;
    var b = this.id;
    var g = this;
    var c = this.urlParmater;
    var w = this.word;
    this.obj.onmouseover = function () {
        f(e, b, c, a, w)
    };
    this.obj.onmouseout = function () {
        d.call(g, e, b)
    };
    this.floatObj.onmouseover = function () {
        f(null, b)
    };
    this.floatObj.onmouseout = function () {
        d.call(g, null, b)
    }
};
FloatEvent.prototype.MouseOverHover = function (obj, id, urlParmater, getTable, word) {
    var callBack = function (obj, id, getTable, data) {
        var leftInfo = null;
        var leftBean = null;
        var tblObj = null;
        leftInfo = data;
        if (leftInfo == null || leftInfo.length == 0) {
            return -1
        }
        tblObj = getTable(id);
        if (tblObj == null) {
            return -1
        }
        leftBean = leftInfo[0];
        tblObj.rows[0].cells[0].innerHTML = "<a class='details' href='" + leftBean.detailUrl + "' target='_blank'></a>";
        tblObj.rows[1].cells[0].innerHTML = "<strong>今日搜索：</strong>" + leftBean.searchCountYesterday;
        tblObj.rows[1].cells[1].innerHTML = "<strong>最近七日：</strong>" + leftBean.searchCount7Days;
        tblObj.rows[2].cells[0].innerHTML = "<strong>新闻：</strong><a href='" + leftBean.newsLink + "' target='_blank'>" + mySubString(leftBean.newsTitle, NEWSTITLE_LEN) + "</a>";
        var keyWords = leftBean.rsWords.split(/,/);
        var keyLinks = leftBean.rsLinks.split(/,/);
        var strKeyWord = "";
        for (var x = 0; x < keyWords.length; x++) {
            strKeyWord += "<li><a href='" + keyLinks[x] + "' target='_blank'>" + mySubString(keyWords[x], KEYWORDSL_EN) + "</a></li>"
        }
        tblObj.rows[4].cells[0].innerHTML = "<ul>" + strKeyWord + "</ul><div class='cl'></div>";
        tblObj.rows[5].cells[0].innerHTML = "<strong>百科：</strong><a href='" + leftBean.baikeUrl + "' target='_blank'>" + mySubString(leftBean.baikeLemma, BAIKELEMMA_LEN) + "</a></td>";
        var data1 = eval("(" + leftBean.indexData + ")");
        Data.flashData = data1
    };
    if (lastFloatObj != null) {
        lastFloatObj.className = ""
    }
    var tblObj = null;
    if (obj != null) {
        Data.flashData = [];
        lastFloatObj = obj;
        tblObj = getTable(id);
        tblObj.rows[0].cells[0].innerHTML = "<a class='details' href='' target='_blank'></a><span style='margin-left:100px;color:#000000;'>数据正在加载...</span>";
        tblObj.rows[1].cells[0].innerHTML = "<strong>今日搜索：</strong>";
        tblObj.rows[1].cells[1].innerHTML = "<strong>最近七日：</strong>";
        tblObj.rows[2].cells[0].innerHTML = "<strong>新闻：</strong>";
        tblObj.rows[4].cells[0].innerHTML = "<ul></ul><div class='cl'></div>";
        tblObj.rows[5].cells[0].innerHTML = "<strong>百科：</strong></td>";
        AjaxMan.add(null, callBack, AjaxMan.getArgument(obj, id, getTable), "float", AjaxMan.GetFloatUrl(urlParmater, word))
    }
    lastFloatObj.className = "hover";
    var floatObj = GetDomObj(id);
    floatObj.removeAttribute("style");
    floatObj.style.display = "block";
    floatObj.className = "float";
    strFloat += id
};
FloatEvent.prototype.MouseOutHover = function (e, b, a) {
    var d = this.MouseOutHover;
    var f = this;
    if (a == null) {
        strFloat = str.replace(b, "");
        if (e != null) {
            lastFloatObj = e
        }
    }
    var c = GetDomObj(b);
    if (a == null || strFloat.indexOf(b) != -1) {
        setTimeout(function () {
            d.call(f, e, b, "1")
        },
		50)
    } else {
        lastFloatObj.className = "";
        c.style.position = "absolute";
        c.style.top = "-10000px"
    }
};
FloatEvent.prototype.GetChildNodeFirstTable = function (b) {
    var c = GetDomObj(b);
    var a = null;
    if (c != null) {
        for (var d = 0; d < c.childNodes.length; d++) {
            if (c.childNodes[d].nodeName.toUpperCase() == "TABLE") {
                a = c.childNodes[d]
            }
        }
    }
    return a
};
var strFloat = "";
var lastFloatObj;
var str = "";
var lastUpObj;
function mouseOut(b, c, a) {
    if (a == null) {
        str = str.replace(b, "");
        if (lastUpObj == null) {
            lastUpObj = c
        }
        setTimeout("mouseOut('" + b + "',null,1)", TIME)
    } else {
        if (str.indexOf(b) == -1) {
            var d = GetDomObj(b);
            d.style.display = "none";
            if (lastUpObj != null && lastUpObj.className.indexOf("on") != -1) {
                lastUpObj.className = "on down";
                lastUpObj = null
            } else {
                if (lastUpObj != null && lastUpObj.className.indexOf("nor") != -1) {
                    lastUpObj.className = "nor down";
                    lastUpObj = null
                }
            }
        }
    }
}
function mouseOver(b, c) {
    var a = GetDomObj(b);
    if (c != null) {
        c.className = "on up"
    }
    str += b
}
var infoMoreObj;
function setMoreInfoToPage(g, b, c, f, e) {
    var i = ZONEMAXSHOWCNT;
    var d = ShowCnt(e);
    if (d == -1) {
        return -1
    }
    if (infoMoreObj == null) {
        infoMoreObj = new CityInfo(g, b, i, c)
    } else {
        infoMoreObj.obj = g;
        infoMoreObj.id = b;
        infoMoreObj.cnt = i;
        infoMoreObj.id2 = c
    }
    infoMoreObj.type = 2;
    infoMoreObj.bid = f;
    var a = g.parentNode.id;
    var j = document.getElementById(a).getElementsByTagName("li");
    for (var h = 0; h < j.length; h++) {
        if (j[h].className == "on") {
            if (g.innerHTML.replace(/ /g, "") == FIXEDWORDS) {
                document.getElementById(a + "-cont-" + (j.length - 1)).innerHTML = document.getElementById(a + "-cont-" + h).innerHTML
            }
        }
    }
    nMyTabs(g, 4);
    if (b != null) {
        infoMoreObj.ShowCity(e)
    }
}
function ShowCnt(b) {
    var a = -1;
    switch (b) {
        case 1:
            a = CRAZESEARCH_SHOWCNT;
            break;
        case 2:
            a = FOCUSEVENT_SHOWCNT;
            break;
        case 3:
            a = CHARACTER_SHOWCNT;
            break;
        case 4:
            a = AMUSEMENT_SHOWCNT;
            break;
        case 5:
            a = LIFE_SHOWCNT;
            break;
        default:
            a = LIFE_SHOWCNT;
            break
    }
    return a
}
function setInfoToPage(d, a, e, c) {
    var b = new CityInfo();
    if (d != null && a != null) {
        b.ShowDetail(a, d, e, null, c)
    }
}
function CityInfo(c, b, d, e, a) {
    this.obj = c;
    this.id = b;
    this.cnt = d;
    this.id2 = e;
    this.subbid = a;
    this.type;
    this.bid
}
CityInfo.prototype.ShowCity = function (i, e) {
    var d = GetDomObj(this.id);
    var a;
    var g;
    d.innerHTML = "数据正在加载...";
    d.style.display = "block";
    if (!e) {
        e = AjaxMan.add(this, this.ShowCity, AjaxMan.getArgument(i), i + "ShowCity" + this.type, AjaxMan.GetVaneUrl(this.bid, this.type));
        return
    }
    if (e == null || e.length == 0) {
        return -1
    }
    d.innerHTML = "";
    for (var b = 0; b < e.length; b++) {
        a = e[b];
        g = document.createElement("a");
        if (b < this.cnt || a.attname == this.obj.innerHTML) {
            g.disabled = false;
            g.className = "haved"
        } else {
            var c = this.obj;
            var h = g;
            var j = this;
            var f = this.id2; (function () {
                var l = a.attname;
                var k = a.subbid;
                g.onclick = function () {
                    (function () {
                        c.innerHTML = l;
                        h.disabled = true;
                        h.className = "";
                        c.className = "on down";
                        d.style.display = "none";
                        j.ShowDetail.call(j, k, f, i)
                    })()
                }
            })()
        }
        g.appendChild(document.createTextNode(a.attname));
        d.appendChild(g)
    }
};
CityInfo.prototype.ShowDetail = function (f, g, p, i, k) {
    var e = GetDomObj(g);
    var b;
    var a;
    var h;
    var q = e.childNodes.length;
    var j = ShowCnt(p);
    if (j == -1) {
        return -1
    }
    if (e != null) {
        for (var o = q - 1; o >= 0; o--) {
            if (e.childNodes[o].nodeName.toUpperCase() != "DIV") {
                e.removeChild(e.childNodes[o])
            }
        }
    }
    if (!k) {
        k = ""
    }
    if (!i) {
        var l = document.createElement("li");
        l.innerHTML = "数据正在加载...";
        e.appendChild(l);
        i = AjaxMan.add(this, this.ShowDetail, AjaxMan.getArgument(f, g, p), p + "" + k + "ShowDetail", AjaxMan.GetVaneDetailUrl(f));
        return
    }
    if (i == null || i.length == 0) {
        return -1
    }
    var d = null;
    for (var c = 0; c < i.length; c++) {
        if (c >= j) {
            break
        }
        b = i[c];
        a = [];
        if (d == null) {
            d = b.value
        }
        h = document.createElement("li");
        a.push("<span class='title no" + b.order + "'>");
        a.push("<a href='" + b.detailUrl + "' target='_blank'>" + b.itemTitle + "</a>");
        if (b.isNew == 1) {
            a.push("<em class='new'></em>")
        }
        a.push("</span>");
        a.push("<span class='bar'><span style='width: " + (b.value / d).toFixed(2) * 100 + "%;'></span></span>");
        if (b.trend > 0) {
            a.push("<span class='trend rise'></span>")
        } else {
            if (b.trend < 0) {
                a.push("<span class='trend down'></span>")
            } else {
                a.push("<span class='trend fair'></span>")
            }
        }
        h.innerHTML = a.join("");
        a = null;
        e.appendChild(h)
    }
};
var Fe = Fe || {
    version: "201007223",
    emptyFn: function () { }
};
Fe.trim = function (a) {
    if (a == null) {
        a = ""
    } else {
        a = "" + a
    }
    return a.replace(/(^[\s\t\xa0\u3000]+)|([\u3000\xa0\s\t]+$)/g, "")
};
Fe.G = function () {
    for (var a = [], c = arguments.length - 1; c > -1; c--) {
        var b = arguments[c];
        a[c] = null;
        if (typeof b == "object" && b && b.dom) {
            a[c] = b.dom
        } else {
            if ((typeof b == "object" && b && b.tagName) || b == window || b == document) {
                a[c] = b
            } else {
                if (typeof b == "string" && (b = document.getElementById(b))) {
                    a[c] = b
                }
            }
        }
    }
    return a.length < 2 ? a[0] : a
};
Fe.on = function (b, c, a) {
    if (!(b = Fe.G(b))) {
        return b
    }
    c = c.replace(/^on/, "").toLowerCase();
    if (b.attachEvent) {
        b[c + a] = function () {
            a.call(b, window.event)
        };
        b.attachEvent("on" + c, b[c + a])
    } else {
        b.addEventListener(c, a, false)
    }
    return b
};
AjaxManage.prototype.GetFloatUrl = function (b, w) {
    return "float.php?b=" + b + "&w=" + w;
};
AjaxManage.prototype.GetVaneUrl = function (a, b) {
    return "subtitle.php?b=" + a + "&t=" + b
};
AjaxManage.prototype.GetVaneDetailUrl = function (a) {
    return "subitems.php?b=" + a
};
function AjaxManage() {
    this.datas = [];
    this.requests = [];
    this.serialNum = [];
    this.space = "key";
    this.ajax;
    this.maxCnt = 1000;
    this.cnt = 0;
    this.hasOrder = false;
    this.isBusy = false;
    this.waitRequests = [];
    this.isExc = false;
    this.errMsg;
    this.hasCacheData = true;
    this.add = function (i, g, j, b, c, d) {
        if (this.hasOrder == false) {
            this.del(b)
        }
        this.ajax = new Ajax();
        this.ajax.errMsg = this.errMsg;
        this.ajax.errFun = d;
        this.errMsg = "";
        var f = "reqTime=" + new Date().getTime() + this.formatCnt(this.cnt);
        if (j == null) {
            j = new Array()
        }
        var e = new AjaxBean(i, g, j, this.ajax, c);
        this.requests[b + this.space + f] = e;
        this.serialNum[b] = f;
        this.cnt++;
        if (this.cnt == this.maxCnt) {
            this.cnt = 0
        }
        this.ajax.async = true;
        if (this.datas[c] != null) {
            this.Callback(this.datas[c], f, b)
        } else {
            if (this.hasOrder == false) {
                this.ajax.Send(c, this, f, b)
            } else {
                var h = this.push(this.ajax, c, this, f, b);
                this.waitRequests[b + this.space + f] = h;
                if (this.isExc == false) {
                    this.setTimeou()
                }
            }
        }
    };
    this.setTimeou = function () {
        this.isExc = true;
        var d = 0;
        if (this.isBusy == false) {
            for (var e in this.waitRequests) {
                e = e + "";
                if (this.waitRequests[e] != null) {
                    this.isBusy = true;
                    this.waitRequests[e]();
                    delete this.waitRequests[e];
                    break
                }
            }
        }
        for (var e in this.waitRequests) {
            d++
        }
        if (d > 0) {
            var c = this;
            var b = this.setTimeou;
            setTimeout(function () {
                b.call(c)
            },
			50)
        } else {
            this.isExc = false
        }
    };
    this.push = function (i, g, d, e, c) {
        var b = i.Send;
        var h = i;
        var f = function () {
            b.call(h, g, d, e, c)
        };
        return f
    };
    this.formatCnt = function (c) {
        if (c == null) {
            return null
        }
        for (var b = 0; b < (this.maxCnt + "").length; b++) {
            if ((c + "").length < (this.maxCnt + "").length) {
                c = "0" + c
            }
        }
        return c
    };
    this.del = function a(b) {
        if (!this.requests || !b) {
            return 0
        }
        for (var c in this.requests) {
            c = c + "";
            if (c.indexOf(b + this.space) != -1 && this.requests[c] != null) {
                this.requests[c].ajax.request.abort();
                delete this.requests[c]
            }
        }
    };
    this.getArgument = function () {
        return arguments
    }
}
function AjaxBean(b, a, e, c, d) {
    this.handle = b;
    this.fun = a;
    this.argums = e;
    this.ajax = c;
    this.url = d
}
AjaxManage.prototype.Callback = function (data, key, serialNum) {
    if (this.serialNum[serialNum] != key && this.hasOrder == false) {
        if (this.requests != null && this.requests[serialNum + this.space + key] != null) {
            delete this.requests[serialNum + this.space + key]
        }
        return -1
    }
    var arr = Array();
    var bean = this.requests[serialNum + this.space + key];
    if (!bean || typeof (bean.fun) != "function") {
        return -2
    }
    if (this.hasCacheData == true && Fe.trim(data) != "") {
        this.datas[bean.url] = data
    }
    for (var cn = 0; cn < 10; cn++) {
        if (bean.argums != null && bean.argums.length > cn) {
            arr[cn] = bean.argums[cn]
        } else {
            if (bean.argums != null && bean.argums.length == cn) {
                data = eval("(" + data + ")");
                arr[cn] = data
            } else {
                arr[cn] = null
            }
        }
    }
    if (bean.handle) {
        bean.fun.call(bean.handle, arr[0], arr[1], arr[2], arr[3], arr[4], arr[5], arr[6], arr[7], arr[8], arr[9])
    } else {
        bean.fun(arr[0], arr[1], arr[2], arr[3], arr[4], arr[5], arr[6], arr[7], arr[8], arr[9])
    }
    if (this.requests != null && this.requests[serialNum + this.space + key] != null) {
        delete this.requests[serialNum + this.space + key]
    }
    return -1
};
function Ajax(d) {
    this.request;
    this.callback = d;
    this.hasParameter = false;
    this.errMsg;
    this.errFun;
    if (window.XMLHttpRequest) {
        this.request = new XMLHttpRequest();
        var c = this.request;
        if (Fe && Fe.on) {
            Fe.on(window, "onunload",
			function () {
			    if (c) {
			        c.abort()
			    }
			})
        }
    } else {
        if (window.ActiveXObject) {
            var b = ["MSXML2.XMLHttp.6.0", "MSXML2.XMLHttp.3.0", "MSXML2.XMLHttp.5.0", "MSXML2.XMLHttp.4.0", "Msxml2.XMLHTTP", "MSXML.XMLHttp", "Microsoft.XMLHTTP"];
            var e = false;
            for (var f = 0; f < b.length; f++) {
                try {
                    this.request = new ActiveXObject(b[f]);
                    var c = this.request;
                    if (Fe && Fe.on) {
                        Fe.on(window, "onunload",
						function () {
						    if (c) {
						        c.abort()
						    }
						})
                    }
                    e = true;
                    break
                } catch (a) { }
            }
            if (!e) {
                throw new Error("Your browser do not support XMLHttp")
            }
        }
    }
    this.async = false
}
Ajax.prototype.Send = function (b, j, k, l) {
    var f = "text";
    var d = "get";
    var p = null;
    var q = null;
    var i = "get";
    var e = "application/x-www-form-urlencoded";
    var a;
    if (!k) {
        alert("reqTime不能为空");
        return -1
    }
    if (d && d == "post") {
        i = "post"
    }
    if (i == "post") {
        e += (q ? (";charset=" + q) : "")
    } else {
        if (this.hasParameter == true) {
            if (b.indexOf("?") < 0) {
                b = b + "?"
            }
            var o = b.length - 1;
            if (b.lastIndexOf("&") != o && b.lastIndexOf("?") != o) {
                b = b + "&"
            }
            if (p) {
                b = b + p + "&"
            }
            b = b + k
        }
        p = null
    }
    var g = this.request;
    var r = this.failure;
    var h = this;
    var c = this.errFun;
    this.request.open(i.toUpperCase(), b, this.async);
    this.request.onreadystatechange = function () {
        if (g.readyState != 4) {
            return
        }
        if (g.status >= 200 && g.status < 300) {
            j.isBusy = false;
            a = g.responseText;
            j.Callback(a, k, l)
        } else {
            j.isBusy = false;
            if (c && typeof (c) == "function") {
                c()
            } else {
                r.call(h, g)
            }
        }
    };
    if (i == "post") {
        this.request.setRequestHeader("Content-Type", e)
    }
    this.request.send(null)
};
Ajax.prototype.failure = function (a) {
    if (Fe.trim(this.errMsg) != "") {
        alert(this.errMsg)
    }
};
function Event() {
    this.objNames = new Array();
    this.msg = "";
    this.Property = function (f, c, a, d, e, b) {
        this.name = f;
        this.event = c;
        this.eventName = a;
        this.className = d;
        this.next = e;
        this.nextName = b
    }
}
Event.prototype.Property = function (f, c, a, d, e, b) {
    this.name = f;
    this.event = c;
    this.eventName = a;
    this.className = d;
    this.next = e;
    this.nextName = b
};
Event.prototype.AddEvent = function (f, c, a, d, e, b) {
    if (f == null || f == "") {
        this.msg += "第" + (this.objNames.length + 1) + "次追加，[arguments[0]:name]不能为空\n";
        return
    }
    if (c == null || c == "") {
        this.msg += "第" + (this.objNames.length + 1) + "次追加，[arguments[1]:event]不能为空\n";
        return
    }
    if (a == null || a == "") {
        this.msg += "第" + (this.objNames.length + 1) + "次追加，[arguments[2]:eventName]不能为空\n";
        return
    }
    if (d == null || d == "") {
        this.msg += "第" + (this.objNames.length + 1) + "次追加，[arguments[3]:nameclassName]不能为空\n";
        return
    }
    this.objNames[this.objNames.length] = new this.Property(f, c, a, d, e, b)
};
Event.prototype.Init = function () {
    if (this.msg != "") {
        alert(this.msg);
        return
    }
    for (m = 0; m < this.objNames.length; m++) {
        var b = this.objNames[m];
        var a = document.getElementsByName(b.name);
        if (a != null && a.length != null) {
            for (n = 0; n < a.length; n++) {
                this.Events(b.event, a[n], b)
            }
        } else {
            if (a != null) {
                this.Events(b.event, a, b)
            }
        }
    }
};
Event.prototype.Events = function (event, obj, nameObj) {
    var f = eval("this." + nameObj.eventName);
    var className = nameObj.className;
    var next = nameObj.next;
    var nextName = nameObj.nextName;
    var tmpObj = obj;
    switch (event) {
        case "onmouseover":
            tmpObj.onmouseover = function () {
                (function () {
                    f(tmpObj, className, next, nextName)
                })()
            };
            break;
        case "onmouseout":
            tmpObj.onmouseout = function () {
                (function () {
                    f(tmpObj, className, next, nextName)
                })()
            };
            break;
        default:
            break
    }
};
Event.prototype.EventOver = function (c, d, b, e) {
    var a = c;
    if (e != null && e == "next") {
        a = this.getNextObj(a, b)
    }
    if (a != null) {
        a.className += " " + d
    }
};
Event.prototype.EventOut = function (c, d, b, e) {
    var a = c;
    if (e != null && e == "next") {
        a = this.getNextObj(a, b)
    }
    if (a != null) {
        a.className = a.className.replace(d, "")
    }
};
Event.prototype.getNextObj = function (d, b) {
    var a = 100;
    var c = d;
    while (c != null && c.id != b && a > 1) {
        c = c.nextSibling;
        a--
    }
    return c
};
function GetDomObj(a) {
    return document.getElementById(a)
}
function nMyTabs(c, a) {
    var b = c.parentNode.id;
    var e = document.getElementById(b).getElementsByTagName("li");
    for (var d = 0; d < e.length; d++) {
        if ((e.length - 1) == d && e[d] == c) {
            e[d].className = "on up";
            document.getElementById(b + "-cont-" + (e.length - 1)).style.display = "block"
        } else {
            if ((e.length - 1) == d && e[d] != c) {
                e[d].className = "nor down";
                document.getElementById(b + "-cont-" + (e.length - 1)).style.display = "none"
            } else {
                if (e[d] == c) {
                    e[d].className = "on";
                    document.getElementById(b + "-cont-" + d).style.display = "block"
                } else {
                    e[d].className = "nor";
                    document.getElementById(b + "-cont-" + d).style.display = "none"
                }
            }
        }
    }
}
function mySubString(c, d) {
    if (c == null) {
        return ""
    }
    c = c.replace(/ /g, "");
    if (strLen(c) > d) {
        var a = 0;
        var f = "";
        for (var e = 0; e < c.length; e++) {
            var b = c.charCodeAt(e);
            if ((b >= 0 && b < 129) || (b == 63728) || (b >= 65377 && b < 65440) || (b >= 63729 && b < 63732)) {
                a += 1
            } else {
                a += 2
            }
            if (a + 2 <= d) {
                f += c.charAt(e)
            } else {
                break
            }
        }
        return f + ".."
    } else {
        return c
    }
}
function strLen(d) {
    var c = 0;
    for (var a = 0; a < d.length; a++) {
        var b = d.charCodeAt(a);
        if ((b >= 0 && b < 129) || (b == 63728) || (b >= 65377 && b < 65440) || (b >= 63729 && b < 63732)) {
            c += 1
        } else {
            c += 2
        }
    }
    return c
}
function isEmpty() {
    if (str == null || str.replace(/(^[\s\t\xa0\u3000]+)|([\u3000\xa0\s\t]+$)/g, "") == "") {
        return true
    }
    return false
};

