<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">

Object.extend = function (destination, source, source1) {
    for (var property in source) {
        destination[property] = source[property];
    }
    if (typeof source1 != undefined) {
        for (var property1 in source1) {
            destination[property1] = source1[property1];
        }
    }
    return destination;
}

var AjaxMsg = {
    AjaxOKTips: {
        title: "【操作成功】",
        cont: "恭喜！{msg}操作已经成功完成"
    },
    AjaxFaileTips: {
        title: "【操作失败】",
        cont: "执行的时候发生了异常错误，操作没有完成"
    },
    NoAjax: {
        title: "【浏览器不支持】",
        cont: "你的浏览器不支持Ajax！"
    },
    AjaxLoading: {
        cont: "操作正在进行中，请稍候片刻……"
    },
    IsEmpty: {
        title: "【不能为空】",
        cont: "{msg}不能为空,请重新填写！"
    },
    Confirm: {
        title: "【操作确认】",
        cont: "该操作不可撤销，确认要继续吗？"
    }
}

var dialogSetting = {
    titlePanl: null,
    title: null,
    Contpanl: null,
    ContpanlId: "CCont",
    cont: null,
    ContUrl: undefined,
    path: "/Images/dialog/",
    posX: 0,
    posY: 0,
    okbtn: null,
    canclebtn: null,
    okTit: "确定",
    width: 0,
    IEwidth: 350,
    height: 0,
    image_zindex: 1000,
    cont_zindex: 2000,
    visibleWidth: 0,
    visibleheight: 0,
    MaxWidth: 0,
    MaxHeight: 0,
    mask_image: null,
    maskId: "mask",
    ifreame: null,
    ifreameId: "mm",
    ismove: false,
    scroll: false,
    num: 0,
    mall: 100,
    _focus: null,
    type: "alert",
    remove: function () { },
    ok: function () {
        this.remove();
    },
    cancle: function () {
        this.remove();
    }
};
var ajaxsetting = {
    url: "/Admin/Admin.ashx",
    param: null,
    data: null,
    method: "post",
    type: "json",
    msg: "",
    showbar: false,
    async: true,
    cache: false,
    result: null,
    ContentType: "application/x-www-form-urlencoded;charset=gb2312",
    ok: function (t) {
        System.Tips({
            Cont: t.msg,
            Type: "Sucess"
        })
    },
    fail: function (t) {
        if (t) {
            System.Tips({
                Cont: t.msg,
                Type: "Error"
            })
        }
        else {
            System.Tips({
                Cont: "服务器发生了严重错误，请联系程序人员",
                Type: "Error"
            })
        }
    }
};
var Tipsetting = {
    BoolMaskDiv: false, //是否有遮罩层
    MaskDivIndex: 2000,
    ContPanelIndex: 2500,
    AutoRemove: true, //是否自动关闭提示层
    Timeout: 2000, //当AutoRemove设置为true时生效，提示层存在的时间
    Type: "Sucess", //可选值为Sucess,Error,Load,Alert
    FontColor: { Sucess: "#107A29", Error: "#FF3C1A", Load: "#107A29", Alert: "#8C5507" },
    Path: "/Images/Tips/",
    BoolScroll: false,
    Cont: null
};
var System = function () { };
System.prototype = {
    BrowserInfo: function () {
        var browser = navigator.userAgent.toLowerCase();
        return {
            ie: (s = browser.match(/msie ([\d.]+)/)) ? s[1] : false,
            Firefox: browser.match(/firefox\/([\d.]+)/),
            chrome: browser.match(/chrome\/([\d.]+)/),
            opera: browser.match(/opera.([\d.]+)/),
            safari: browser.match(/version\/([\d.]+).*safari/),
            webkit: browser.indexOf(' applewebkit/') &gt; -1
        }
    },
    GetIEvision: function () {
        return navigator.appVersion.match(/MSIE (.)/)[1] || navigator.appVersion.match(/MSIE .\.(.)/)[1];
    },
    IsArray: function (a) {
        return Object.prototype.toString.call(a) === "[object Array]";
    },
    DocType: function () {
        return document.compatMode == 'CSS1Compat';
    },
    GetClientSize: function () {
        var isbz = this.DocType();
        if (isbz) {
            return {
                clientWidth: document.documentElement.clientWidth,
                clientHeight: document.documentElement.clientHeight
            };
        } else {
            return {
                clientWidth: document.body.clientWidth,
                clientHeight: document.body.clientHeight
            };
        }
    },
    GetScrollSize: function () {
        var isbz = this.DocType();
        var browser = this.BrowserInfo();
        if (isbz) {
            return {
                scrollWidth: document.documentElement.scrollWidth,
                scrollHeight: document.documentElement.scrollHeight,
                scrollTop: browser.webkit ? (document.documentElement.scrollTop + document.body.scrollTop) : document.documentElement.scrollTop,
                scrollLeft: document.documentElement.scrollLeft
            };
        } else {
            return {
                scrollWidth: document.body.scrollWidth,
                scrollHeight: document.body.scrollHeight,
                scrollTop: browser.webkit ? (document.documentElement.scrollTop + document.body.scrollTop) : document.body.scrollTop,
                scrollLeft: document.body.scrollLeft
            };
        }
    },
    CreatElement: function (tag, Attribute, doc) {
        if (tag == null || tag == undefined) return;
        doc = doc || document;
        var div = doc.createElement(tag);
        for (var i in Attribute) {
            if (Attribute[i] != "") {
                div.setAttribute(i, Attribute[i]);
                if (i == "style") {
                    var s = "";
                    if (typeof Attribute[i] == "string") {
                        s = Attribute[i];
                    } else {
                        for (var j in Attribute[i]) {
                            s += j + ":" + Attribute[i][j] + ";";
                        }
                    }
                    div.style.cssText = s;
                }
            }
        }
        return div;
    },
    LoadJs: function (src, fun, error, ScriptCache) {
        var Scripts = document.getElementsByTagName("script"), b = false;
        for (var i = 0, j = Scripts.length; i &lt; j; i++) {
            if (Scripts[i].src.indexOf(src) &gt; -1) {
                b = true;
                break;
            }
        }
        if (!b) {
            var script = this.CreatElement("script", {
                "type": "text/javascript",
                "src": ScriptCache ? src : src + (src.indexOf('?') == -1 ? "?" : "&amp;") + "sid=" + Math.random()
            });
            this.GetDom("#head").Select().add(script);
            script.onload = script.onreadystatechange = function () {
                if (!script.readyState || /loaded|complete/.test(script.readyState)) {
                    fun &amp;&amp; fun();
                    script.onload = script.onreadystatechange = null;
                }
            }

        }
        else {
            fun &amp;&amp; fun(); //如果JS已经加载过了，那么立刻开始执行回调函数
        }
    },
    isEmptyObject: function (obj) {
        for (var p in obj) {
            return false;
        }
        return true;
    },
    Ajax: function (setting) {
        var s = Object.extend({}, ajaxsetting, setting);
        if (s.url == null) {
            return this;
        }
        if (typeof s.param == "string") {
            s.data = s.param;
        } else if (typeof s.param == "object") {
            var d = "";
            for (var i in s.param) {
                if (d == "") {
                    d += i + "=" + s.param[i];
                } else {
                    d += "&amp;" + i + "=" + s.param[i];
                }
            }
            s.data = d;
        }
        if ((s.data == null || s.data == "") &amp;&amp; s.method == "post") {
            s.method = "Get";
        }
        if (!s.cache) {
            if (s.url.indexOf("?") &gt; 0) {
                s.url += "&amp;sid=" + Math.random();
            } else {
                s.url += "?sid=" + Math.random();
            }
        }
        if (s.method == "Get") {
            if (s.data != null &amp;&amp; s.data != "") {
                if (s.url.indexOf("?") &gt; 0) {
                    s.url += "&amp;" + s.data;
                } else {
                    s.url += "?" + s.data;
                }
            }
        }
        var xmlhttp, xmlhttpGet;
        function creat() {
            var xmlHttpNew = null;
            try {
                xmlHttpNew = new XMLHttpRequest();
            } catch (e) {
                try {
                    xmlHttpNew = new ActiveXObject("Msxml2.XMLHTTP");
                } catch (e) {
                    xmlHttpNew = new ActiveXObject("Microsoft.XMLHTTP");
                }
            }
            return xmlHttpNew;
        }
        xmlhttpGet = creat();
        if (xmlhttpGet == null) {
            var msg = EditorMsg.NoAjax;
            System.Tips({
                Cont: msg.cont,
                Type: "Alert"
            });
        }
        var dialog;
        if (s.showbar) {
            dialog = System.Tips({
                Cont: (s.msg == "" ? AjaxMsg.AjaxLoading.cont : s.msg),
                Type: "Load"
            });
        }
        xmlhttpGet.onreadystatechange = function () {
            if (xmlhttpGet.readyState == 4) {
                if (s.showbar) {
                    dialog.Remove();
                }
                if (xmlhttpGet.status == 200) {
                    s.result = xmlhttpGet.responseText;
                    if (s.type == "json" &amp;&amp; s.result != "") {
                        s.result = System.ToJson(s.result);
                        if (s.result.result == "true") {
                            s.ok(s.result);
                        } else {
                            s.fail(s.result);
                        }
                    }
                }
                else {
                    s.fail();
                }
            }
        }
        xmlhttpGet.open(s.method, s.url, s.async);
        xmlhttpGet.setRequestHeader("Content-Type", s.ContentType);
        xmlhttpGet.setRequestHeader("X-Requested-With", "XMLHttpRequest");
        if (s.method == "post") {
            xmlhttpGet.send(s.data);
        } else {
            xmlhttpGet.send(null);
        }
    },
    ToJson: function (a) {
        var json_parse = (function () {
            var at, ch, escapee = {
                '"': '"',
                '\\': '\\',
                '/': '/',
                b: '\b',
                f: '\f',
                n: '\n',
                r: '\r',
                t: '\t'
            },
			text,
			error = function (m) {
			    throw {
			        name: 'SyntaxError',
			        message: m,
			        at: at,
			        text: text
			    };
			},
			next = function (c) {
			    if (c &amp;&amp; c !== ch) {
			        error("Expected '" + c + "' instead of '" + ch + "'");
			    }
			    ch = text.charAt(at);
			    at += 1;
			    return ch;
			},
			number = function () {
			    var number, string = '';
			    if (ch === '-') {
			        string = '-';
			        next('-');
			    }
			    while (ch &gt;= '0' &amp;&amp; ch &lt;= '9') {
			        string += ch;
			        next();
			    }
			    if (ch === '.') {
			        string += '.';
			        while (next() &amp;&amp; ch &gt;= '0' &amp;&amp; ch &lt;= '9') {
			            string += ch;
			        }
			    }
			    if (ch === 'e' || ch === 'E') {
			        string += ch;
			        next();
			        if (ch === '-' || ch === '+') {
			            string += ch;
			            next();
			        }
			        while (ch &gt;= '0' &amp;&amp; ch &lt;= '9') {
			            string += ch;
			            next();
			        }
			    }
			    number = +string;
			    if (isNaN(number)) {
			        error("Bad number");
			    } else {
			        return number;
			    }
			},
			string = function () {
			    var hex, i, string = '',
				uffff;
			    if (ch === '"') {
			        while (next()) {
			            if (ch === '"') {
			                next();
			                return string;
			            } else if (ch === '\\') {
			                next();
			                if (ch === 'u') {
			                    uffff = 0;
			                    for (i = 0; i &lt; 4; i += 1) {
			                        hex = parseInt(next(), 16);
			                        if (!isFinite(hex)) {
			                            break;
			                        }
			                        uffff = uffff * 16 + hex;
			                    }
			                    string += String.fromCharCode(uffff);
			                } else if (typeof escapee[ch] === 'string') {
			                    string += escapee[ch];
			                } else {
			                    break;
			                }
			            } else {
			                string += ch;
			            }
			        }
			    }
			    error("Bad string");
			},
			white = function () {
			    while (ch &amp;&amp; ch &lt;= ' ') {
			        next();
			    }
			},
			word = function () {
			    switch (ch) {
			        case 't':
			            next('t');
			            next('r');
			            next('u');
			            next('e');
			            return true;
			        case 'f':
			            next('f');
			            next('a');
			            next('l');
			            next('s');
			            next('e');
			            return false;
			        case 'n':
			            next('n');
			            next('u');
			            next('l');
			            next('l');
			            return null;
			    }
			    error("Unexpected '" + ch + "'");
			},
			value,
			array = function () {
			    var array = [];
			    if (ch === '[') {
			        next('[');
			        white();
			        if (ch === ']') {
			            next(']');
			            return array;
			        }
			        while (ch) {
			            array.push(value());
			            white();
			            if (ch === ']') {
			                next(']');
			                return array;
			            }
			            next(',');
			            white();
			        }
			    }
			    error("Bad array");
			},
			object = function () {
			    var key, object = {};
			    if (ch === '{') {
			        next('{');
			        white();
			        if (ch === '}') {
			            next('}');
			            return object;
			        }
			        while (ch) {
			            key = string();
			            white();
			            next(':');
			            if (Object.hasOwnProperty.call(object, key)) {
			                error('Duplicate key "' + key + '"');
			            }
			            object[key] = value();
			            white();
			            if (ch === '}') {
			                next('}');
			                return object;
			            }
			            next(',');
			            white();
			        }
			    }
			    error("Bad object");
			};
            value = function () {
                white();
                switch (ch) {
                    case '{':
                        return object();
                    case '[':
                        return array();
                    case '"':
                        return string();
                    case '-':
                        return number();
                    default:
                        return ch &gt;= '0' &amp;&amp; ch &lt;= '9' ? number() : word();
                }
            };
            return function (source, reviver) {
                var result;
                text = source;
                at = 0;
                ch = ' ';
                result = value();
                white();
                if (ch) {
                    error("Syntax error");
                }
                return typeof reviver === 'function' ? (function walk(holder, key) {
                    var k, v, value = holder[key];
                    if (value &amp;&amp; typeof value === 'object') {
                        for (k in value) {
                            if (Object.hasOwnProperty.call(value, k)) {
                                v = walk(value, k);
                                if (v !== undefined) {
                                    value[k] = v;
                                } else {
                                    delete value[k];
                                }
                            }
                        }
                    }
                    return reviver.call(holder, key, value);
                } ({
                    '': result
                },
				'')) : result;
            };
        } ());
        return json_parse(a);
    },
    GetParentByTagName: function (node, tagName, includeSelf, excludeFn) {
        if (node &amp;&amp; node.nodeType &amp;&amp; !this.GetDom(node).IsBody() &amp;&amp; (node.nodeType == 1 || node.nodeType)) {
            tagName = this.ListToMap(this.IsArray(tagName) ? tagName : [tagName]);
            node = (node.nodeType == 3 || !includeSelf) ? node.parentNode : node;
            while (node &amp;&amp; node.tagName &amp;&amp; node.nodeType != 9) {
                if (tagName[node.tagName] &amp;&amp; !(excludeFn &amp;&amp; excludeFn(node)))
                    return node;
                node = node.parentNode;
            }
        }
        return null;
    },
    IsArray: function (a) {
        ///	&lt;summary&gt;
        ///判断是否为数组
        ///	&lt;/summary&gt;
        return Object.prototype.toString.call(a) === "[object Array]";
    },
    ListToMap: function (list) {
        if (!list) return {};
        list = this.IsArray(list) ? list : list.split(',');
        for (var i = 0, ci, obj = {}; ci = list[i++]; ) {
            obj[ci.toUpperCase()] = obj[ci] = 1;
        }
        return obj;
    },
    GetDom: function (e) {
        return System.GetDom.Init(e);
    }

}
Object.extend(System, System.prototype);
Object.extend(System.GetDom, {
    Init: function (e) {
        if (!e) {
            return this;
        } else {
            var s = [];
            if (typeof e == "string") {
                if (e.indexOf("@") == 0) {
                    var List = document.getElementsByName(e.replace("@", ""));
                    for (var i = 0, j = List.length; i &lt; j; i++) {
                        s.push(List[i]);
                    }
                    this[0] = s;
                }
                else if (e.indexOf("#") == 0) {
                    e = e.replace("#", "");
                    var i = e.indexOf("["), j = e.indexOf("]");
                    if (i != -1 &amp;&amp; j != -1) {
                        var NodeList = document.getElementsByTagName(e.substring(0, i)), a = e.substring(i + 1, j).split('=');
                        a[1] = a[1].replace("'", "").replace("'", "")
                        for (var m = 0, n = NodeList.length; m &lt; n; m++) {
                            var node = NodeList[m];
                            if (node.getAttribute(a[0]) == a[1]) {
                                s.push(node);
                            }
                        }
                        this[0] = s;
                    }
                    else {
                        var List = document.getElementsByTagName(e);
                        for (var i = 0, j = List.length; i &lt; j; i++) {
                            s.push(List[i]);
                        }
                        this[0] = s;
                    }

                }
                else {
                    this[0] = document.getElementById(e);
                }
            } else {
                this[0] = e;
            }
        }
        return this;
    },
    Select: function (index) {
        var a = this[0], node = System.IsArray(a) ? a : [a];
        index = index ? index : 0;
        return System.GetDom(node[index]);
    },
    Click: function (fun) {
        if (this.IsDom()) {
            this[0].onclick = fun;
        }
        return this;
    },
    IsDom: function () {
        return !!(this[0] &amp;&amp; (this[0].nodeType == 1 || this[0].nodeType == 11));
    },
    inDoc: function (doc) {
        var node = this[0];
        while (node = node.parentNode) {
            if (node === doc) {
                return true;
            }
        }
        return false;
    },
    setoverflow: function (a) {
        if (this.IsDom()) {
            this[0].style.overflow = a;
        }
        return this;
    },
    insertAfter: function (node) {
        return this[0].parentNode.insertBefore(node, this[0].nextSibling);
    },
    visable: function () {
        if (this.IsDom()) {
            return this[0].style.display != "none";
        }
    },
    add: function (e) {
        if (this[0] &amp;&amp; this.IsDom()) {
            this[0].appendChild(e);
        }
        return this;
    },
    adds: function (e) {
        if (this[0] &amp;&amp; this.IsDom()) {
            this[0].parentNode.appendChild(e);
        }
        return this;
    },
    remove: function (KeepChild) {
        if (this.IsDom() &amp;&amp; !this.IsNull()) {
            var parents = this[0].parentNode,
		child;
            if (KeepChild &amp;&amp; this[0].hasChildNodes()) {
                while (child = this[0].firstChild) {
                    parents.insertBefore(child, this[0]);
                }
            }
            parents.removeChild(this[0]);
        }
    },

    html: function (htm) {
        if (!System.IsArray(this[0])) {
            if (htm || htm == "0") {
                if (this.IsDom()) {
                    this[0].innerHTML = htm;
                }
                return this;
            } else {
                return this[0].innerHTML;
            }
        } else {
            for (var i = 0, j = this[0].length; i &lt; j; i++) {
                if (htm || htm == "0") {
                    this[0][i].innerHTML = htm;
                }
            }
        }

    },
    get: function (att) {
        return this[0].getAttribute(att=="class" ? "className" : att);
    },
    Text: function (text) {
        if (text) {
            if (System.BrowserInfo().ie) {
                this[0].innerText = (text == " " ? "" : text);
            } else {
                this[0].textContent = (text == " " ? "" : text);
            }
        } else {
            if (System.BrowserInfo().ie) {
                return this[0].innerText;
            } else {
                return this[0].textContent;
            }
        }
    },
    GetSelect: function () {
        if (this[0] != null) {
            if (this[0].options.length &gt; 0) {
                return { value: this[0].options[this[0].selectedIndex].value, text: this[0].options[this[0].selectedIndex].text };
            }
            else {
                return { value: "0", text: "" };
            }
        }
        else {
            return { value: "0", text: "" };
        }
    },
    GetChecked: function () {
        return this[0].checked == true;
    },
    GetRadioListCheckedValue: function () {
        var a = this[0];
        var value = "0";
        for (var i = 0, j = a.length; i &lt; j; i++) {
            if (a[i].checked == true) {
                value = a[i].value;
                break;
            }
        }
        return value;
    },
    HasClass: function (a) {
        return new RegExp("(^|\\s)" + a + "(\\s|$)").test(this[0].className);
    },
    SetClass: function (name) {
        if (typeof name != "object") return this;
        for (var i in name) {
            if (i != "style") {
                if (name[i] != "") {
                    if (i == "class") {
                        this[0].setAttribute("className", name[i]);
                    }
                    this[0].setAttribute(i, name[i]);
                }
            } else {
                this[0].style.cssText = this[0].style.cssText + ";" + name[i];
            }
        }
        return this;
    },
    AddClass: function (name) {
        var class1 = this[0].className;
        this.SetClass({
            "class": class1 + " " + name
        });
        return this;
    },
    RemoveClass: function (name) {
        var class1 = this[0].className.replace(name, "");
        if (class1 == "") {
            this.RemoveAttrubit("class");
        } else {
            this.SetClass({
                "class": class1
            });
        }
        return this;
    },
    SetStyle: function (name) {
        if (typeof name == "object") {
            var s = this[0].style.cssText;
            for (var i in name) {
                if (name[i] != "") {
                    s += ";" + i + ":" + name[i];
                }
            }
            this[0].style.cssText = s;
        } else if (typeof name == "string") {
            if (this.IsDom()) {
                if (!System.BrowserInfo().ie) {
                    this[0].style.cssText += name;
                } else {
                    this[0].style.cssText += ";" + name;
                }
            }
        }
        return this;
    },
    ClearStyle: function (style) {
        if (this.IsDom()) {
            if (!style) {
                this[0].style.cssText = "";
                this.RemoveAttrubit("style");
            } else {
                this[0].style[style] = "";
                if (!this[0].style.cssText) {
                    this.RemoveAttrubit("style");
                }
            }
        }
        return this;
    },
    GetSize: function () {
        if (this.IsDom()) {
            return {
                width: this[0].offsetWidth,
                height: this[0].offsetHeight
            };
        }
    },
    GetclientSize: function () {
        if (this.IsDom()) {
            return {
                clientWidth: this[0].clientWidth,
                clientHeight: this[0].clientHeight
            };
        }
    },
    GetPostion: function () {
        var browser = System.BrowserInfo();
        var top1 = this[0].offsetTop,
            left1 = this[0].offsetLeft;
        while (this[0] = this[0].offsetParent) {
            top1 += this[0].offsetTop;
            left1 += this[0].offsetLeft;
        }
        return {
            top: top1,
            left: left1
        };
    },
    addEvent: function (event, fun) {
        var a = this[0], node = System.IsArray(a) ? a : [a], ie = System.BrowserInfo().ie;
        for (var i = 0, j = node.length; i &lt; j; i++) {
            if (ie) {
                node[i].attachEvent("on" + event, fun);
            } else {
                node[i].addEventListener(event, fun, false);
            }
        }
       
        return this;
    },
    Val: function (value) {
        if (value) {
            if (this.IsDom()) {
                if (value != " ") {
                    this[0].value = value;
                }
                else {
                    this[0].value = "";
                }
            }
        } else {
            if (this.IsDom()) {
                return this[0].value;
            }
            else {
                return "";
            }
        }
    },
    IsEmpty: function () {
        return this.Val() == "";
    },
    IsBody: function () {
        return this[0] &amp;&amp; this[0].nodeType == 1 &amp;&amp; this.GetTagName() == 'body';
    },
    GetTagName: function (Lowser) {
        if (!Lowser) {
            return this[0].tagName.toLowerCase();
        } else {
            return this[0].tagName;
        }
    },
    GetChildCount: function (fn) {
        var count = 0,
		first = this[0].firstChild;
        fn = fn ||
		function () {
		    return 1;
		}
        while (first) {
            if (fn(first)) {
                count++;
            }
            first = first.nextSibling;
        }
        return count;
    },
    RemoveAttrubit: function (att) {
        this[0].removeAttribute(att);
        return this;
    },
    InsertRow: function (index) {
        if (this.IsDom() &amp;&amp; this.GetTagName() == "table") {
            index = index - 1;
            var tr = this[0].insertRow(index);
            return tr;
        }
    },
    AddRow: function () {
        if (this.IsDom() &amp;&amp; this.GetTagName() == "table") {
            index = this[0].rows.length;
            var tr = this[0].insertRow(index);
            return tr;
        }
    },
    InsertCell: function (array, len) {
        if (this.IsDom() &amp;&amp; this.GetTagName() == "tr") {
            var j = len || this[0].parentNode.parentNode.rows[0].cells.length;
            for (var i = 0; i &lt; j; i++) {
                var td = this[0].insertCell(-1);
                td.id = array["cell" + i]["id"]
                td.innerHTML = array["cell" + i]["value"];
            }
            return this;
        }
    },
    SetSelect: function (value) {
        if (this.IsDom() &amp;&amp; this.GetTagName() == "select") {
            var j = this[0].options.length;
            for (var i = 0; i &lt; j; i++) {
                if (this[0].options[i].text == value) {
                    this[0].options[i].selected = true;
                    break;
                }
            }
        }
        return this;
    },
    SetSelectByValue: function (value) {
        if (this.IsDom() &amp;&amp; this.GetTagName() == "select") {
            var j = this[0].options.length;
            for (var i = 0; i &lt; j; i++) {
                if (this[0].options[i].value == value) {
                    this[0].options[i].selected = true;
                    break;
                }
            }
        }
        return this;
    },
    AddSelect: function (value, text) {
        if (this.IsDom() &amp;&amp; this.GetTagName() == "select") {
            if (!this.IsOptionExsits(value)) {
                this[0].add(new Option(text, value));
            }
        }
        return this;
    },
    IsOptionExsits: function (value) {
        if (this.IsDom() &amp;&amp; this.GetTagName() == "select") {
            var IsExist = false;

            for (var i = 0, j = this[0].options.length; i &lt; j; i++) {
                if (this[0].options[i].text == value) {
                    IsExist = true;
                    break;
                }
            }
            return IsExist;
        }
    },
    GetDataListLastID: function () {
        if (this.IsDom()) {
            var dom = this[0].parentNode.lastChild;
            while (dom = dom.previousSibling) {
                if (dom.nodeType == 1) {//IE与其他浏览器在previousSibling的使用上有区别，请参考网络
                    if (System.BrowserInfo().ie) {
                        return dom.id;
                    }
                    else {
                        while (dom = dom.previousSibling) {
                            if (dom.nodeType == 1) {
                                return dom.id;
                            }
                        }
                    }

                }
            }
        }
    },
    IsNull: function () {
        return (this[0] == undefined || this[0] == null);
    },
    GetNodeIndex: function () {
        var child = this[0].parentNode.firstChild,
            i = 0;
        while (child != this[0]) {
            i++;
            child = child.nextSibling;
        }
        return i;
    }
});
Object.extend(System, {
    Dialog: function (setting) {
        if (typeof setting != "object") return this;
        var s = Object.extend({}, dialogSetting, setting);
        var ie = System.BrowserInfo().ie;
        s.icon = {
            Close_Normal: s.path + "close_normal.png",
            Close_Higthlight: s.path + "close_highlight.png",
            Mask_Image: s.path + "mask.png",
            Dialog_Icon: s.path + "icon.png"
        };
        s.remove = function () {
            System.GetDom(s.mask_image).remove();
            System.GetDom(s.Contpanl).remove();
            if (ie == "6.0") {
                System.GetDom(s.ifreame).remove();
            }
            if (!s.scroll) {
                if (!System.GetDom(s.maskId)[0]) {
                    System.GetDom("#html").setoverflow("").ClearStyle();

                }
            }
        };
        s.mask_image = System.CreatElement("div", {
            "id": s.maskId + "_" + s.num,
            "style": {
                "position": "absolute",
                "left": "0",
                "top": "0",
                "filter": "progid:DXImageTransform.Microsoft.Alpha(style=4,opacity=40)",
                "opacity": "0.4",
                "background-color": "black"
            }
        });
        if (ie == "6.0") {
            s.ifreame = System.CreatElement("iframe", {
                "id": s.ifreameId + "_" + s.num,
                "style": {
                    "position": "absolute",
                    "left": "0",
                    "top": "0",
                    "filter": "progid:DXImageTransform.Microsoft.Alpha(style=4,opacity=40)",
                    "opacity": "0.4",
                    "background-color": "black"
                }
            });
        }
        s.Contpanl = System.CreatElement("div", {
            "id": s.ContpanlId + "_" + s.num,
            "style": {
                "position": "absolute"
            }
        });
        s.borderLine = System.CreatElement("div", {
            "style": {
                "border": "solid 1px #69c",
                "font-size": "12px",
                "float": "left",
                "width": "100%",
                "clear": "both"
            }
        });
        System.GetDom(s.Contpanl).add(s.borderLine);
        s.title_bar = System.CreatElement("div", {
            "style": {
                "-moz-user-select": "none",
                "height": "26px",
                "background-image": "url(" + s.path + "title_bg.gif)",
                "background-repeat": "repeat-x",
                "cursor": "move"
            }
        });
        System.GetDom(s.borderLine).add(s.title_bar);
        s.titlePanl = System.CreatElement("div", {
            "style": {
                "padding-top": "7px",
                "float": "left"
            }
        });
        System.GetDom(s.title_bar).add(s.titlePanl);
        s.closebtn = System.CreatElement("img", {
            "title": "关闭",
            "src": s.icon.Close_Normal,
            "style": {
                "margin-top": "9px",
                "margin-right": "8px",
                "float": "right",
                "cursor": "pointer"
            }
        });
        System.GetDom(s.title_bar).add(s.closebtn);
        s.dialogcont = System.CreatElement("div", {
            "style": {
                "background-color": "White",
                "padding": "10px 10px 10px 10px",
                "text-align": "center"
            }
        });
        System.GetDom(s.borderLine).add(s.dialogcont);
        s.btnpanel = System.CreatElement("div", {
            "style": {
                "height": "46px",
                "background-image": "url(" + s.path + "btnpanel_bg.gif)",
                "background-repeat": "repeat-x",
                "width": "100%",
                "text-align": "center"
            }
        });
        System.GetDom(s.borderLine).add(s.btnpanel);
        s.okbtn = System.CreatElement("input", {
            "type": "submit",
            "value": s.okTit,
            "style": {
                "border": "none",
                "margin-top": "10px",
                "margin-left": "20px",
                "margin-right": "20px",
                "width": "69px",
                "height": "24px",
                "background-image": "url(" + s.path + "btn_bg.gif)",
                "backgriound-repeat": " no-repeat"
            }
        });
        System.GetDom(s.btnpanel).add(s.okbtn);
        s.canclebtn = System.CreatElement("input", {
            "type": "button",
            "value": "取消",
            "style": {
                "border": "none",
                "margin-top": "10px",
                "margin-left": "20px",
                "margin-right": "20px",
                "width": "69px",
                "height": "24px",
                "background-image": "url(" + s.path + "btn_bg.gif)",
                "backgriound-repeat": " no-repeat"
            }
        });
        System.GetDom(s.btnpanel).add(s.canclebtn);
        s.GetSize = function () {
            s.height = Math.max(System.GetDom(s.dialogcont).GetSize().height, System.GetDom(s.dialogcont).GetclientSize().clientHeight);
            s.MaxWidth = System.GetScrollSize().scrollWidth;
            s.MaxHeight = System.GetScrollSize().scrollHeight;
            s.visibleWidth = System.GetClientSize().clientWidth;
            s.visibleheight = System.GetClientSize().clientHeight;
            if (s.visibleWidth &lt; 10 || s.visibleheight &lt; 10) {
                s.visibleheight = document.body.clientHeight;
                s.visibleWidth = document.body.clientWidth;
            }
        }
        s.SetDialog = function () {
            var isbz = System.DocType();
            if (isbz) {
                System.GetDom("#html").Select().SetStyle({
                    "height": "100%",
                    "width": "100%"
                });
            }
            System.GetDom("#body").Select().adds(s.mask_image).adds(s.Contpanl);
            s.GetSize();
            System.GetDom(s.mask_image).SetStyle({
                "width": s.MaxWidth + "px",
                "height": s.MaxHeight + "px",
                "z-index": s.image_zindex + (s.cont_zindex * s.num)
            });
            if (ie == "6.0") {
                System.GetDom(s.ifreame).SetStyle({
                    "width": s.MaxWidth + "px",
                    "height": s.MaxHeight + "px",
                    "z-index": s.image_zindex + (s.cont_zindex * s.num)
                });
                System.GetDom("#body").Select().adds(s.ifreame);
            }
            System.GetDom(s.Contpanl).SetStyle({
                "width": s.width != 0 ? (s.width + "px") : (ie ? (ie &lt; 8 ? "350px" : "") : ""),
                "height": s.height + "px",
                "z-index": s.cont_zindex + s.image_zindex + (s.cont_zindex * s.num)
            });
            if (s.ContUrl) {
                System.Ajax({
                    url: s.ContUrl,
                    type: "html",
                    method: "Get",
                    ok: function () {
                        s.cont = arguments[0];
                        System.GetDom(s.dialogcont).html(s.cont);
                    }
                });
            } else {
                System.GetDom(s.dialogcont).html(s.cont);
            }
            System.GetDom(s.titlePanl).html(s.title);
            if (s.width == 0) {
                s.width = Math.max(System.GetDom(s.dialogcont).GetSize().width, System.GetDom(s.dialogcont).GetclientSize().clientWidth);
            }
            if (s.visibleWidth &lt; s.width) {
                System.GetDom(s.Contpanl).SetStyle({
                    "left": "0px"
                });
            } else {
                System.GetDom(s.Contpanl).SetStyle({
                    "left": (s.visibleWidth - s.width) / 2 + "px"
                });
            }
            if (s.visibleheight &lt; s.height) {
                System.GetDom(s.Contpanl).SetStyle({
                    "top": "0px"
                });
            } else {
                System.GetDom(s.Contpanl).SetStyle({
                    "top": (s.visibleheight - s.height + (s.mall * s.num)) / 2 + "px"
                });
            }
        }
        s.AddEvent = function () {
            s.closebtn.onmouseover = function () {
                this.src = s.icon.Close_Higthlight;
            };
            s.closebtn.onmouseout = function () {
                this.src = s.icon.Close_Normal;
            };
            s.closebtn.onclick = function () {
                s.remove();
            };
            s.okbtn.onclick = function () {
                s.ok();
            };
            s.canclebtn.onclick = function () {
                s.cancle();
            };
            s.title_bar.onmousedown = function (e) {
                e = (e) ? e : (window.event ? window.event : null);
                s.posX = e.clientX - parseInt(s.Contpanl.style.left);
                s.posY = e.clientY - parseInt(s.Contpanl.style.top);
                s.ismove = true;
                return false;
            };
            s.title_bar.onselectstart = s.title_bar.ondrag = function () {
                return false;
            };
            s.reply_move = function () {
                s.ismove = false;
            };
            s.MoveDialog = function (e) {
                if (s.ismove) {
                    e = (e) ? e : ((window.event) ? window.event : null);
                    s.Contpanl.style.left = (e.clientX - s.posX) + "px";
                    s.Contpanl.style.top = (e.clientY - s.posY) + "px";
                    if (parseInt(s.Contpanl.style.left) &lt; 2) {
                        s.Contpanl.style.left = "2px";
                    }
                    if (parseInt(s.Contpanl.style.top) &lt; 2) {
                        s.Contpanl.style.top = "2px";
                    }
                    if (e.clientX &lt; 2 || e.clientY &lt; 2) {
                        s.ismove = false;
                    }
                    if (parseInt(s.Contpanl.style.left) &gt; s.visibleWidth - s.width - 2) {
                        s.Contpanl.style.left = s.visibleWidth - s.width - 2 + "px";
                    }
                    if (parseInt(s.Contpanl.style.top) &gt; s.MaxHeight - s.height - 2) {
                        s.Contpanl.style.top = s.MaxHeight - s.height - 2 + "px";
                    }
                }
            }
            if (document.attachEvent) {
                document.attachEvent("onmousemove", s.MoveDialog);
                document.attachEvent("onmouseup", s.reply_move);
            } else if (document.addEventListener) {
                document.addEventListener("mousemove", s.MoveDialog, false);
                document.addEventListener("mouseup", s.reply_move, false);
            }
        }
        s.show = function () {
            if (!s.scroll) {
                System.GetDom("#html").Select().setoverflow("hidden");
            }
            s.SetDialog();
            s.AddEvent();
            switch (s.type) {
                case "alert":
                    s.canclebtn.style.display = "none";
                    s.okbtn.focus();
                    break;
                case "loading":
                    s.okbtn.style.display = "none";
                    s.canclebtn.focus();
                    break;
                case "confirm":
                    if (s._focus == "cancle") {
                        s.canclebtn.focus();
                    } else {
                        s.okbtn.focus();
                    }
                    break;
            }
        }
        s.show();
        return s;
    },
    Tips: function (setting) {
        if (typeof setting != "object") return this;
        var s = Object.extend({}, Tipsetting, setting);
        s.icon = {
            Mask_Image: s.Path + "mask.png",
            Sucess_Image: s.Path + "ui-success.png",
            Error_Image: s.Path + "ui-error.png",
            Load_Image: s.Path + "ui_load.gif",
            Alert_Image: s.Path + "ui-alert.png"
        };
        s.Remove = function () {
            if (s.BoolMaskDiv) {
                System.GetDom(s.MaskDiv).remove();
            }
            System.GetDom(s.ContPanel).remove();
            if (!s.BoolScroll) {
                if (!System.GetDom(s.MaskDiv)[0]) {
                    System.GetDom("#html").Select().setoverflow("").ClearStyle();
                    System.GetDom("#body").Select().ClearStyle();
                }
            }
        };
        if (s.BoolMaskDiv) {
            s.MaskDiv = System.CreatElement("div", {
                "style": {
                    "position": "absolute",
                    "left": "0",
                    "top": "0",
                    "filter": "progid:DXImageTransform.Microsoft.Alpha(style=4,opacity=20)",
                    "opacity": "0.2",
                    "background-color": "black",
                    "z-index": s.MaskDivIndex
                }
            });
        }
        s.ContPanel = System.CreatElement("div", {
            "style": {
                "position": "absolute",
                "border": "solid 1px #F5F5F5",
                "border-top": "solid 1px #F1F1F1",
                "border-left": "solid 1px #F1F1F1",
                "margin": "0px auto",
                "border-radius": "8px",
                "box-shadow": "3px 3px 4px #AAA",
                "width": "auto",
                "height": "46px",
                "background": "-moz-linear-gradient(top, #FAFAFA, #E3E3E3);-webkit-gradient(linear, left top, left bottom, from(#FAFAFA), to(#E3E3E3));",
                "z-index": s.ContPanelIndex,
                "background-color": "#F7F7F7"
            }
        });
        s.MsgPanel = System.CreatElement("div", {
            "style": {
                "margin": "0px 17px",
                "padding": "10px 8px 10px 40px",
                "line-height": "25px",
                "font-size": "15px",
                "font-weight": "bold"
            }
        });
        switch (s.Type) {
            case "Sucess":
                System.GetDom(s.ContPanel).SetStyle({
                    "background-image": "url(" + s.icon.Sucess_Image + ")",
                    "background-position": "5% 55%",
                    "background-repeat": "no-repeat"
                });
                System.GetDom(s.MsgPanel).SetStyle({ "color": s.FontColor.Sucess });
                break;
            case "Alert":
                System.GetDom(s.ContPanel).SetStyle({
                    "background-image": "url(" + s.icon.Alert_Image + ")",
                    "background-position": "5% 55%",
                    "background-repeat": "no-repeat"
                });
                System.GetDom(s.MsgPanel).SetStyle({ "color": s.FontColor.Alert });
                s.Timeout = 3000;
                break;
            case "Load":
                System.GetDom(s.ContPanel).SetStyle({
                    "background-image": "url(" + s.icon.Load_Image + ")",
                    "background-position": "5% 55%",
                    "background-repeat": "no-repeat"
                });
                s.AutoRemove = false;
                System.GetDom(s.MsgPanel).SetStyle({ "color": s.FontColor.Load });
                break;
            case "Error":
                System.GetDom(s.ContPanel).SetStyle({
                    "background-image": "url(" + s.icon.Error_Image + ")",
                    "background-position": "5% 55%",
                    "background-repeat": "no-repeat"
                });
                s.Timeout = 3000;
                System.GetDom(s.MsgPanel).SetStyle({ "color": s.FontColor.Error });
                break;
        }

        s.SetTips = function () {
            var ScrollSize = System.GetScrollSize(),
            ClientSize = System.GetClientSize();
            var MaxWidth = ScrollSize.scrollWidth,
                MaxHeight = ScrollSize.scrollHeight,
                visibleWidth = ClientSize.clientWidth,
                visibleheight = ClientSize.clientHeight;
            if (visibleWidth &lt; 10 || visibleheight &lt; 10) {
                visibleheight = document.body.clientHeight;
                visibleWidth = document.body.clientWidth;
            }
            if (s.BoolMaskDiv) {
                var isbz = System.DocType();
                if (isbz) {
                    System.GetDom("#html").Select().SetStyle({
                        "height": "100%",
                        "width": "100%"
                    });
                    System.GetDom("#body").Select().SetStyle({
                        "height": "100%",
                        "width": "100%"
                    });
                }
                System.GetDom(s.MaskDiv).SetStyle({
                    "width": MaxWidth + "px",
                    "height": (MaxHeight &gt; visibleheight ? MaxHeight : visibleheight) + "px"
                });
            }
            System.GetDom(s.MsgPanel).html(s.Cont);
            System.GetDom(s.ContPanel).add(s.MsgPanel);
            var ContSize = System.GetDom(s.ContPanel).GetSize(), ContClientSize = System.GetDom(s.ContPanel).GetclientSize();
            var width = Math.max(ContSize.width, ContClientSize.clientWidth),
                height = Math.max(ContSize.height, ContClientSize.clientHeight);
            if (visibleWidth &lt; width) {
                System.GetDom(s.ContPanel).SetStyle({
                    "left": "0px"
                });
            } else {
                System.GetDom(s.ContPanel).SetStyle({
                    "left": (visibleWidth - width) / 2 + "px"
                });
            }
            if (visibleheight &lt; height) {
                System.GetDom(s.Contpanl).SetStyle({
                    "top": "0px"
                });
            } else {
                var top = (visibleheight - height) / 2;
                System.GetDom(s.ContPanel).SetStyle({
                    "top": (top+ScrollSize.scrollTop) + "px"
                });
            }
        }
        if (s.BoolMaskDiv) {
            if (!s.BoolScroll) {
                System.GetDom("#html").Select().setoverflow("hidden");

            }
            System.GetDom("#body").Select().add(s.MaskDiv);
        }
        System.GetDom("#body").Select().add(s.ContPanel);
        if (s.AutoRemove) {
            setTimeout(s.Remove, s.Timeout);
        }
        s.SetTips();
        return s;
    }
});</pre></body></html>