﻿if (!$CONFIG) {
    $CONFIG = {}
}
var scope = $CONFIG;


var $IE = scope.$IE,
$MOZ = scope.$MOZ,
$IE6 = scope.$IE6;
function $import(url) {}
var Boot = {};
Boot.addDOMLoadEvent = function(func) {
    if (!window.__load_events) {
        var init = function() {
            if (arguments.callee.done) {
                return
            }
            arguments.callee.done = true;
            if (window.__load_timer) {
                clearInterval(window.__load_timer);
                window.__load_timer = null
            }
            for (var i = 0; i < window.__load_events.length; i++) {
                window.__load_events[i]()
            }
            window.__load_events = null
        };
        if (document.addEventListener) {
            document.addEventListener("DOMContentLoaded", init, false)
        }
        if (/WebKit/i.test(navigator.userAgent)) {
            window.__load_timer = setInterval(function() {
                if (/loaded|complete/.test(document.readyState)) {
                    init()
                }
            },
            10)
        }
        if (window.ActiveXObject) {
            window.__load_timer = setInterval(function() {
                try {
                    document.body.doScroll("left");
                    init()
                } catch(ex) {}
            },
            10)
        }
        window.onload = init;
        window.__load_events = []
    }
    window.__load_events.push(func)
};
Boot.getJsVersion = function() {
    var ver = false;
    if ($CONFIG) {
        ver = $CONFIG.js ? $CONFIG.js: ""
    }
    if (ver) {
        return "?v=" + ver
    } else {
        return ""
    }
};
try {
    Boot.addDOMLoadEvent(main)
} catch(e) {}
var $Debug = (function() {
    var contentList = [];
    function add_to_content(sText, oOpts, sCMD) {
        var key;
        var text = sText != null ? sText: "";
        var opts = {
            color: null,
            bgcolor: null,
            html: null
        };
        var cmd = sCMD != null ? sCMD: "log";
        oOpts = oOpts != null ? oOpts: {};
        for (key in opts) {
            if (oOpts[key] != null) {
                opts[key] = oOpts[key]
            }
        }
        contentList.push({
            label: text,
            cmd: cmd,
            opts: opts,
            time: new Date()
        })
    }
    function debug_proto(sText, oOpts) {
        add_to_content(sText, oOpts, "log")
    }
    debug_proto.fatal = function(sText, oOpts) {
        add_to_content(sText, oOpts, "fatal")
    };
    debug_proto.error = function(sText, oOpts) {
        add_to_content(sText, oOpts, "error")
    };
    debug_proto.warning = function(sText, oOpts) {
        add_to_content(sText, oOpts, "warning")
    };
    debug_proto.info = function(sText, oOpts) {
        add_to_content(sText, oOpts, "info")
    };
    debug_proto.log = function(sText, oOpts) {
        add_to_content(sText, oOpts, "log")
    };
    debug_proto.clear = function() {
        contentList = []
    };
    debug_proto.contentList = contentList;
    return debug_proto
})();
if (typeof Sina == "undefined") {
    Sina = {}
}
Sina.pkg = function(ns) {
    if (!ns || !ns.length) {
        return null
    }
    var levels = ns.split(".");
    var nsobj = Sina;
    for (var i = (levels[0] == "Sina") ? 1 : 0; i < levels.length; ++i) {
        nsobj[levels[i]] = nsobj[levels[i]] || {};
        nsobj = nsobj[levels[i]]
    }
    return nsobj
};
function $E(oID) {
    var node = typeof oID == "string" ? document.getElementById(oID) : oID;
    if (node != null) {
        return node
    } else {}
    return null
}
function $C(tagName) {
    return document.createElement(tagName)
}
try {
    document.execCommand("BackgroundImageCache", false, true)
} catch(e) {} (function() {
    var funcName = "trace";
    var _traceList = [];
    var _startTime = new Date().valueOf();
    var _curTime = new Date().valueOf();
    var _runTime;
    var _trace = function(sText, oOption, sBgColor) {
        oOption = oOption || {};
        if (typeof oOption == "string") {
            oOption = {
                color: oOption
            };
            if (typeof sBgColor != "undefined" && typeof sBgColor == "string") {
                oOption.bgColor = sBgColor
            }
        }
        _traceList[_traceList.length] = [sText, oOption]
    };
    var _traceError = function(oError) {
        _trace(oError, {
            color: "#F00"
        })
    };
    _trace.error = _traceError;
    _trace.traceList = _traceList;
    _trace.toString = function() {
        return "Trace调试已关闭"
    };
    window[funcName] = _trace;
    window.traceError = _traceError
})();
Sina.pkg("Core");
if (typeof Core == "undefined") {
    Core = Sina.Core
}
Sina.pkg("Core.Array");
Core.Array.each = function(ar, insp) {
    var r = [];
    for (var i = 0; i < ar.length; i++) {
        var x = insp(ar[i], i);
        if (x !== null) {
            r.push(x)
        }
    }
    return r
};
function Jobs() {
    this._jobTable = []
}
Jobs.prototype = {
    _registedJobTable: {},
    initialize: function() {},
    _registJob: function(jobName, rel) {
        this._registedJobTable[jobName] = rel
    },
    add: function(jobName) {
        this._jobTable.push(jobName)
    },
    start: function() {
        var jobs = this._jobTable;
        var regJobs = this._registedJobTable;
        var i = 0;
        var joblen = this._jobTable.length;
        var getTime = function() {
            return new Date().valueOf()
        };
        var interNum = window.setInterval(function() {
            if (i >= joblen) {
                clearInterval(interNum);
                return
            }
            var jobName = jobs[i];
            var job = regJobs[jobName];
            i++;
            if (typeof job == "undefined") {
                $Debug.error("<b>[" + jobName + "# is undefiend!!!</b>", {
                    html: true
                });
                return
            }
            var _try = true;
            var _start = getTime();
            try {
                job.call()
            } catch(e) {
                $Debug.error("<b>[" + jobName + "] failed!!!</b>", {
                    html: true
                });
                _try = false
            } finally {
                if (_try) {
                    var _end = getTime();
                    $Debug.info("[" + jobName + "] done in " + (_end - _start) + "ms.")
                }
            }
        },
        10)
    },
    call: function(jobName, args) {
        if (typeof this._registedJobTable[jobName] != "undefined") {
            this._registedJobTable[jobName].apply(this, args)
        } else {
            $Debug("#" + jobName + "# is undefined!!!", {
                color: "#900",
                bgColor: "#FFF;"
            })
        }
    }
};
$registJob = function(name, rel) {
    Jobs.prototype._registJob(name, rel)
};
$callJob = function(name) {
    var args = [];
    if (arguments.length > 1) {
        Core.Array.foreach(arguments,
        function(v, i) {
            args[i] = v
        });
        args.shift()
    }
    Jobs.prototype.call(name, args)
};
if (typeof App == "undefined") {
    var App = {}
}
Sina.pkg("Utils");
if (typeof Utils == "undefined") {
    Utils = Sina.Utils
}
Sina.pkg("Utils.Io");
Sina.pkg("Core.String");
Utils.Url = function(url) {
    url = url || "";
    this.url = url;
    this.query = {};
    this.parse()
};
Utils.Url.prototype = {
    parse: function(url) {
        if (url) {
            this.url = url
        }
        this.parseAnchor();
        this.parseParam()
    },
    parseAnchor: function() {
        var anchor = this.url.match(/\#(.*)/);
        anchor = anchor ? anchor[1] : null;
        this._anchor = anchor;
        if (anchor != null) {
            this.anchor = this.getNameValuePair(anchor);
            this.url = this.url.replace(/\#.*/, "")
        }
    },
    parseParam: function() {
        var query = this.url.match(/\?([^\?]*)/);
        query = query ? query[1] : null;
        if (query != null) {
            this.url = this.url.replace(/\?([^\?]*)/, "");
            this.query = this.getNameValuePair(query)
        }
    },
    getNameValuePair: function(str) {
        var o = {};
        str.replace(/([^&=]*)(?:\=([^&]*))?/gim,
        function(w, n, v) {
            if (n == "") {
                return
            }
            o[n] = v || ""
        });
        return o
    },
    getParam: function(sPara) {
        return this.query[sPara] || ""
    },
    clearParam: function() {
        this.query = {}
    },
    setParam: function(name, value) {
        if (name == null || name == "" || typeof(name) != "string") {
            throw new Error("no param name set")
        }
        this.query = this.query || {};
        this.query[name] = value
    },
    setParams: function(o) {
        this.query = o
    },
    serialize: function(o) {
        var ar = [];
        for (var i in o) {
            if (o[i] == null || o[i] == "") {
                ar.push(i + "=")
            } else {
                ar.push(i + "=" + o[i])
            }
        }
        return ar.join("&")
    },
    toString: function() {
        var queryStr = this.serialize(this.query);
        return this.url + (queryStr.length > 0 ? "?" + queryStr: "") + (this.anchor ? "#" + this.serialize(this.anchor) : "")
    },
    getHashStr: function(forceSharp) {
        return this.anchor ? "#" + this.serialize(this.anchor) : (forceSharp ? "#": "")
    }
};
Core.String.encodeDoubleByte = function(str) {
    if (typeof str != "string") {
        return str
    }
    return encodeURIComponent(str)
};
Sina.pkg("Core.Base"); (function() {
    var Detect = function() {
        var ua = navigator.userAgent.toLowerCase();
        this.$IE = /msie/.test(ua);
        this.$OPERA = /opera/.test(ua);
        this.$MOZ = /gecko/.test(ua);
        this.$IE5 = /msie 5 /.test(ua);
        this.$IE55 = /msie 5.5/.test(ua);
        this.$IE6 = /msie 6/.test(ua);
        this.$IE7 = /msie 7/.test(ua);
        this.$SAFARI = /safari/.test(ua);
        this.$winXP = /windows nt 5.1/.test(ua);
        this.$winVista = /windows nt 6.0/.test(ua);
        this.$FF2 = /Firefox\/2/i.test(ua);
        this.$IOS = /\((iPhone|iPad|iPod)/i.test(ua)
    };
    Core.Base.detect = new Detect()
})();
Utils.Io.Ajax = {
    createRequest: function() {
        var request = null;
        try {
            request = new XMLHttpRequest()
        } catch(trymicrosoft) {
            try {
                request = new ActiveXObject("Msxml2.XMLHTTP")
            } catch(othermicrosoft) {
                try {
                    request = ActiveXObject("Microsoft.XMLHTTP")
                } catch(failed) {}
            }
        }
        if (request == null) {
            $Debug.error("<b>create request failed</b>", {
                html: true
            })
        } else {
            return request
        }
    },
    request: function(url, option) {
        option = option || {};
        option.onComplete = option.onComplete ||
        function() {};
        option.onException = option.onException ||
        function() {};
        option.returnType = option.returnType || "txt";
        option.method = option.method || "get";
        option.data = option.data || {};
        if (typeof option.GET != "undefined" && typeof option.GET.url_random != "undefined" && option.GET.url_random == 0) {
            this.rand = false;
            option.GET.url_random = null
        }
        this.loadData(url, option)
    },
    loadData: function(url, option) {
        var request = this.createRequest(),
        tmpArr = [];
        var _url = new Utils.Url(url);
        if (option.POST) {
            for (var postkey in option.POST) {
                var postvalue = option.POST[postkey];
                if (postvalue != null) {
                    tmpArr.push(postkey + "=" + Core.String.encodeDoubleByte(postvalue))
                }
            }
        }
        var sParameter = tmpArr.join("&") || "";
        if (option.GET) {
            for (var key in option.GET) {
                if (key != "url_random") {
                    _url.setParam(key, Core.String.encodeDoubleByte(option.GET[key]))
                }
            }
        }
        if (this.rand != false) {
            _url.setParam("rnd", Math.random())
        }
        request.onreadystatechange = function() {
            if (request.readyState == 4) {
                var response, type = option.returnType;
                try {
                    switch (type) {
                    case "txt":
                        response = request.responseText;
                        break;
                    case "xml":
                        if (Core.Base.detect.$IE) {
                            response = request.responseXML
                        } else {
                            var Dparser = new DOMParser();
                            response = Dparser.parseFromString(request.responseText, "text/xml")
                        }
                        break;
                    case "json":
                        response = eval("(" + request.responseText + ")");
                        break
                    }
                    option.onComplete(response)
                } catch(e) {
                    option.onException(e.message, _url);
                    return false
                }
            }
        };
        try {
            if (option.POST) {
                request.open("POST", _url, true);
                request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
                request.send(sParameter)
            } else {
                request.open("GET", _url, true);
                request.send(null)
            }
        } catch(e) {
            option.onException(e.message, _url);
            return false
        }
    }
};
Core.String.trimHead = function(str) {
    return str.replace(/^(\u3000|\s|\t)*/gi, "")
};
Core.String.trimTail = function(str) {
    return str.replace(/(\u3000|\s|\t)*$/gi, "")
};
Core.String.trim = function(str) {
    return Core.String.trimHead(Core.String.trimTail(str))
};
Sina.pkg("Core.Events");
Core.Events.addEvent = function(elm, func, evType, useCapture) {
    var _el = $E(elm);
    if (_el == null) {
        $Debug("addEvent 找不到对象：" + elm);
        return
    }
    if (typeof useCapture == "undefined") {
        useCapture = false
    }
    if (typeof evType == "undefined") {
        evType = "click"
    }
    if (_el.addEventListener) {
        _el.addEventListener(evType, func, useCapture);
        return true
    } else {
        if (_el.attachEvent) {
            var r = _el.attachEvent("on" + evType, func);
            return true
        } else {
            _el["on" + evType] = func
        }
    }
};
Core.Events.removeEvent = function(oElement, fHandler, sName) {
    var _el = $E(oElement);
    if (_el == null) {
        $Debug("removeEvent 找不到对象：" + oElement);
        return
    }
    if (typeof fHandler != "function") {
        return
    }
    if (typeof sName == "undefined") {
        sName = "click"
    }
    if (_el.addEventListener) {
        _el.removeEventListener(sName, fHandler, false)
    } else {
        if (_el.attachEvent) {
            _el.detachEvent("on" + sName, fHandler)
        }
    }
    fHandler[sName] = null
};
Core.Events.getEvent = function() {
    return window.event
};
if (!Core.Base.detect.$IE) {
    Core.Events.getEvent = function() {
        if (window.event) {
            return window.event
        }
        var o = arguments.callee.caller;
        var e;
        var n = 0;
        while (o != null && n < 40) {
            e = o.arguments[0];
            if (e && (e.constructor == Event || e.constructor == MouseEvent)) {
                return e
            }
            n++;
            o = o.caller
        }
        return e
    }
}
Core.Events.stopEvent = function(el) {
    var ev = el ? el: Core.Events.getEvent();
    ev.cancelBubble = true;
    ev.returnValue = false
};
if (!$IE) {
    Core.Events.stopEvent = function(el) {
        var ev = el ? el: Core.Events.getEvent();
        ev.preventDefault();
        ev.stopPropagation()
    }
}
Core.Events.fixEvent = function(e) {
    if (typeof e == "undefined") {
        e = window.event
    }
    if (!e.target) {
        e.target = e.srcElement;
        e.pageX = e.x;
        e.pageY = e.y
    }
    if (typeof e.layerX == "undefined") {
        e.layerX = e.offsetX
    }
    if (typeof e.layerY == "undefined") {
        e.layerY = e.offsetY
    }
    return e
};
Sina.pkg("Core.Dom");
Core.Dom.opacity = function(elm, value) {
    elm = $E(elm);
    elm.style.filter = "alpha(opacity=" + value + ")";
    elm.style.opacity = value / 100
};
Core.Dom.getElementsByClass = function(el, tg, clz) {
    el = el || document;
    var rs = [];
    clz = " " + clz + " ";
    var cldr = el.getElementsByTagName(tg),
    len = cldr.length;
    for (var i = 0; i < len; ++i) {
        var o = cldr[i];
        if (o.nodeType == 1) {
            var ecl = " " + o.className + " ";
            if (ecl.indexOf(clz) != -1) {
                rs[rs.length] = o
            }
        }
    }
    return rs
};
Core.Dom.byClz = Core.Dom.getElementsByClass;
Sina.pkg("Core.Function");
Core.Function.bind2 = function(fFunc, object) {
    var __method = fFunc;
    return function() {
        return __method.apply(object, arguments)
    }
};
Function.prototype.bind2 = function(object) {
    var __method = this;
    return function() {
        return __method.apply(object, arguments)
    }
};
Core.Array.foreach = function(ar, insp) {
    if (ar == null && ar.constructor != Array) {
        return []
    }
    var i = 0,
    len = ar.length,
    r = [];
    while (i < len) {
        var x = insp(ar[i], i);
        if (x !== null) {
            r[r.length] = x
        }
        i++
    }
    return r
};
Utils.Template = function(tmpl) {
    this.tmpl = tmpl;
    this.pattern = /(#\{(.*?)\})/g
};
Utils.Template.prototype = {
    evaluate: function(data) {
        return this.tmpl.replace(this.pattern,
        function() {
            return data[arguments[2]] || ""
        })
    },
    evaluateMulti: function(data, reverse) {
        var _buffer = [];
        Core.Array.foreach(data, Core.Function.bind2(function(v, i) {
            i = reverse ? data.length - i: i;
            _buffer[i] = this.evaluate(v)
        },
        this));
        return _buffer.join("")
    }
};
Sina.pkg("Core.System");
Core.System.winSize = function(_target) {
    var w, h;
    if (_target) {
        target = _target.document
    } else {
        target = document
    }
    if (self.innerHeight) {
        if (_target) {
            target = _target.self
        } else {
            target = self
        }
        w = target.innerWidth;
        h = target.innerHeight
    } else {
        if (target.documentElement && target.documentElement.clientHeight) {
            w = target.documentElement.clientWidth;
            h = target.documentElement.clientHeight
        } else {
            if (target.body) {
                w = target.body.clientWidth;
                h = target.body.clientHeight
            }
        }
    }
    return {
        width: w,
        height: h
    }
};
Core.System.pageSize = function(_target) {
    if (_target) {
        target = _target.document
    } else {
        target = document
    }
    var _rootEl = (target.compatMode == "CSS1Compat" ? target.documentElement: target.body);
    var xScroll, yScroll;
    if (window.innerHeight && window.scrollMaxY) {
        xScroll = _rootEl.scrollWidth;
        yScroll = window.innerHeight + window.scrollMaxY
    } else {
        if (_rootEl.scrollHeight > _rootEl.offsetHeight) {
            xScroll = _rootEl.scrollWidth;
            yScroll = _rootEl.scrollHeight
        } else {
            xScroll = _rootEl.offsetWidth;
            yScroll = _rootEl.offsetHeight
        }
    }
    var win_s = Core.System.winSize(_target);
    if (yScroll < win_s.height) {
        pageHeight = win_s.height
    } else {
        pageHeight = yScroll
    }
    if (xScroll < win_s.width) {
        pageWidth = win_s.width
    } else {
        pageWidth = xScroll
    }
    return [pageWidth, pageHeight, win_s.width, win_s.height]
};
Core.System.getScrollPos = function(oDocument) {
    oDocument = oDocument || document;
    var dd = oDocument.documentElement;
    var db = oDocument.body;
    return [Math.max(dd.scrollTop, db.scrollTop), Math.max(dd.scrollLeft, db.scrollLeft), Math.max(dd.scrollWidth, db.scrollWidth), Math.max(dd.scrollHeight, db.scrollHeight)]
};
App.Dialog = {};
App.Dialog.BasicDialog = function(title, content, cfg) {
    cfg = cfg || {};
    cfg.noDrag = cfg.noDrag || true;
    this._node = $C("div");
    document.getElementsByTagName("BODY")[0].appendChild(this._node);
    var tpl = {
        title: title ? title: "BasicDialog",
        content: content ? content: "......",
        closeTip: $CLTMSG.CD0018
    };
    var tt = this._node.style;
    tt.position = "absolute";
    tt.visibility = "hidden";
    if (cfg.zIndex) {
        tt.zIndex = cfg.zIndex
    }
    if (cfg.hidden) {
        tt.visibility = "hidden"
    }
    var str = '';
    var tmp = new Utils.Template(str);
    this._node.innerHTML = tmp.evaluate(tpl);
    this._node_body = Core.Dom.getElementsByClass(this._node, "DIV", "layerBoxCon")[0];
    this.setSize(cfg.width, cfg.height);
    this._btn_close = this._node.firstChild.firstChild.childNodes[1].childNodes[1].firstChild.firstChild.firstChild.childNodes[1];
    this._node_title = this._btn_close.previousSibling;
    this._btn_close.parent = this;
    this._btn_close.onclick = function() {
        Core.Events.stopEvent();
        if (cfg.hiddClose) {
            this.parent.hidd()
        } else {
            this.parent.close()
        }
    };
    this._btn_close.onmousedown = function() {};
    this._btn_move = this._btn_close.parentNode.parentNode;
    this._btn_move.parent = this;
    this._btn_move.onmousedown = function() {
        var evt = Core.Events.fixEvent(Core.Events.getEvent());
        this.parent._ondrag = true;
        this.offsetx = evt.layerX;
        this.offsety = evt.layerY
    };
    if (!cfg.noDrag) {
        this._btn_move.style.cursor = "pointer"
    }
    var self = this;
    this._btn_move.mousemoveHandler = function() {
        self._mousemoveHandler()
    };
    this._btn_move.mouseupHandler = function() {
        self._mouserupHandler()
    };
    this._btn_move.resize = function() {
        self.resize()
    };
    this._btn_move.scroll = function() {
        self.scroll()
    };
    this._btn_move.close = function(e) {
        if (cfg.esc) {
            return
        }
        var _key = e.keyCode;
        if (_key === 27) {
            self.close()
        }
    };
    this.setMiddle();
    if (cfg.hidden) {
        tt.visibility = "hidden";
        this.focusTarget = this._btn_close
    } else {
        tt.visibility = "visible";
        this._btn_close.focus();
        this._btn_close.blur()
    }
    this.setMask(this._node.style.zIndex, cfg.hidden);
    if (!cfg.noDrag) {
        Core.Events.addEvent(document, this._btn_move.mousemoveHandler, "mousemove");
        Core.Events.addEvent(document, this._btn_move.mouseupHandler, "mouseup")
    }
    Core.Events.addEvent(window, this._btn_move.resize, "resize");
    Core.Events.addEvent(window, this._btn_move.scroll, "scroll");
    Core.Events.addEvent(document, this._btn_move.close, "keydown")
};
App.Dialog.BasicDialog.prototype = {
    onClose: function() {},
    gc: function() {},
    distory: function() {
        if (this._distory) {
            return
        }
        this.gc();
        Core.Events.removeEvent(document, this._btn_move.mousemoveHandler, "mousemove");
        Core.Events.removeEvent(document, this._btn_move.mouseupHandler, "mouseup");
        Core.Events.removeEvent(window, this._btn_move.resize, "resize");
        Core.Events.removeEvent(window, this._btn_move.scroll, "scroll");
        this._btn_close.onmousedown = null;
        this._btn_close.onclick = null;
        this._btn_close.parent = null;
        this._btn_close = null;
        this._node.parentNode.removeChild(this._node);
        this._mask && this._mask.parentNode.removeChild(this._mask);
        this._mask1.parentNode.removeChild(this._mask1);
        if (scope.$IE) {
            this._node.outerHTML = null;
            this._mask && (this._mask.outerHTML = null);
            this._mask1.outerHTML = null
        }
        this._node = null;
        this._btn_move.mousemoveHandler = null;
        this._btn_move.mouseupHandler = null;
        this._btn_move.resize = null;
        this._btn_move.scroll = null;
        this._btn_move.onmousedown = null;
        this._btn_move.parent = null;
        this._btn_move = null;
        this._mask && (this._mask = null);
        this._distory = true
    },
    close: function() {
        if (this.onClose) {
            this.onClose()
        }
        this.distory()
    },
    show: function() {
        this._node.style.visibility = "visible";
        this._mask && (this._mask.style.visibility = "visible");
        this._mask1.style.visibility = "visible";
        if (this.focusTarget) {
            this.focusTarget.focus()
        }
        this.resize();
        this.setMiddle()
    },
    hidd: function() {
        this._node.style.visibility = "hidden";
        this._mask && (this._mask.style.visibility = "hidden");
        this._mask1.style.visibility = "hidden"
    },
    setMask: function(z, hidden) {
        $IE && (this._mask = document.getElementsByTagName("BODY")[0].appendChild($C("iframe")));
        this._mask1 = document.getElementsByTagName("BODY")[0].appendChild($C("div"));
        if (hidden) {
            this._mask && (this._mask.style.visibility = "hidden");
            this._mask1.style.visibility = "hidden"
        }
        if (this._mask) {
            with(this._mask.style) {
                position = "absolute";
                width = "100%";
                zIndex = parseInt(z) - 2;
                top = "0px";
                left = "0px";
                border = "0"
            }
        }
        with(this._mask1.style) {
            position = "absolute";
            backgroundColor = "#000";
            width = "100%";
            zIndex = parseInt(z) - 1;
            top = "0px";
            left = "0px"
        }
        this._mask && Core.Dom.opacity(this._mask, 0);
        Core.Dom.opacity(this._mask1, 15);
        this.resize()
    },
    setPosition: function(x, y) {
        this._node.style.left = x + "px";
        this._node.style.top = y + "px"
    },
    resize: function() {
        if (this._mask1) {
            var scroll_pos = Core.System.getScrollPos(),
            win_s = Core.System.winSize(),
            snap;
            snap = (win_s.height + 160) + "px";
            this._mask1.style.height = snap;
            this._mask && (this._mask.style.height = snap);
            snap = (scroll_pos[0] - 80) + "px";
            this._mask1.style.top = snap;
            this._mask && (this._mask.style.top = snap);
            this.setMiddle()
        }
    },
    scroll: function() {
        var scroll_pos = Core.System.getScrollPos(),
        h = this._mask1.offsetHeight,
        snap;
        if ((scroll_pos[0] + h) <= scroll_pos[3]) {
            snap = (scroll_pos[0] - 80) + "px";
            this._mask && (this._mask.style.top = snap);
            this._mask1.style.top = snap
        } else {
            snap = (scroll_pos[3] - h) + "px";
            this._mask && (this._mask.style.top = snap);
            this._mask1.style.top = snap
        }
    },
    setTitle: function(str) {
        this._node_title.innerHTML = str
    },
    setMiddle: function() {
        var ow = this._node.offsetWidth;
        var oh = this._node.offsetHeight;
        var win_s = Core.System.winSize();
        var scroll_pos = Core.System.getScrollPos();
        var tx = (win_s.width - ow) / 2;
        var ty = scroll_pos[0] + (win_s.height - oh) / 2;
        this._node.style.left = tx + "px";
        this._node.style.top = (ty < 20 ? 20 : ty) + "px"
    },
    setSize: function(w, h) {
        w = w ? w + "px": "auto";
        h = h ? h + "px": "auto";
        var ts = this._node_body.style;
        ts.width = w;
        ts.height = h
    },
    _mousemoveHandler: function() {
        if (this._ondrag) {
            var evt = Core.Events.fixEvent(Core.Events.getEvent());
            if (evt.target == this._btn_close) {
                return
            }
            if ($IE) {
                var ss = Core.System.getScrollPos();
                this._node.style.left = evt.pageX - this._btn_move.offsetx + ss[1] + "px";
                this._node.style.top = evt.pageY - this._btn_move.offsety + ss[0] + "px"
            } else {
                this._node.style.left = evt.pageX - this._btn_move.offsetx + "px";
                this._node.style.top = evt.pageY - this._btn_move.offsety + "px"
            }
        }
    },
    _mouserupHandler: function() {
        this._ondrag = false;
        if (this._btn_move.offsetx) {
            this._btn_move.offsetx = null
        }
        if (this._btn_move.offsety) {
            this._btn_move.offsety = null
        }
    }
};
App.alert = function(msg, config) {
    config = config ? config: {};
    config.hasBtn = config.hasBtn == null ? true: config.hasBtn;
    var title = config.title ? config.title: $CLTMSG.CL0601;
    var ok_label = config.ok_label ? config.ok_label: $CLTMSG.CL0602;
    if (typeof msg == "object") {
        msg = App.getMsg(msg.code, msg.replace)
    }
    var callback = config.ok ? config.ok: null;
    var basic_conf = {};
    basic_conf.width = config.width ? config.width: 360;
    basic_conf.height = config.height;
    basic_conf.zIndex = config.zIndex ? config.zIndex: 1000;
    basic_conf.hidden = config.hidden;
    var htmls = [];
    htmls.push('<div class="commonLayer2">');
    htmls.push('<div class="layerL"><img class="PY_ib PY_ib_#{icon}" src="' + scope.$BASEIMG + 'style/images/common/PY_ib.gif" alt="" title="" align="absmiddle"/></div>');
    htmls.push('<div class="layerR">');
    htmls.push("	<strong>#{cnt}</strong>");
    htmls.push("</div>");
    htmls.push('<div class="clear"></div>');
    if (config.hasBtn) {
        htmls.push('	<div class="MIB_btn">')
    } else {
        htmls.push('	<div class="MIB_btn" style="height:0;">')
    }
    htmls.push('	<a href="javascript:;" id="#{btn_id}" class="btn_normal"><em>' + ok_label + "</em></a>");
    htmls.push("</div></div>");
    var tmp = new Utils.Template(htmls.join(""));
    var t = "btn_" + (new Date()).getTime();
    var icon = config.icon ? config.icon: 1;
    msg = tmp.evaluate({
        cnt: msg,
        icon: icon,
        btn_id: t
    });
    var dialog = new App.Dialog.BasicDialog(title, msg, basic_conf);
    var btn_ok = $E(t);
    var okCallback = function() {
        if (callback) {
            try {
                callback()
            } catch(e) {}
        }
        callback = null;
        btn_ok.onclick = null;
        btn_ok = null;
        dialog.close();
        Core.Events.removeEvent(document, hotkey, "keyup");
        return false
    };
    var hotkey = function(e) {
        var ev = window.event || e;
        var element;
        if (ev.target) {
            element = e.target
        } else {
            if (ev.srcElement) {
                element = e.srcElement
            }
        }
        if (element.nodeType == 3) {
            element = element.parentNode
        }
        if (element.tagName == "INPUT" || element.tagName == "TEXTAREA") {
            return
        }
        switch (ev.keyCode) {
        case 27:
            okCallback();
            break
        }
    };
    btn_ok.onclick = okCallback;
    Core.Events.addEvent(document, hotkey, "keyup");
    if (basic_conf.hidden) {
        this.focusTarget = btn_ok
    } else {
        btn_ok.focus()
    }
    return dialog
};
App.confirm = function(msg, config) {
    config = config ? config: {};
    var title = config.title ? config.title: $CLTMSG.CL0601;
    var ok_label = config.ok_label ? config.ok_label: $CLTMSG.CL0602;
    var cancel_label = config.cancel_label ? config.cancel_label: $CLTMSG.CL0603;
    var des = "";
    if (typeof msg == "object") {
        des = msg.des;
        if (msg.code) {
            msg = App.getMsg(msg.code, msg.replace)
        } else {
            msg = msg.html
        }
    }
    if (msg) {
        msg = "<strong>" + msg + "</strong>"
    }
    if (des) {
        des = '<div class="txt">' + des + "</div>"
    }
    var callback_ok = config.ok ? config.ok: null;
    var callback_cancel = config.cancel ? config.cancel: null;
    var basic_conf = {};
    basic_conf.width = config.width ? config.width: 390;
    basic_conf.height = config.height;
    basic_conf.zIndex = config.zIndex ? config.zIndex: 1000;
    basic_conf.hidden = config.hidden;
    var tpl = '<div class="commonLayer2">                        	<div class="layerL"><img class="PY_ib PY_ib_#{icon}" src="' + scope.$BASEIMG + 'style/images/common/PY_ib.gif" alt="" title="" align="absmiddle"/></div>                        	<div class="layerR">					#{cnt}			        	#{des}                                	<div class="MIB_btn">						<a href="javascript:;" id="ok_#{t}" class="btn_normal"><em>' + ok_label + '</em></a>						<a href="javascrpt:;" id="cancel_#{t}" class="btn_notclick"><em>' + cancel_label + '</em></a>					</div>                            	</div>                            <div class="clear"></div>                        </div>';
    var tmp = new Utils.Template(tpl);
    var t = (new Date()).getTime();
    var icon = config.icon ? config.icon: 4;
    msg = tmp.evaluate({
        cnt: msg,
        des: des,
        icon: icon,
        t: t
    });
    var dialog = new App.Dialog.BasicDialog(title, msg, basic_conf);
    var btn_ok = $E("ok_" + t);
    var btn_cancel = $E("cancel_" + t);
    var hotkey = function(e) {
        var ev = window.event || e;
        var element;
        if (ev.target) {
            element = e.target
        } else {
            if (ev.srcElement) {
                element = e.srcElement
            }
        }
        if (element.nodeType == 3) {
            element = element.parentNode
        }
        if (element.tagName == "INPUT" || element.tagName == "TEXTAREA") {
            return
        }
        switch (ev.keyCode) {
        case 27:
            cancel_function();
            break
        }
    };
    var cancel_function = function() {
        if (callback_cancel) {
            try {
                callback_cancel()
            } catch(e) {}
        }
        callback_cancel = null;
        btn_ok.onclick = null;
        btn_cancel.onclick = null;
        btn_cancel = null;
        btn_ok = null;
        dialog.distory();
        dialog = null;
        Core.Events.removeEvent(document, hotkey, "keyup");
        return false
    };
    btn_ok.onclick = function() {
        if (callback_ok) {
            try {
                callback_ok()
            } catch(e) {}
        }
        callback_ok = null;
        btn_ok.onclick = null;
        btn_cancel.onclick = null;
        btn_cancel = null;
        btn_ok = null;
        dialog.distory();
        dialog = null;
        Core.Events.removeEvent(document, hotkey, "keyup");
        return false
    };
    btn_cancel.onclick = cancel_function;
    if (config.ok_focus) {
        if (config.hidden) {
            this.focusTarget = btn_ok
        } else {
            btn_ok.focus()
        }
    } else {
        if (config.cancel_focus) {
            if (config.hidden) {
                this.focusTarget = btn_cancel
            } else {
                btn_cancel.focus()
            }
        }
    }
    Core.Events.addEvent(document, hotkey, "keyup");
    return dialog
};
App.customDialog = function(content, config) {
    config = config ? config: {};
    var title = config.title ? config.title: $CLTMSG.CL0601;
    var basic_conf = {};
    basic_conf.width = config.width ? config.width: 360;
    basic_conf.height = config.height;
    basic_conf.zIndex = config.zIndex ? config.zIndex: 1000;
    basic_conf.hidden = config.hidden;
    var tpl = '#{cnt} <div class="layerBtn" id="btn_#{t}"></div>';
    var tmp = new Utils.Template(tpl);
    var t = (new Date()).getTime();
    var msg = tmp.evaluate({
        cnt: content,
        t: t
    });
    var dialog = new App.Dialog.BasicDialog(title, msg, basic_conf);
    var btn_node = $E("btn_" + t);
    var btns = config.btns;
    for (var i = 0; i < btns.length; i++) {
        var btn = btn_node.appendChild($C("a"));
        btn.className = "mBlogBtn";
        btn.href = "javascript:;";
        if (btns[i].select) {
            if (config.hidden) {
                this.focusTarget = btn
            } else {
                btn.focus()
            }
        }
        btn.innerHTML = "<em>" + btns[i].text + "</em>";
        btn.nohide = config.btns[i].nohide;
        btn.func = config.btns[i].func;
        btn.onclick = function() {
            var nohide = this.nohide;
            if (this.func) {
                try {
                    this.func()
                } catch(e) {}
            }
            if (!nohide) {
                dialog.close()
            }
            return false
        }
    }
    function _distory() {
        var nodes = btn_node.getElementsByTagName("A");
        for (var i in nodes) {
            nodes[i].nohide = null;
            nodes[i].func = null;
            nodes[i].onclick = null
        }
        btn_node = null
    }
    dialog.close = function() {
        dialog.onClose();
        _distory();
        dialog.distory()
    };
    return dialog
};
if (!App.getMsg) {
    App.getMsg = function(code, replace) {
        alert("you should override this function! get more help from dialog.js ");
        return code
    }
}
App.getMsg = function(msgCode, replace) {
    if (msgCode === undefined) {
        return ""
    }
    if (typeof(msgCode) == "object") {
        msgCode = msgCode.code
    }
    var msg = $SYSMSG[msgCode] || $CLTMSG[msgCode] || ("Error[" + msgCode + "]");
    if (replace) {
        var tmp = new Utils.Template(msg);
        return tmp.evaluate(replace)
    } else {
        return msg
    }
};
Sina.pkg("Core.Class");
Core.Class.extend = function(destination, source) {
    for (var property in source) {
        destination[property] = source[property]
    }
    return destination
};
App.enterSubmit = function(options) {
    options = Core.Class.extend({
        parent: document
    },
    options);
    var _p = $E(options.parent);
    var _checkEnter = function() {
        var _e = Core.Events.getEvent();
        var _k = _e.keyCode;
        var _act = this.getAttribute("act") || options.action || null;
        if (_k === 13 && _act) {
            try {
                if (typeof _act === "string") {
                    eval("(" + _act + ")();")
                } else {
                    if (typeof _act === "function") {
                        _act()
                    }
                }
            } catch(e) {}
        }
    };
    if (_p) {
        var els = _p.getElementsByTagName("input");
        for (var i = 0,
        l = els.length; i < l; i++) {
            var cur = els[i];
            var _t = cur.getAttribute("type").toLowerCase();
            if (_t === "text" || _t === "password" || _t === "checkbox") {
                if (cur.getAttribute("passenter") === "1") {
                    continue
                }
                Core.Events.addEvent(cur, _checkEnter.bind2(cur), "keydown")
            }
        }
    }
};
Core.Dom.getStyle = function(el, property) {
    switch (property) {
    case "opacity":
        var val = 100;
        try {
            val = el.filters["DXImageTransform.Microsoft.Alpha"].opacity
        } catch(e) {
            try {
                val = el.filters("alpha").opacity
            } catch(e) {}
        }
        return val / 100;
    case "float":
        property = "styleFloat";
    default:
        var value = el.currentStyle ? el.currentStyle[property] : null;
        return (el.style[property] || value)
    }
};
if (!Core.Base.detect.$IE) {
    Core.Dom.getStyle = function(el, property) {
        if (property == "float") {
            property = "cssFloat"
        }
        try {
            var computed = document.defaultView.getComputedStyle(el, "")
        } catch(e) {
            traceError(e)
        }
        return el.style[property] || computed ? computed[property] : null
    }
}
Core.Dom.getXY = function(el) {
    if ((el.parentNode == null || el.offsetParent == null || Core.Dom.getStyle(el, "display") == "none") && el != document.body) {
        return false
    }
    var parentNode = null;
    var pos = [];
    var box;
    var doc = el.ownerDocument;
    box = el.getBoundingClientRect();
    var scrollPos = Core.System.getScrollPos(el.ownerDocument);
    return [box.left + scrollPos[1], box.top + scrollPos[0]];
    parentNode = el.parentNode;
    while (parentNode.tagName && !/^body|html$/i.test(parentNode.tagName)) {
        if (Core.Dom.getStyle(parentNode, "display").search(/^inline|table-row.*$/i)) {
            pos[0] -= parentNode.scrollLeft;
            pos[1] -= parentNode.scrollTop
        }
        parentNode = parentNode.parentNode
    }
    return pos
};
if (!$IE) {
    Core.Dom.getXY = function(el) {
        if ((el.parentNode == null || el.offsetParent == null || Core.Dom.getStyle(el, "display") == "none") && el != document.body) {
            return false
        }
        var parentNode = null;
        var pos = [];
        var box;
        var doc = el.ownerDocument;
        pos = [el.offsetLeft, el.offsetTop];
        parentNode = el.offsetParent;
        var hasAbs = Core.Dom.getStyle(el, "position") == "absolute";
        if (parentNode != el) {
            while (parentNode) {
                pos[0] += parentNode.offsetLeft;
                pos[1] += parentNode.offsetTop;
                if (scope.$SAFARI && !hasAbs && Core.Dom.getStyle(parentNode, "position") == "absolute") {
                    hasAbs = true
                }
                parentNode = parentNode.offsetParent
            }
        }
        if (scope.$SAFARI && hasAbs) {
            pos[0] -= el.ownerDocument.body.offsetLeft;
            pos[1] -= el.ownerDocument.body.offsetTop
        }
        parentNode = el.parentNode;
        while (parentNode.tagName && !/^body|html$/i.test(parentNode.tagName)) {
            if (Core.Dom.getStyle(parentNode, "display").search(/^inline|table-row.*$/i)) {
                pos[0] -= parentNode.scrollLeft;
                pos[1] -= parentNode.scrollTop
            }
            parentNode = parentNode.parentNode
        }
        return pos
    }
}
Core.Dom.addHTML = function(oParentNode, sHTML) {
    oParentNode.insertAdjacentHTML("BeforeEnd", sHTML)
};
if (!$IE) {
    Core.Dom.addHTML = function(oParentNode, sHTML) {
        var oRange = oParentNode.ownerDocument.createRange();
        oRange.setStartBefore(oParentNode);
        var oFrag = oRange.createContextualFragment(sHTML);
        oParentNode.appendChild(oFrag)
    }
}
App.fixElement = {
    init: function(wrap) {
        var el = $E("mod_login_tip");
        if (!el) {
            var errorHTML = '<div class="errorLayer" id="mod_login_tip" style="visibility:hidden">				<div class="top"></div>			    <div class="mid">			    	<div class="close" onclick="App.fixElement.hidden()" id="mod_login_close">x</div>			        <div class="conn">			        		<p class="bigtxt" id="mod_login_title"></p>				            <span class="stxt" id="mod_login_content" style="padding:0px;"></span>			        </div>			    </div>			    <div class="bot"></div>			</div>			';
            if (wrap) {
                wrap.innerHTML = errorHTML
            } else {
                Core.Dom.addHTML((document.body), errorHTML)
            }
        }
        el = $E("mod_login_tip");
        this.element = el
    },
    setHTML: function(title, content, options) {
        this.init($E(options.wrap));
        $E("mod_login_title").innerHTML = title || "";
        if (content) {
            $E("mod_login_content").innerHTML = content;
            $E("mod_login_content").style.display = ""
        } else {
            $E("mod_login_content").style.display = "none"
        }
        this.fixPostion(options || {});
        this.show()
    },
    fixPostion: function(obj) {
        var offsetX = obj.offsetX || 0;
        var offsetY = obj.offsetY || 0;
        var ref = $E(obj.ref);
        var target = this.element;
        var aPos = Core.Dom.getXY(ref);
        target.style.position = "absolute";
        if (!obj.wrap) {
            target.style.left = (aPos[0] + offsetX) + "px";
            target.style.top = (aPos[1] + offsetY - target.offsetHeight) + "px"
        } else {
            target.style.marginTop = ( - target.offsetHeight + offsetY) + "px";
            target.style.marginLeft = (offsetX) + "px"
        }
        target.style.zIndex = obj.zIndex || 10;
        return target
    },
    show: function() {
        this.element && (this.element.style.visibility = "visible");
        if ($E("mod_login_title")) {
            $E("mod_login_title").className = "bigtxt"
        }
    },
    hidden: function() {
        this.element = this.element || $E("mod_login_tip");
        this.element && (this.element.style.visibility = "hidden")
    }
};
Sina.pkg("Utils.Cookie");
Utils.Cookie.getCookie = function(name) {
    name = name.replace(/([\.\[\]\$])/g, "\\$1");
    var rep = new RegExp(name + "=([^;]*)?;", "i");
    var co = document.cookie + ";";
    var res = co.match(rep);
    if (res) {
        return res[1] || ""
    } else {
        return ""
    }
};
Utils.Cookie.setCookie = function(name, value, expire, path, domain, secure) {
    var cstr = [];
    cstr.push(name + "=" + escape(value));
    if (expire) {
        var dd = new Date();
        var expires = dd.getTime() + expire * 3600000;
        dd.setTime(expires);
        cstr.push("expires=" + dd.toGMTString())
    }
    if (path) {
        cstr.push("path=" + path)
    }
    if (domain) {
        cstr.push("domain=" + domain)
    }
    if (secure) {
        cstr.push(secure)
    }
    document.cookie = cstr.join(";")
};
Utils.Cookie.deleteCookie = function(name) {
    document.cookie = name + "=;expires=Fri, 31 Dec 1999 23:59:59 GMT;"
};


App.initLoginInput = function(oUserInput, text) {
    if (oUserInput) { (function(sText, oInput, sValue) {
            oInput.style.color = "#999999";
            oInput.alt = oInput.title = sText;
            if (!sValue) {
                oInput.value = sText
            }
            if (!oInput.binded) {
                Core.Events.addEvent(oInput,
                function() {
                    oInput.style.color = "#333333";
                    if (oInput.value == sText) {
                        oInput.value = ""
                    }
                },
                "focus");
                Core.Events.addEvent(oInput,
                function() {
                    oInput.style.color = "#999999";
                    if (oInput.value == "") {
                        oInput.value = sText
                    }
                },
                "blur");
                oUserInput.binded = true
            }
        })((text ? $SYSMSG[text] : $CLTMSG.R01008), oUserInput, oUserInput.value)
    }
  
};
App.LoginAction = function(cfg) {
    var login_name = Core.String.trim(cfg.name);
    var login_pwd = Core.String.trim(cfg.pwd);
    var login_remb = cfg.remb ? "7": "0";
    if (!login_name) {
        cfg.error($CLTMSG.CL0801);
        return
    } else {
        if (!login_pwd) {
            cfg.error($CLTMSG.CL0802);
            return
        }
    }
    var doLogin = function() {
        var Login = window.sinaSSOController;
        Login.customLoginCallBack = function(res) {
            if (res.result) {
                Login.customLoginCallBack = function() {};
                Utils.Cookie.setCookie("un", login_name, 240, "/", "t.sina.com.cn");
                cfg.succ()
            } else {
                cfg.error(res.reason, res.errno);
                login_pwd.value = ""
            }
            Login.customLoginCallBack = function() {};
            Login = null
        };
        Login.login(login_name, login_pwd, login_remb)
    };
    if (typeof window.sinaSSOController != "undefined") {
        doLogin()
    } else {
        var d = document,
        j = d.createElement("script"),
        h = d.body,
        s = false;
        j.type = "text/javascript";
        j.charset = "UTF-8";
        j.src = "http://tjs.sjs.sinajs.cn/t3/miniblog/static/js/sso.js";
        j.onload = j.onreadystatechange = function() {
            if (!s && (!this.readyState || this.readyState == "loaded" || this.readyState == "complete")) {
                s = true;
                j.onload = j.onreadystatechange = null;
                setTimeout(doLogin, 1000)
            }
        };
        try {
            h.appendChild(j)
        } catch(e) {}
    }
};
Core.Events.fireEvent = function(oElement, sEvent) {
    oElement = $E(oElement);
    if ($IE) {
        oElement.fireEvent("on" + sEvent)
    } else {
        var evt = document.createEvent("HTMLEvents");
        evt.initEvent(sEvent, true, true);
        oElement.dispatchEvent(evt)
    }
};
Core.String.byteLength = function(str) {
    if (typeof str == "undefined") {
        return 0
    }
    var aMatch = str.match(/[^\x00-\x80]/g);
    return (str.length + (!aMatch ? 0 : aMatch.length))
}; (function(proxy) {
    proxy.checkEml = function(eml) {
        if (!/^[\.\w]([(\/)(\-)(\+).\w])*@([(\-)\w]{1,64}\.){1,7}[(\-)\w]{1,64}$/.test(eml)) {
            return false
        } else {
            if (eml && eml != "" && (eml.indexOf("@") != -1)) {
                var indexOfA = eml.indexOf("@");
                var name = eml.substring(0, indexOfA);
                if (name.length > 64 || eml.length > 256) {
                    return false
                } else {
                    return true
                }
            }
        }
        return false
    };
    proxy.checkEmpty = function(str) {
        if (!str) {
            return false
        }
        if (! (str instanceof String)) {
            str = str.toString()
        }
        if ((Core.String.trim(str)).length) {
            return true
        } else {
            return false
        }
    };
    proxy.checkRealName = function(str) {
        if (new RegExp("^[\u4e00-\u9fa5]{2,6}$").test(str)) {
            return true
        } else {
            if (new RegExp("^[a-z]{2,20}$").test(str)) {
                return true
            } else {
                if (new RegExp("^[a-z\u4e00-\u9fa5]{2,6}$")) {
                    return true
                } else {
                    return false
                }
            }
        }
    };
    var checkBase = function(regStr) {
        return function(beRegStr) {
            if (new RegExp(regStr).test(beRegStr)) {
                return true
            } else {
                return false
            }
        }
    };
    proxy.checkQQNum = function(str) {
        if (new RegExp("^[1-9][0-9]{4,11}$").test(str)) {
            return true
        } else {
            if (proxy.checkEml(str)) {
                return true
            } else {
                return false
            }
        }
    };
    proxy.checkUCNum = function(str) {
        if (new RegExp("^[1-9][0-9]{4,9}$").test(str)) {
            return true
        } else {
            return false
        }
    };
    proxy.checkMobile = checkBase("^1(\\d{10})+$");
    proxy.checkTrName = checkBase("^[\u4e00-\u9fa5]{2,6}$");
    proxy.checkNickSp = checkBase("^[0-9a-zA-Z\u4e00-\u9fa5_]*$");
    proxy.checkNickSp2 = checkBase("^[0-9a-zA-Z\u4e00-\u9fa5_-]*$");
    proxy.checkTrueNm = checkBase("^[a-zA-Z·s.\u4e00-\u9fa5]*$");
    proxy.checkSkype1 = checkBase("^[0-9a-zA-Z](-|w){3}(-|w)*$");
    proxy.checkSkype2 = checkBase("[!#@%&/'\"$^*()+=[]{}?;:<>|~`\x80-\xff\\]");
    proxy.checkImgURI = checkBase("(.jpg|.gif|.png|.JPG|.GIF|.PNG)$");
    proxy.checkURL = checkBase("^http:\\/\\/([\\w-]+(\\.[\\w-]+)+(\\/[\\w-   .\\/\\?%@&+=\\u4e00-\\u9fa5]*)?)?$");
    proxy.checkURLoose = checkBase("^([^://])+\\:\\/\\/([^\\.]+)(\\.)(.+)([^\\.]+)$");
    proxy.checkMiniName = checkBase("^[a-zA-Z0-9\u4e00-\u9fa5\uff00-\uffff\u0800-\u4e00\u3130-\u318f\uac00-\ud7a3_]*$");
    proxy.checkIdCard = checkBase("^(([0-9]{15})|([0-9]{18})|([0-9]{17}(x|X)))$");
    proxy.checkSchool = function(str) {
        if (new RegExp("'|\"|<|>|[|]", "g").test(str)) {
            return false
        } else {
            return true
        }
    };
    proxy.checkCompany = function(str) {
        if (new RegExp("'|\"|<|>|[|]", "g").test(str)) {
            return false
        } else {
            return true
        }
    };
    proxy.checkMobileCheckCode = checkBase("^[0-9a-z]{6}$");
    proxy.checkSepicalSymbol = function(str) {
        if (new RegExp("[,|;|<|>]", "g").test(str)) {
            return true
        } else {
            return false
        }
    };
    proxy.checkPwdPower = function(pwd, minlen, maxlen) {
        var len_p = (pwd.length - minlen) / (maxlen - minlen);
        var complex_p = 0;
        if (/[A-Z]/g.test(pwd)) {
            complex_p += 0.273
        }
        if (/[a-z]/g.test(pwd)) {
            complex_p += 0.273
        }
        if (/[0-9]/g.test(pwd)) {
            complex_p += 0.114
        }
        if (/[^0-9a-zA-Z]/g.test(pwd)) {
            complex_p += 0.34
        }
        return len_p / 2 + complex_p / 2
    };
    proxy.checkPwdPowerNew = function(sPW) {
        function CharMode(iN) {
            if (iN >= 65 && iN <= 90) {
                return 2
            }
            if (iN >= 97 && iN <= 122) {
                return 4
            } else {
                return 1
            }
        }
        function bitTotal(num) {
            var modes = 0;
            for (i = 0; i < 3; i++) {
                if (num & 1) {
                    modes++
                }
                num >>>= 1
            }
            return modes
        }
        var Modes = 0;
        for (i = 0; i < sPW.length; i++) {
            Modes |= CharMode(sPW.charCodeAt(i))
        }
        var btotal = bitTotal(Modes);
        if (sPW.length >= 10) {
            btotal++
        }
        switch (btotal) {
        case 1:
            return 1;
        case 2:
            return 2;
        case 3:
            return 3;
        default:
            return 1
        }
    }
})(App);
App.timer = new
function() {
    this.list = {};
    this.refNum = 0;
    this.clock = null;
    this.allpause = false;
    this.delay = 25;
    this.add = function(fun) {
        if (typeof fun != "function") {
            throw ("The timer needs add a function as a parameters")
        }
        var key = "" + (new Date()).getTime() + (Math.random()) * Math.pow(10, 17);
        this.list[key] = {
            fun: fun,
            pause: false
        };
        if (this.refNum <= 0) {
            this.start()
        }
        this.refNum++;
        return key
    };
    this.remove = function(key) {
        if (this.list[key]) {
            delete this.list[key];
            this.refNum--
        }
        if (this.refNum <= 0) {
            this.stop()
        }
    };
    this.pause = function(key) {
        if (this.list[key]) {
            this.list[key]["pause"] = true
        }
    };
    this.play = function(key) {
        if (this.list[key]) {
            this.list[key]["pause"] = false
        }
    };
    this.stop = function() {
        clearInterval(this.clock);
        this.clock = null
    };
    this.start = function() {
        var _this = this;
        this.clock = setInterval(function() {
            _this.loop.apply(_this)
        },
        this.delay)
    };
    this.loop = function() {
        for (var k in this.list) {
            if (!this.list[k]["pause"]) {
                this.list[k]["fun"]()
            }
        }
    }
};
App.animation = {
    vibrate: function(d, v, m, k, s, u) {
        var T = 2 * Math.PI * Math.sqrt(m / k);
        var A = v * Math.sqrt(m / k);
        var n = Math.ceil(T * 100 / d);
        var c = 0;
        var orbit = [];
        while (A > s) {
            orbit.push(A * Math.sin((c / n) * 2 * Math.PI));
            c++;
            c = c % n;
            A = A - u
        }
        return orbit
    },
    accelerate: function(d, h, g, v) {
        var orbit = [];
        var l = 0;
        while (true) {
            var v1 = v;
            v = v1 + d * g / 10;
            l = l + d * (v + v1) / 20;
            if (l < h) {
                orbit.push(l)
            } else {
                break
            }
        }
        return orbit
    },
    curtain: function(d, h, p) {
        var orbit = [h];
        var l = h;
        while (l > 1) {
            l = l * p;
            orbit.unshift(l)
        }
        return orbit
    },
    speed: function(d, h, v) {
        var t = Math.ceil(h / v);
        var n = Math.ceil(t * 100 / d);
        var orbit = [];
        for (var i = 0; i < n; i++) {
            orbit.push((i + 1) * h / n)
        }
        return orbit
    },
    circle: function(d, l, v) {
        var t = 2 * Math.PI * l / v;
        var n = Math.ceil(t * 100 / d);
        var orbit = [];
        for (var i = 0; i < n; i++) {
            orbit.push({
                x: l * Math.sin(((i + 1) / n) * 2 * Math.PI),
                y: l * Math.cos(((i + 1) / n) * 2 * Math.PI)
            })
        }
        return orbit
    },
    taccelerate: function(d, h, t) {
        var n = Math.ceil(t * 100 / d);
        var orbit = [];
        for (var i = 0; i < n; i++) {
            orbit.push(Math.pow((i + 1) / n, 2) * h)
        }
        return orbit
    }
}; (function(proxy) {
    var movingKey = false;
    var g = 10;
    var m = 20;
    var k = 10;
    var s = 0;
    var u = 0;
    var l = 0;
    var v = 0;
    var p = 0.4;
    proxy.curtain = {
        droop: function(element, callBack, isHorizontal) {
            if (movingKey) {
                return false
            }
            movingKey = true;
            var elementOverflow = element.style.overflow;
            element.style.visibility = "hidden";
            element.style.display = "block";
            element.style.overflow = "hidden";
            var h = parseInt(element.offsetHeight);
            var dropOrbit = proxy.animation.curtain(proxy.timer.delay, h, p);
            var current = 0;
            var tk = proxy.timer.add(function() {
                if (current >= dropOrbit.length) {
                    proxy.timer.remove(tk);
                    element.style.height = h + "px";
                    element.style.overflow = elementOverflow;
                    movingKey = false;
                    if (typeof callBack == "function") {
                        callBack()
                    }
                    return false
                }
                element.style.height = dropOrbit[current] + "px";
                element.scrollTop = (h - dropOrbit[current]);
                current++
            });
            element.style.height = "0px";
            element.style.visibility = "visible";
            return true
        },
        raise: function(element, isHorizontal) {
            if (movingKey) {
                return false
            }
            movingKey = true;
            var elementOverflow = element.style.overflow;
            element.style.overflow = "hidden";
            var h = parseInt(element.offsetHeight);
            var orbit = [];
            if (u !== 0) {
                var lis = proxy.animation.speed(proxy.timer.delay, h * l, g / l);
                for (var i = 0,
                len = lis.length; i < len; i++) {
                    orbit.push(h + lis[i])
                }
            }
            var li2 = proxy.animation.speed(proxy.timer.delay, h * (1 + l), g * 10);
            for (var i = 0,
            len = li2.length; i < len; i++) {
                orbit.push(li2[len - i - 1])
            }
            var current = 0;
            var tk = proxy.timer.add(function() {
                if (current >= orbit.length) {
                    proxy.timer.remove(tk);
                    element.style.display = "none";
                    element.style.height = h + "px";
                    element.style.overflow = elementOverflow;
                    movingKey = false;
                    return false
                }
                element.style.height = orbit[current] + "px";
                element.scrollTop = (h - orbit[current]);
                current++
            })
        },
        setting: function(config) {
            g = config.g || g;
            m = config.m || m;
            k = config.k || k;
            s = config.s || s;
            u = config.u || u;
            l = config.l || l
        }
    }
})(App);
App.promptTip = function(msgCode, replace, id, type) {
    var icon = {
        ask: 4,
        wrong: 1,
        error: 2,
        ok: 3
    };
    type = type ? type: "ok";
    var promptText = (typeof msgCode == "object") ? App.getMsg(msgCode, replace) : msgCode;
    var str = '		<div class="PY_clew">	            <div class="PY_clewcon">	                <div class="icon"><img align="absmiddle" class="PY_ib PY_ib_' + icon[type] + '" src="' + scope.$BASEIMG + 'style/images/common/PY_ib.gif" alt="" title=""/></div>	                <div class="txt bold">	                    ' + promptText + '	                </div>	                <div class="clear"></div>	            </div>	    </div>';
    var errId = $E(id ? id: "system_information");
    errId.innerHTML = str;
    errId.style.display = "";
    App.curtain.droop(errId);
    window.scrollTo(0, 0);
    App.promptTip.close = (function(allreadyId) {
        return function() {
            if (allreadyId) {
                App.curtain.raise(allreadyId)
            }
        }
    })(errId);
    setTimeout(function() {
        App.promptTip.close()
    },
    2000)
}; (function(proxy) {
    var _addEvent = Core.Events.addEvent;
    var _trim = Core.String.trim;
    proxy.checkForm = function(UIfunction) {
        var that = {};
        var list = {};
        that.add = function(key, affect, error, check, evType) {
            list[key] = proxy.checkItem(key, affect, error, UIfunction, check, evType)
        };
        that.check = function(kList) {
            var ret = true;
            if (kList) {
                for (var i = 0,
                len = kList.length; i < len; i += 1) {
                    if (list[kList[i]]) {
                        if (!list[kList[i]].check()) {
                            list[kList[i]].changeUI(false);
                            ret = false
                        }
                    }
                }
            } else {
                for (var k in list) {
                    if (!list[k].check()) {
                        list[k].changeUI(false);
                        ret = false
                    }
                }
            }
            return ret
        };
        that.toggleError = function(keys, errType) {
            for (var i = 0,
            len = keys.length; i < len; i += 1) {
                if (list[keys[i]]) {
                    list[keys[i]].changeUI(errType);
                    return true
                }
            }
            return false
        };
        that.showError = function(keys) {
            return this.toggleError(keys, false)
        };
        that.hideError = function(keys) {
            this.toggleError(keys, true)
        };
        return that
    };
    proxy.checkItem = function(key, affect, error, UIfunction, check, evType) {
        var that = {};
       
        if (check === undefined) {
            check = function(el) {
                if (_trim(el.value) === "") {
                    return false
                } else {
                    return true
                }
            }
        }
        that.changeUI = function(noError) {
            UIfunction(key, noError, affect, error)
        };
        that.check = function() {
            var noError = check(affect);
            UIfunction(key, noError, affect, error);
            return noError
        };
        that.getAttr = function() {};
        if (affect.tagName !== "SELECT" && affect.length) {
            for (var i = 0,
            len = affect.length; i < len; i += 1) {
                _addEvent(affect[i],
                function() {
                    that.check()
                },
                evType)
            }
        } else {
            _addEvent(affect,
            function() {
                that.check()
            },
            evType)
        }
        return that
    }
})(App);
Core.Array.findit = function(arr, v) {
    var k = -1;
    Core.Array.foreach(arr,
    function(value, index) {
        if (v == value) {
            k = index
        }
    });
    return k
};
Core.Array.uniq = function(ar) {
    var result = [];
    for (var i = 0; i < ar.length; i++) {
        var x = ar[i];
        if (Core.Array.findit(result, x) == -1) {
            result.push(x)
        }
    }
    return result
};
App.nameValue = function(item, isClear) {
    var _name = item.getAttribute("name");
    var _type = item.getAttribute("type");
    var _el = item.tagName;
    var _value = {
        name: _name,
        value: ""
    };
    var _setVl = function(vl) {
        if (vl === false) {
            _value = false;
            return false
        }
        if (!_value.value) {
            _value.value = Core.String.trim(vl || "")
        } else {
            _value.value = [Core.String.trim(vl || "")].concat(_value.value)
        }
    };
    if (!item.disabled && _name) {
        switch (_el) {
        case "INPUT":
            if (_type == "radio" || _type == "checkbox") {
                if (item.checked) {
                    _setVl(item.value)
                } else {
                    _setVl(false)
                }
            } else {
                if (_type == "reset" || _type == "submit" || _type == "image") {
                    _setVl(false)
                } else {
                    _setVl(isClear ? (item.value || false) : item.value)
                }
            }
            break;
        case "SELECT":
            if (item.multiple) {
                var _ops = item.options;
                for (var i = 0,
                len = _ops.length; i < len; i++) {
                    if (_ops[i].selected) {
                        _setVl(_ops[i].value)
                    }
                }
            } else {
                _setVl(item.value)
            }
            break;
        case "TEXTAREA":
            _setVl(isClear ? (item.value || item.getAttribute("value") || false) : (item.value || item.getAttribute("value")));
            break;
        case "BUTTON":
        default:
            _setVl(item.value || item.getAttribute("value") || item.innerHTML || false)
        }
    } else {
        _setVl(false)
    }
    return _value
};
App.htmlToJson = function(mainBox, tagNameList, isClear) {
    var _retObj = {};
    tagNameList = Core.Array.uniq(tagNameList || ["INPUT", "TEXTAREA", "BUTTON", "SELECT"]);
    if (!mainBox || !tagNameList) {
        return false
    }
    var _opInput = App.nameValue;
    for (var i = 0,
    len = tagNameList.length; i < len; i++) {
        var _tags = mainBox.getElementsByTagName(tagNameList[i]);
        for (var j = 0,
        lenTag = _tags.length; j < lenTag; j++) {
            var _info = _opInput(_tags[j], isClear);
            if (!_info) {
                continue
            }
            if (_retObj[_info.name]) {
                if (_retObj[_info.name] instanceof Array) {
                    _retObj[_info.name] = _retObj[_info.name].concat(_info.value)
                } else {
                    _retObj[_info.name] = [_retObj[_info.name]].concat(_info.value)
                }
            } else {
                _retObj[_info.name] = _info.value
            }
        }
    }
    return _retObj
};
App.jsonToQuery = function(JSON, isEncode) {
    var _Qstring = [];
    var _fdata = function(data) {
        data = Core.String.trim(data.toString());
        if (isEncode) {
            return encodeURIComponent(data)
        } else {
            return data
        }
    };
    if (typeof JSON == "object") {
        for (var k in JSON) {
            if (JSON[k] instanceof Array) {
                for (var i = 0,
                len = JSON[k].length; i < len; i++) {
                    _Qstring.push(k + "=" + _fdata(JSON[k][i]))
                }
            } else {
                _Qstring.push(k + "=" + _fdata(JSON[k]))
            }
        }
    }
    if (_Qstring.length) {
        return _Qstring.join("&")
    } else {
        return ""
    }
}; (function(proxy) {
    proxy.includeJson = function(json1, json2) {
        for (var k in json1) {
            if (typeof json1[k] == Object) {
                if (json1[k] instanceof Array) {
                    if (json2[k] === undefined || json2[k].join("|") != json1[k].join("|")) {
                        return false
                    }
                } else {
                    if (typeof json2[k] == Object) {
                        return argument.callee(json1[k], json2[k])
                    } else {
                        return false
                    }
                }
            } else {
                if (json2[k] === undefined || json2[k] != json1[k]) {
                    return false
                }
            }
        }
        return true
    };
    proxy.compareJson = function(json1, json2) {
        if (proxy.includeJson(json1, json2) && proxy.includeJson(json2, json1)) {
            return true
        } else {
            return false
        }
    }
})(App);
App.setPassword = function(id, tid) {
    var _password_input = $E(id);
    var _password_input_text = $E(tid);
   
    Core.Events.addEvent(_password_input_text,
    function() {
        _password_input_text.style.display = "";
        _password_input.style.display = "";
        _password_input.focus();
        return false
    },
    "focus");
    Core.Events.addEvent(_password_input,
   
    "blur");
    return false
}; (function(proxy) {
    var Builder = function(domJson, box) {
        this.box = null;
        this.domList = {};
        this.actList = {};
        if (box) {
            this.box = box
        } else {
            this.box = document.createElement("DIV")
        }
        if (domJson) {
            this.makeTree(this.box, domJson)
        }
    }; (function(_p) {
        _p.init = function() {};
        _p.disp = function() {};
        _p.NODEMAP = {
            AREA: "MAP",
            CAPTION: "TABLE",
            COL: "TABLE|COLGROUP",
            COLGROUP: "TABLE",
            LEGEND: "FIELDSET",
            OPTGROUP: "SELECT",
            OPTION: "SELECT",
            PARAM: "OBJECT",
            TBODY: "TABLE",
            TD: "TR",
            TFOOT: "TABLE",
            TH: "TABLE|TR",
            THEAD: "TABLE",
            TR: "TBODY|THEAD|TH|TFOOT"
        };
        _p.create = function(tagName, attributes) {
            var dom = null;
            tagName = tagName.toUpperCase();
            if (tagName == "TEXT") {
                dom = document.createTextNode(attributes)
            } else {
                dom = document.createElement(tagName)
            }
            if (typeof attributes == "object") {
                for (var k in attributes) {
                    switch (k) {
                    case "class":
                        dom.className = attributes[k];
                        break;
                    case "id":
                        this.domList[attributes[k]] = dom;
                        break;
                    case "action":
                        if (this.actList[attributes[k]]) {
                            this.actList[attributes[k]] = [dom].concat(this.actList[attributes[k]])
                        } else {
                            this.actList[attributes[k]] = dom
                        }
                        break;
                    case "style":
                        dom.style.cssText = attributes[k];
                        break;
                    case "innerHTML":
                        dom.innerHTML = attributes[k];
                        break;
                    case "nodeValue":
                        dom.nodeValue = attributes[k];
                        break;
                    default:
                        dom.setAttribute(k, attributes[k])
                    }
                }
            }
            return dom
        };
        _p.check = function(parent, childObj) {
            var tnames = this.NODEMAP[childObj.tagName];
            if (this.NODEMAP[childObj.tagName]) {
                var pList = tnames.split("|");
                for (var i = 0,
                len = pList.length; i < len; i++) {
                    if (parent.tagName == pList[i]) {
                        return true
                    }
                }
                return false
            }
            return true
        };
        _p.append = function(parent, childObj) {
            childObj.tagName = childObj.tagName.toLocaleUpperCase();
            if (!this.check(parent, childObj)) {
                return false
            }
            var returnDom = this.create(childObj.tagName, childObj.attributes);
            parent.appendChild(returnDom);
            return returnDom
        };
        _p.makeTree = function(parent, objList) {
            for (var i = 0,
            len = objList.length; i < len; i++) {
                var Leaves = this.append(parent, objList[i]);
                if (!Leaves) {
                    alert("tree wrong!!!");
                    return false
                }
                if (objList[i].childList && objList[i].childList.length) {
                    this.makeTree(Leaves, objList[i].childList)
                }
            }
        }
    })(Builder.prototype);
    proxy.Builder = Builder;
    proxy.domBuilder = new Builder()
})(App); (function(proxy) {
    var common = [{
        tagName: "SPAN",
        attributes: {
            "class": "zhuolu_isnote",
            id: "box",
            style: "width: 170px; position: absolute; z-index: 251; top: 73px; left: 320px;"
        }
    }];
    var tips = new App.Builder(common);
    tips.box = tips.domList.box;
    tips.box.style.display = "none";
    tips.box.style.position = "absolute";
    tips.box.style.zIndex = 1251;
    var succHTML = '<span class="iswhat isok"><img class="tipicon tip3" src="' + scope.$BASEIMG + 'style/images/common/transparent.gif" alt="" title=""></span>';
    var errorHTML = '<span class="iswhat iserro"><img class="tipicon tip2" src="' + scope.$BASEIMG + 'style/images/common/transparent.gif" alt="" title="" /><em>${error}</em></span>';
    proxy.checkFormUI4 = function(key, noError, affect, errorPos) {
        if (affect.errorKey && affect.errorKey !== key && noError) {
            return false
        } else {
            try {
                if (noError) {
                    affect.errorKey = false;
                    errorPos.style.display = "";
                    errorPos.innerHTML = succHTML;
                    if (affect.value !== undefined && (!affect.value.length || affect.noRightIcon)) {
                        errorPos.style.display = "none";
                        return false
                    }
                } else {
                    affect.errorKey = key;
                    errorPos.style.display = "";
                    errorPos.innerHTML = errorHTML.replace("${error}", $SYSMSG[key])
                }
            } catch(exp) {}
        }
    };
    proxy.bindFormTips4 = function(els) {
        document.body.appendChild(tips.box);
        for (var i = 0,
        len = els.length; i < len; i += 1) { (function(k) {
                Core.Events.addEvent(els[k]["el"],
                function() {
                    var posEl = els[k]["el"].parentNode;
                    var pos = Core.Dom.getXY(posEl);
                    if (!els[k]["el"].value.length && els[k]["key"] && $SYSMSG[els[k]["key"]]) {
                        tips.domList.box.innerHTML = "<em>" + $SYSMSG[els[k]["key"]] + "</em>";
                        tips.box.style.top = (pos[1] + 10) + "px";
                        var posLeft = parseInt(posEl.getAttribute("positionLeft")) || ($IE ? 7 : 9);
                        if (posLeft) {
                            tips.box.style.left = pos[0] + posEl.offsetWidth + posLeft + "px"
                        } else {
                            tips.box.style.left = pos[0] + posEl.offsetWidth + "px"
                        }
                        tips.box.style.display = "";
                        if (els[k]["errorPos"]) {
                            els[k]["errorPos"].style.display = "none"
                        }
                    }
                },
                "focus");
                Core.Events.addEvent(els[k]["el"],
                function() {
                    tips.box.style.display = "none"
                },
                "blur")
            })(i)
        }
    }
})(App);
App.TextareaUtils = (function() {
    var it = {},
    ds = document.selection;
    it.selectionStart = function(oElement) {
        if (!ds) {
            return oElement.selectionStart
        }
        var er = ds.createRange(),
        value,
        len,
        s = 0;
        var er1 = document.body.createTextRange();
        er1.moveToElementText(oElement);
        for (s; er1.compareEndPoints("StartToStart", er) < 0; s++) {
            er1.moveStart("character", 1)
        }
        return s
    };
    it.selectionBefore = function(oElement) {
        return oElement.value.slice(0, it.selectionStart(oElement))
    };
    it.selectText = function(oElement, nStart, nEnd) {
        oElement.focus();
        if (!ds) {
            oElement.setSelectionRange(nStart, nEnd);
            return
        }
        var c = oElement.createTextRange();
        c.collapse(1);
        c.moveStart("character", nStart);
        c.moveEnd("character", nEnd - nStart);
        c.select()
    };
    it.insertText = function(oElement, sInsertText, nStart, nLen) {
        oElement.focus();
        nLen = nLen || 0;
        if (!ds) {
            var text = oElement.value,
            start = nStart - nLen,
            end = start + sInsertText.length;
            oElement.value = text.slice(0, start) + sInsertText + text.slice(nStart, text.length);
            it.selectText(oElement, end, end);
            return
        }
        var c = ds.createRange();
        c.moveStart("character", -nLen);
        c.text = sInsertText
    };
    it.getCursorPos = function(obj) {
        var CaretPos = 0;
        if ($IE) {
            obj.focus();
            var range = null;
            range = ds.createRange();
            var stored_range = range.duplicate();
            stored_range.moveToElementText(obj);
            stored_range.setEndPoint("EndToEnd", range);
            obj.selectionStart = stored_range.text.length - range.text.length;
            obj.selectionEnd = obj.selectionStart + range.text.length;
            CaretPos = obj.selectionStart
        } else {
            if (obj.selectionStart || obj.selectionStart == "0") {
                CaretPos = obj.selectionStart
            }
        }
        return CaretPos
    };
    it.getSelectedText = function(obj) {
        var selectedText = "";
        var getSelection = function(e) {
            if (e.selectionStart != undefined && e.selectionEnd != undefined) {
                return e.value.substring(e.selectionStart, e.selectionEnd)
            } else {
                return ""
            }
        };
        if (window.getSelection) {
            selectedText = getSelection(obj)
        } else {
            selectedText = ds.createRange().text
        }
        return selectedText
    };
    it.setCursor = function(obj, pos, coverlen) {
        pos = pos == null ? obj.value.length: pos;
        coverlen = coverlen == null ? 0 : coverlen;
        obj.focus();
        if (obj.createTextRange) {
            var range = obj.createTextRange();
            range.move("character", pos);
            range.moveEnd("character", coverlen);
            range.select()
        } else {
            obj.setSelectionRange(pos, pos + coverlen)
        }
    };
    it.unCoverInsertText = function(obj, str, pars) {
        pars = (pars == null) ? {}: pars;
        pars.rcs = pars.rcs == null ? obj.value.length: pars.rcs * 1;
        pars.rccl = pars.rccl == null ? 0 : pars.rccl * 1;
        var text = obj.value,
        fstr = text.slice(0, pars.rcs),
        lstr = text.slice(pars.rcs + pars.rccl, text == "" ? 0 : text.length);
        obj.value = fstr + str + lstr;
        this.setCursor(obj, pars.rcs + (str == null ? 0 : str.length))
    };
    return it
})(); (function() {
    var parseParam = function(oSource, oParams) {
        var key;
        try {
            if (typeof oParams != "undefined") {
                for (key in oSource) {
                    if (oParams[key] != null) {
                        oSource[key] = oParams[key]
                    }
                }
            }
        } finally {
            key = null;
            return oSource
        }
    };
    Core.Base.parseParam = parseParam
})();
Utils.Io.JsLoad = {}; (function() {
    function createScripts(oOpts, oCFG) {
        processUrl(oOpts, oCFG);
        var urls = oOpts.urls;
        var i, len = urls.length;
        for (i = 0; i < len; i++) {
            var js = $C("script");
            js.src = urls[i].url;
            js.charset = urls[i].charset;
            js[Core.Base.detect.$IE ? "onreadystatechange": "onload"] = function() {
                if (Core.Base.detect.$MOZ || this.readyState.toLowerCase() == "complete" || this.readyState.toLowerCase() == "loaded") {
                    oCFG.script_loaded_num++
                }
            };
            document.getElementsByTagName("head")[0].appendChild(js)
        }
    }
    function processUrl(oOpts, oCFG) {
        var urls = oOpts.urls;
        var get_hash = oOpts.GET;
        var i, len = urls.length;
        var key, url_cls, varname, rnd;
        for (i = 0; i < len; i++) {
            rnd = parseInt(Math.random() * 100000000);
            url_cls = new Utils.Url(urls[i].url);
            for (key in get_hash) {
                if (oOpts.noencode == true) {
                    url_cls.setParam(key, get_hash[key])
                } else {
                    url_cls.setParam(key, Core.String.encodeDoubleByte(get_hash[key]))
                }
            }
            varname = url_cls.getParam("varname") || "requestId_" + rnd;
            if (oOpts.noreturn != true) {
                url_cls.setParam("varname", varname)
            }
            oCFG.script_var_arr.push(varname);
            urls[i].url = url_cls.toString();
            urls[i].charset = urls[i].charset || oOpts.charset
        }
    }
    function ancestor(aUrls, oOpts) {
        var _opts = {
            urls: [],
            charset: "utf-8",
            noreturn: false,
            noencode: true,
            timeout: -1,
            POST: {},
            GET: {},
            onComplete: null,
            onException: null
        };
        var _cfg = {
            script_loaded_num: 0,
            is_timeout: false,
            is_loadcomplete: false,
            script_var_arr: []
        };
        _opts.urls = typeof aUrls == "string" ? [{
            url: aUrls
        }] : aUrls;
        Core.Base.parseParam(_opts, oOpts);
        createScripts(_opts, _cfg); (function() {
            if (_opts.noreturn == true && _opts.onComplete == null) {
                return
            }
            var i, data = [];
            if (_cfg.script_loaded_num == _opts.urls.length) {
                _cfg.is_loadcomplete = true;
                if (_opts.onComplete != null) {
                    for (i = 0; i < _cfg.script_var_arr.length; i++) {
                        data.push(window[_cfg.script_var_arr[i]])
                    }
                    if (_cfg.script_var_arr.length < 2) {
                        _opts.onComplete(data[0])
                    } else {
                        _opts.onComplete(data)
                    }
                }
                return
            }
            if (_cfg.is_timeout == true) {
                return
            }
            setTimeout(arguments.callee, 50)
        })();
        if (_opts.timeout > 0) {
            setTimeout(function() {
                if (_cfg.is_loadcomplete != true) {
                    if (_opts.onException != null) {
                        _opts.onException()
                    }
                    _cfg.is_timeout = true
                }
            },
            _opts.timeout)
        }
    }
    Utils.Io.JsLoad.request = function(aUrls, oOpts) {
        new ancestor(aUrls, oOpts)
    }
})(); (function() {
    var defaultLanguage = scope.$lang;
    var currentLanguage = scope.$lang;
    var currentFunction;
    var currentAPI;
    var changeFlag = false;
    App.changeLanguage = function(sLangType, cb) {
        if (currentLanguage == sLangType) {
            return false
        }
        currentLanguage = sLangType;
        var langUrl;
        if (!scope.$devMode) {
            langUrl = scope.$BASEJS + "bind/pack.php?pro=" + $CONFIG.$product + "&page=conf/lang_" + sLangType + ".dev.js"
        } else {
            langUrl = scope.$BASEJS + $CONFIG.$product + "/js/lang_" + sLangType + ".js" + Boot.getJsVersion()
        }
        Utils.Io.JsLoad.request(langUrl, {
            onComplete: function() {
                if (cb) {
                    cb();
                    return false
                }
                if (scope.forbidrefreshD) {
                    changeFlag = true;
                    scope.forbidrefreshD.close()
                }
                changeFlag = false;
                setTimeout(function() {
                    currentFunction && currentAPI && App.forbidrefresh(currentFunction, currentAPI)
                },
                10)
            },
            onException: function() {
                changeFlag = false
            },
            timeout: 30000
        })
    };
    var wrapA = function(text, lang) {
        var returns = ['<a href="javascript:;" onClick="App.changeLanguage(\'' + lang + "');return false;\">", text, "</a>"];
        if (lang == currentLanguage) {
            returns[0] = returns[2] = ""
        }
        return returns.join("")
    };
    App.forbidrefresh = function(_func, _url) {
        currentFunction = _func;
        currentAPI = _url;
        if (!scope.forbidrefreshD) {
            var _html = '<div class="auth_code">						<div class="auth_img"><img id="door2img" width="450" height="50" /><div style="text-align:right;padding:3px 0 0 0"><a id="changeyzm" href="javascript:void(0);" onclick="App.refreshCheckCode2();return false;">' + $CLTMSG.CC2103 + '</a></div></div>						<p class="tips">' + $CLTMSG.CC2104 + '</p>						<div class="code_input" id="yzm_input_div"><input id="yzm_input" type="text" value="" /></div>						<p id="yzm_error" class="errorTs error_color" style="display:none;">' + $CLTMSG.CC3301 + '</p>						<p class="btn"><a class="btn_normal" href="javascript:void(0);" id="auth_submit"><em>' + $CLTMSG.CC2105 + '</em></a> <a class="btn_normal" href="javascript:void(0);" id="door2Cancel"><em>' + $CLTMSG.CL0603 + '</em></a></p>			<div class="change_lan">' + wrapA("中文简体", "zh") + '<em class="line">|</em>' + wrapA("中文繁體", "zh-tw") + '<!--<em class="line">|</em>' + wrapA("English", "en") + "--></div>			</div>";
            scope.forbidrefreshD = new App.Dialog.BasicDialog($SYSMSG.MR0050, _html, {
                zIndex: 1200,
                hidden: true,
                hiddClose: false,
                width: 510
            });
            scope.forbidrefreshD.onClose = function() {
                scope.forbidrefreshD = null;
                if (!changeFlag && defaultLanguage) {
                    App.changeLanguage(defaultLanguage,
                    function() {})
                }
            };
            var _addEvent = Core.Events.addEvent;
            var _trim = Core.String.trim;
            var _fireEvent = Core.Events.fireEvent;
            var elements = {
                img_yzm2: $E("door2img"),
                btn_chgyzm: $E("changeyzm"),
                input_yzm: $E("yzm_input"),
                errinfo_yzm: $E("yzm_error"),
                submit: $E("auth_submit"),
                door2Cancel: $E("door2Cancel"),
                yzm_input_div: $E("yzm_input_div"),
                cb: function(data) {
                    scope.forbidrefreshD.close();
                    scope.forbidrefreshD = null;
                    scope.doorretcode = data || "";
                    _func()
                },
                ecb: function(json) {
                    if (json.code != "R01409") {
                        scope.forbidrefreshD.close();
                        scope.forbidrefreshD = null
                    } else {
                        App.refreshCheckCode2();
                        elements.errinfo_yzm.style.display = "";
                        elements.errinfo_yzm.innerHTML = $CLTMSG.CC3301
                    }
                },
                url: _url || "/attention/aj_addfollow.php"
            };
            elements.errinfo_yzm.style.display = "none";
            var _submit = function() {
                elements.door = encodeURIComponent(_trim(elements.input_yzm.value)) || _trim(elements.input_yzm.value);
                App.doRequest({
                    door: elements.door
                },
                elements.url, elements.cb ||
                function() {},
                elements.ecb ||
                function() {})
            };
            _addEvent(elements.submit,
            function() {
                if (_trim(elements.input_yzm.value) == "") {
                    elements.errinfo_yzm.style.display = "";
                    elements.errinfo_yzm.innerHTML = $SYSMSG.MR0050;
                    return false
                }
                _submit();
                return false
            },
            "click");
            _addEvent(elements.door2Cancel,
            function() {
                scope.forbidrefreshD.close();
                return false
            },
            "click");
            _addEvent(elements.input_yzm,
            function() {
                elements.errinfo_yzm.style.display = "none"
            },
            "focus");
            App.enterSubmit({
                parent: elements.yzm_input_div,
                action: function() {
                    _fireEvent(elements.submit, "click")
                }
            })
        }
        App.refreshCheckCode2();
        if ($E("yzm_error")) {
            $E("yzm_error").style.display = "none"
        }
        if ($E("yzm_input")) {
            $E("yzm_input").value = ""
        }
        scope.forbidrefreshD.show()
    };
    App.refreshCheckCode2 = function() {
        setTimeout(function() {
            if ($E("door2img")) {
                var imgsrc = "pin1.php";
                if (scope.$pageid == "registermail") {
                    imgsrc = "pin.php"
                }
                $E("door2img").src = "/pincode/" + imgsrc + "?lang=" + currentLanguage + "&r=" + ((new Date()).getTime()) + "&rule";
                $E("door2img").style.display = ""
            }
        },
        100)
    }
})();
Core.String.leftB = function(str, len) {
    var s = str.replace(/\*/g, " ").replace(/[^\x00-\xff]/g, "**");
    str = str.slice(0, s.slice(0, len).replace(/\*\*/g, " ").replace(/\*/g, "").length);
    if (Core.String.byteLength(str) > len) {
        str = str.slice(0, str.length - 1)
    }
    return str
}; (function() {
    var _ua = navigator.userAgent.toLowerCase();
    var $IE = /msie/.test(_ua);
    var $moz = /gecko/.test(_ua);
    var $Safari = /safari/.test(_ua);
    function $E(id) {
        return typeof(id) == "string" ? _viewWindow.document.getElementById(id) : id
    }
    var getScrollPos = function(oDocument) {
        oDocument = oDocument || document;
        return [Math.max(oDocument.documentElement.scrollTop, oDocument.body.scrollTop), Math.max(oDocument.documentElement.scrollLeft, oDocument.body.scrollLeft), Math.max(oDocument.documentElement.scrollWidth, oDocument.body.scrollWidth), Math.max(oDocument.documentElement.scrollHeight, oDocument.body.scrollHeight)]
    };
    var getStyle = function(el, property) {
        switch (property) {
        case "opacity":
            var val = 100;
            try {
                val = el.filters["DXImageTransform.Microsoft.Alpha"].opacity
            } catch(e) {
                try {
                    val = el.filters("alpha").opacity
                } catch(e) {}
            }
            return val;
        case "float":
            property = "styleFloat";
        default:
            var value = el.currentStyle ? el.currentStyle[property] : null;
            return (el.style[property] || value)
        }
    };
    if ($moz) {
        getStyle = function(el, property) {
            if (property == "float") {
                property = "cssFloat"
            }
            try {
                var computed = document.defaultView.getComputedStyle(el, "")
            } catch(e) {
                traceError(e)
            }
            return el.style[property] || computed ? computed[property] : null
        }
    }
    var getXY = function(el) {
        if ((el.parentNode == null || el.offsetParent == null || getStyle(el, "display") == "none") && el != document.body) {
            return false
        }
        var parentNode = null;
        var pos = [];
        var box;
        var doc = el.ownerDocument;
        box = el.getBoundingClientRect();
        var scrollPos = getScrollPos(el.ownerDocument);
        return [box.left + scrollPos[1], box.top + scrollPos[0]];
        parentNode = el.parentNode;
        while (parentNode.tagName && !/^body|html$/i.test(parentNode.tagName)) {
            if (getStyle(parentNode, "display").search(/^inline|table-row.*$/i)) {
                pos[0] -= parentNode.scrollLeft;
                pos[1] -= parentNode.scrollTop
            }
            parentNode = parentNode.parentNode
        }
        return pos
    };
    if ($moz) {
        getXY = function(el) {
            if ((el.parentNode == null || el.offsetParent == null || getStyle(el, "display") == "none") && el != document.body) {
                return false
            }
            var parentNode = null;
            var pos = [];
            var box;
            var doc = el.ownerDocument;
            pos = [el.offsetLeft, el.offsetTop];
            parentNode = el.offsetParent;
            var hasAbs = getStyle(el, "position") == "absolute";
            if (parentNode != el) {
                while (parentNode) {
                    pos[0] += parentNode.offsetLeft;
                    pos[1] += parentNode.offsetTop;
                    if ($Safari && !hasAbs && getStyle(parentNode, "position") == "absolute") {
                        hasAbs = true
                    }
                    parentNode = parentNode.offsetParent
                }
            }
            if ($Safari && hasAbs) {
                pos[0] -= el.ownerDocument.body.offsetLeft;
                pos[1] -= el.ownerDocument.body.offsetTop
            }
            parentNode = el.parentNode;
            while (parentNode.tagName && !/^body|html$/i.test(parentNode.tagName)) {
                if (getStyle(parentNode, "display").search(/^inline|table-row.*$/i)) {
                    pos[0] -= parentNode.scrollLeft;
                    pos[1] -= parentNode.scrollTop
                }
                parentNode = parentNode.parentNode
            }
            return pos
        }
    }
    var getEvent = function() {
        return window.event
    };
    if ($moz) {
        getEvent = function() {
            var o = arguments.callee.caller;
            var e;
            var n = 0;
            while (o != null && n < 40) {
                e = o.arguments[0];
                if (e && (e.constructor == Event || e.constructor == MouseEvent)) {
                    return e
                }
                n++;
                o = o.caller
            }
            return e
        }
    }
    var stopEvent = function() {
        var ev = getEvent();
        ev.cancelBubble = true;
        ev.returnValue = false
    };
    if ($moz) {
        stopEvent = function() {
            var ev = getEvent();
            ev.preventDefault();
            ev.stopPropagation()
        }
    }
    Function.prototype.bind3 = function(object, args) {
        args = args == null ? [] : args;
        var __method = this;
        return function() {
            __method.apply(object, args)
        }
    };
    function addEvent2(elm, func, evType, useCapture) {
        var elm = $E(elm);
        if (typeof useCapture == "undefined") {
            useCapture = false
        }
        if (typeof evType == "undefined") {
            evType = "click"
        }
        if (elm.addEventListener) {
            elm.addEventListener(evType, func, useCapture);
            return true
        } else {
            if (elm.attachEvent) {
                var r = elm.attachEvent("on" + evType, func);
                return true
            } else {
                elm["on" + evType] = func
            }
        }
    }
    var _inputNode;
    var _rndID = parseInt(Math.random() * 100);
    var _showMenuItems = [];
    var _selectMenuIndex = -1;
    var _selectMenuText = "";
    var _viewWindow = window;
    var passcardOBJ = {
        overfcolor: "#999",
        overbgcolor: "#e8f4fc",
        outfcolor: "#000000",
        outbgcolor: "",
        menuStatus: {
            "sina.cn": true,
            "sina.com": true,
            "vip.sina.com": true,
            "163.com": true,
            "qq.com": true,
            "126.com": true,
            "hotmail.com": true,
            "gmail.com": true,
            "sohu.com": true
        }
    };
    passcardOBJ.createNode = function() {
        var d = _viewWindow.document;
        var div = d.createElement("div");
        div.innerHTML = '<ul class="passCard" id="sinaNote" style="display:none;"></ul>';
        d.body.appendChild(div)
    };
    passcardOBJ.arrowKey = function(keyCodeNum) {
        if (keyCodeNum == 38) {
            if (_selectMenuIndex <= 0) {
                _selectMenuIndex = _showMenuItems.length
            }
            _selectMenuIndex--;
            passcardOBJ.selectLi(_selectMenuIndex)
        }
        if (keyCodeNum == 40) {
            if (_selectMenuIndex >= _showMenuItems.length - 1) {
                _selectMenuIndex = -1
            }
            _selectMenuIndex++;
            passcardOBJ.selectLi(_selectMenuIndex)
        }
    };
    passcardOBJ.showList = function(e) {
        _selectMenuText = "";
        var keyCodeNum = getEvent().keyCode;
        if (keyCodeNum == 38 || keyCodeNum == 40) {
            passcardOBJ.arrowKey(keyCodeNum);
            return false
        }
        if (!$E("sinaNote")) {
            passcardOBJ.createNode()
        }
        var menuList = {};
       
        var InputCase = "";
        var InputStr = "";
        if (atIndex > -1) {
        
        }
        _showMenuItems = [];
        _selectMenuIndex = 0;
        _showMenuItems[_showMenuItems.length] = "sinaNote_MenuItem_Title_" + _rndID;
        for (var key in this.menuStatus) {
            this.menuStatus[key] = true;
            if (InputCase != "" && InputCase != key.substr(0, InputCase.length)) {
                this.menuStatus[key] = false
            } else {
                _showMenuItems[_showMenuItems.length] = "sinaNote_MenuItem_" + key + "_" + _rndID
            }
        }
        var listcontent = '<li class="note">' + $CLTMSG.CC0301 + "</li>";

        var itemLabel;
        
        $E("sinaNote").innerHTML = listcontent;
        
        var el = $E(e);
        var note = $E("sinaNote");
        var frameLeft = 0;
        var frameTop = 0;
        var framePos;
        if (_viewWindow != window) {
            framePos = getXY(window.frameElement);
            frameLeft = framePos[0];
            frameTop = framePos[1]
        }
        var inputWidth = el.offsetWidth;
        if (inputWidth < 200) {
            inputWidth = 200
        }
        note.style.width = inputWidth - 2 + "px";
        var inputXY = getXY(el);
        note.style.left = (inputXY[0] - ($IE ? 2 : -1) + frameLeft) + "px";
        note.style.top = (inputXY[1] + el.offsetHeight - ($IE ? 2 : -1) + frameTop) + "px"
    };
    passcardOBJ.selectList = function(e) {
        var unames = $E("sinaNote").getElementsByTagName("li");
        for (var i = 1; i < unames.length; i++) {
            unames[1].style.backgroundColor = passcardOBJ.overbgcolor;
            unames[1].style.color = passcardOBJ.outfcolor;
            unames[i].onmousedown = function() {
                var temp = this.innerHTML;
                if (temp.indexOf($CLTMSG.CC0302) > -1) {
                    var pos = temp.split("@");
                    $E(e).value = pos[0]
                } else {
                    $E(e).value = this.innerHTML
                }
                stopEvent()
            };
            unames[i].onmouseover = function() {
                if (i != 1) {
                    unames[1].style.backgroundColor = passcardOBJ.outbgcolor;
                    unames[1].style.color = passcardOBJ.overfcolor
                }
                this.style.backgroundColor = passcardOBJ.overbgcolor;
                this.style.color = passcardOBJ.outfcolor
            };
            unames[i].onmouseout = function() {
                this.style.backgroundColor = passcardOBJ.outbgcolor;
                this.style.color = passcardOBJ.overfcolor;
                unames[1].style.backgroundColor = passcardOBJ.overbgcolor;
                unames[1].style.color = passcardOBJ.outfcolor
            }
        }
    };
    passcardOBJ.selectLi = function(nIndex) {
        var menuNode;
        if ($E("sinaNote_MenuItem_Title_" + _rndID)) {
            $E("sinaNote_MenuItem_Title_" + _rndID).style.backgroundColor = passcardOBJ.outbgcolor;
            $E("sinaNote_MenuItem_Title_" + _rndID).style.color = passcardOBJ.overfcolor;
            for (var i = 0; i < _showMenuItems.length; i++) {
                menuNode = $E(_showMenuItems[i]);
                menuNode.style.backgroundColor = passcardOBJ.outbgcolor;
                menuNode.style.color = passcardOBJ.overfcolor
            }
            $E(_showMenuItems[nIndex]).style.backgroundColor = passcardOBJ.overbgcolor;
            $E(_showMenuItems[nIndex]).style.color = passcardOBJ.outfcolor;
            _selectMenuText = $E(_showMenuItems[nIndex]).innerHTML
        }
    };
    passcardOBJ.hideList = function() {
        if (!$E("sinaNote")) {
            passcardOBJ.createNode()
        }
        $E("sinaNote").style.display = "none"
    };
    passcardOBJ.init = function(oNode, oColors, oFocusNode, oWindowTarget) {
        for (var key in oColors) {
            this[key] = oColors[key]
        }
        addEvent2(document, passcardOBJ.hideList, "click");
        addEvent2(oNode, passcardOBJ.hideList, "blur");
        addEvent2(oNode, passcardOBJ.showList.bind3(this, [oNode]), "keyup");
        addEvent2(oNode,
        function(e) {
            var keyCodeNum = getEvent().keyCode;
            if (keyCodeNum == 13 || keyCodeNum == 9) {
                if (_selectMenuText != "") {
                    var temp = _selectMenuText;
                    if (temp.indexOf($CLTMSG.CC0302) > -1) {
                        var pos = temp.split("@");
                        oNode.value = pos[0]
                    } else {
                        oNode.value = _selectMenuText
                    }
                }
                if (oFocusNode != null) {
                    oFocusNode.focus()
                }
                stopEvent()
            }
        },
        "keydown");
        if (oWindowTarget) {
            _viewWindow = oWindowTarget
        }
    };
    window.passcardOBJ = passcardOBJ
})(); (function() {
    App.getMsg = function(msgCode, replace) {
        if (msgCode === undefined) {
            return ""
        }
        if (typeof(msgCode) == "object") {
            msgCode = msgCode.code
        }
        var msg = $SYSMSG[msgCode] || $CLTMSG[msgCode] || ("Error[" + msgCode + "]");
        if (replace) {
            var tmp = new Utils.Template(msg);
            return tmp.evaluate(replace)
        } else {
            return msg
        }
    };
    function setMask(z, hidden) {
        var _mask1 = document.getElementsByTagName("BODY")[0].appendChild($C($IE ? "iframe": "div"));
        var $w = window,
        $d = $w.document,
        $e = $d.documentElement || {};
        with(_mask1.style) {
            position = "absolute";
            backgroundColor = "#000";
            width = "100%";
            zIndex = parseInt(z) - 1;
            top = "0px";
            left = "0px"
        }
        Core.Dom.opacity(_mask1, 15);
        _mask1.style.height = Math.max($e.clientHeight, $e.scrollHeight, $e.offsetHeight, $d.body.scrollHeight, $d.body.offsetHeight) + "px";
        return _mask1
    }
    function setMiddle(_node) {
        var ow = _node.offsetWidth;
        var oh = _node.offsetHeight;
        var win_s = Core.System.winSize();
        var scroll_pos = Core.System.getScrollPos();
        var tx = (win_s.width - ow) / 2;
        var ty = scroll_pos[0] + (win_s.height - oh) / 2;
        _node.style.left = tx + "px";
        _node.style.top = (ty < 20 ? 20 : ty) + "px"
    }
    function iniRegForm(rnd) {
        var _box = $E("mod_reg_information_box" + rnd);
        var _submit = $E("mod_reg_submit" + rnd);

        var _door = $E("mod_reg_door" + rnd);
        var _after = $E("mod_reg_after" + rnd);
        var _red_door = $E("mod_red_reg_door" + rnd);
        var _red_after = $E("mod_red_reg_after" + rnd);
        var _addEvent = Core.Events.addEvent;
        var _trim = Core.String.trim;
        var _html2json = App.htmlToJson;
        var _compjson = App.compareJson;
        var _checkMail = App.checkEml;
        var _alert = App.alert;
        var _removeEvent = Core.Events.removeEvent;
        var _oData = _html2json(_box);
        var popWin = null;
        var success = function(json) {};
        var error = function(json) {
            if (json) {
                if (!App.modCheckInfo.showError([json.code])) {
                    _alert($SYSMSG[json.code])
                }
            } else {
                _alert($SYSMSG[json.code])
            }
        };
        var errorInput = function(input, red, code) {
            red.innerHTML = $SYSMSG[code];
            red.style.display = ""
        };
        var rightInput = function(input, red) {
            red.style.display = "none"
        };
        var checkFunction = {
            MR0001: function(el) {
                el.value = _trim(el.value);
                if (el.value) {
                    return true
                } else {
                    return false
                }
            },
            MR0002: function(el) {
                if (App.modCheckInfo.check(["MR0001"])) {
                    if (_checkMail(el.value)) {
                        return true
                    } else {
                        return false
                    }
                } else {
                    return true
                }
            },
            MR0007: function(el) {
                if (!_trim(el.value).length) {
                    return true
                }
                if (App.modCheckInfo.check(["MR0001", "MR0002"])) {
                    if (/^.+@(sina\.com|vip\.sina\.com|sina\.cn|2008\.sina\.com|my3ia\.sina\.com)$/i.test(el.value)) {
                        return false
                    } else {
                        return true
                    }
                } else {
                    return true
                }
            },



            MR0011: function(el) {
                el.value = _trim(el.value);
                if (el.value.length < 6) {
                    return false
                } else {
                    return true
                }
            },
            MR0013: function(el) {
                el.value = _trim(el.value);
                if (el.value.length > 16) {
                    return false
                } else {
                    return true
                }
            },
            MR0020: function(el) {
                el.value = _trim(el.value);
                if (el.value == _trim(_password.value)) {
                    return true
                } else {
                    return false
                }
            },
            MR0050: function(el) {
                el.value = _trim(el.value);
                if (el.value.length > 0) {
                    return true
                } else {
                    return false
                }
            },
            MR0071: function(el) {
                if (el.checked) {
                    return true
                }
                return false
            }
        };
      
        App.modRegisterMethod = {};
    
        var _isNewCheckcode = false;
        App.modRegisterMethod.rumor = function(success, error) {
            if (typeof success != "function") {
                throw ("The publishRumor need a function as thrid parameter")
            }
            if (typeof error != "function") {
                throw ("The publishRumor need a function as fourth parameter")
            }
            var parameters = _html2json(_box);
            parameters.token = scope.$token;
            parameters.retcode = scope.doorretcode || "";
            parameters.r = window.location.href;
            parameters.regsrc = 4;
            scope.doorretcode = "";
            if (_compjson(parameters, _oData)) {
                success()
            } else {
                Utils.Io.Ajax.request("/reg/reg.php", {
                    POST: parameters,
                    onComplete: function(json) {
                        if (json.code == "A00006") {
                            success(json.data);
                            oData = parameters;
                            if (json.data) {
                                window.location.replace(json.data)
                            }
                        } else {
                            if (json.code == "M00004") {
                                _alert({
                                    code: "R01438"
                                })
                            } else {
                                if (json.code == "MR0050") {
                                    App.forbidrefresh(function() {
                                        Core.Events.fireEvent(_submit, "click")
                                    },
                                    "/reg/reg.php");
                                    return
                                } else {
                                    if (json.code == "R01409") {
                                        _red_door.innerHTML = '<span class="iswhat iserro"><img class="tipicon tip2" src="' + scope.$BASEIMG + 'style/images/common/transparent.gif" alt="" title="" /><em>' + $SYSMSG[json.code] + "</em></span>";
                                        App.TextareaUtils.setCursor(_door);
                                        App.modRefreshCheckCode()
                                    } else {
                                        error(json)
                                    }
                                }
                            }
                        }
                        _submit.className = "btnlogin1"
                    },
                    onException: function(json) {
                        _addEvent(_submit, App.modRegisterMethod.submit, "click");
                        error(json);
                        _submit.className = "btnlogin1"
                    },
                    returnType: "json"
                });
                _submit.className = "btnlogin1 btnlogin1_load"
            }
        };
        _addEvent(_submit, App.modRegisterMethod.submit, "click");
        App.enterSubmit({
            parent: _box,
            action: function() {
                Core.Events.fireEvent(_submit, "click")
            }
        });
        passcardOBJ.init(_username, {
            overfcolor: "#999",
            overbgcolor: "#e8f4fc",
            outfcolor: "#000000",
            outbgcolor: ""
        },
        _password, window)
    }
    function iniLoginForm(rnd, cb) {
        var login_submit = $E("mod_login_submit" + rnd);
        var login_tip = $E("mod_login_tip" + rnd);
        var loginname = $E("mod_loginname" + rnd);
        var password = $E("mod_password" + rnd);
        var isremember = $E("mod_isremember" + rnd);
        var disableClass = "btn_notclick";
        var enableClass = "btn_normal";
        var options = {
            zIndex: 1010,
            ref: loginname,
            wrap: login_tip,
            offsetX: 0,
            offsetY: 1
        };
        if (!$IE) {
            options.offsetY = 10
        }
        App.initLoginInput(loginname);
        if (cb && cb.initErrorTip) {
            App.fixElement.setHTML(cb.initErrorTip, "", options)
        }
        function checkForm(el, errStr) {
            if (!Core.String.trim(el.value) || (el.value == el.title && el.title)) {
                var oPassword = $E("mod_password_text" + rnd);
                if (oPassword && oPassword.style && oPassword.style.display !== "none") {
                    oPassword.focus()
                }
                App.fixElement.setHTML(errStr, "", options);
                return false
            } else {
                App.fixElement.hidden()
            }
            return true
        }
        login_submit.onclick = function() {
            if (login_submit.className == disableClass) {
                return false
            }
            login_submit.className = enableClass;
            if (!checkForm(loginname, App.getMsg({
                code: "M00901"
            }))) {
                return false
            }
            if (!checkForm(password, App.getMsg({
                code: "M00902"
            }))) {
                return false
            }
            App.LoginAction({
                name: loginname.value,
                pwd: password.value,
                remb: isremember.checked,
                error: function(reason, errno) {
                    var msg = "";
                    if (errno == "4010") {
                        reason = App.getMsg({
                            code: "R01011"
                        });
                        msg = App.getMsg("R01010", {
                            mail: loginname.value
                        })
                    } else {
                        if (errno == "101" || errno == "5") {
                            msg = App.getMsg({
                                code: "R11111"
                            })
                        }
                    }
                    App.fixElement.setHTML(reason, "", options)
                },
                succ: function() {
                    App.modRegisterOrLoginClose();
                    if (cb) {
                        scope.$uid = "123456";
                        cb.func(cb.param)
                    } else {
                        location.reload()
                    }
                }
            })
        };
        App.enterSubmit({
            parent: password.parentNode,
            action: function() {
                login_submit.onclick()
            }
        });
        passcardOBJ.init(loginname, {
            overfcolor: "#999",
            overbgcolor: "#e8f4fc",
            outfcolor: "#000000",
            outbgcolor: ""
        },
        $E("mod_password_text" + rnd), window)
    }
    App.modRegisterAndLogin = function(showType, titleKey, callBackFunction, loginInfoKey) {
        var regurl = /open\.t\.sina/.test(location.href) ? "http://t.sina.com.cn/reg.php": "/reg.php";
        regurl += "?lang=" + scope.$lang;
        var recoverurl = "http://login.sina.com.cn/cgi/getpwd/getpwd0.php?entry=sso";
        var regTitle = $CLTMSG.CY0124;
        var loginTitle = titleKey ? $CLTMSG[titleKey] : false;
        if (titleKey == "CY0130") {
            loginTitle = loginTitle.replace("{name}", Core.String.byteLength(scope.realname) > 10 ? (Core.String.leftB(scope.realname, 10) + "...") : scope.realname).replace("{titlename}", scope.realname)
        }
        var loginInfo = $CLTMSG[loginInfoKey] || $CLTMSG.CY0121;
        var rnd = (new Date()).getTime();
        var html = '<table class="mBlogLayer"><tr><td class="top_l"></td><td class="top_c"></td><td class="top_r"></td></tr><tr><td class="mid_l"></td><td class="mid_c"><div class="layerBox"><div class="layerBoxCon" style=" width:530px;">					<div class="layerSmartlogin">						<div class="layerMedia_close"><a href="javascript:void(0);" onclick="App.modRegisterOrLoginClose()" class="close"></a></div>						<div class="yellowBg" id="mod_reg_login_yellow' + rnd + '"></div>						<div class="infoForm" id="mod_reg_information_box' + rnd + '">							<div class="infoReg">								<table class="tab2">                                <tr>                                	<th><span>' + $CLTMSG.CY0116 + '：</span></th>                                	<td class="td1"></td>                                	<td id="mod_red_reg_username' + rnd + '"><a href="http://t.sina.com.cn/reg_sinamail.php?lang=zh-cn" target="_blank">我没有邮箱</a></td>                                </tr>                                <tr>                                	<th><span>' + $CLTMSG.CY0117 + '：</span></th><td class="td1"></td></tr><tr><th><span>' + $CLTMSG.CY0118 + '：</span></th><td class="td1"></td><td id="mod_red_reg_password2' + rnd + '"></td></tr><tr><th><span>' + $CLTMSG.CY0119 + '：</span></th>                                	<td class="td1">										<input type="text" class="inp w1" id="mod_reg_door' + rnd + '" name="basedoor" style="width:40px" />										<img width="90" height="31" align="absmiddle" src="/pincode/pin1.php?r=1275025963678&amp;lang=zh" style="margin:5px 0;" id="mod_reg_check_img" />										<a href="javascript:void(0);" onclick="App.modRefreshCheckCode()">' + $CLTMSG.CY0120 + '</a>									</td>                                	<td id="mod_red_reg_door' + rnd + '"></td>                                </tr>								<tr>                                	<th>&nbsp;</th>                                    <td class="td1"><div class="lf"><input type="checkbox" id="mod_reg_after' + rnd + '" class="labelbox" checked="checked" name="after" value="1" /><label for="chbb">' + $CLTMSG.CY0129 + '</label></div></td>                                	<td id="mod_red_reg_after' + rnd + '"></td>								</tr>                                <tr>                                	<th>&nbsp;</th>                                	<td class="td1"><a href="javascript:void(0);" class="btnlogin1" id="mod_reg_submit' + rnd + '"></a></td>                                	<td>&nbsp;</td>                                </tr>								</table>							</div>							<div class="clearit"></div>						</div>						<div class="infoForm" id="mod_reg_login_box' + rnd + '">							<div class="infoLeft">								<table class="tab1">								<caption>' + loginInfo + '</caption>								<tr>									<th id="mod_login_tip' + rnd + '" scope="row"></th>									<td></td>					            </tr>								<tr>									<td><input type="text" class="inp" id="mod_loginname' + rnd + '" /></td>								</tr>								<tr>									<td><input type="text" style="color:#999;display:none;" class="inp" id="mod_password_text' + rnd + '" /></td>								</tr>								<tr>									<th>										<a href="javascript:void(0);" class="btn_normal" id="mod_login_submit' + rnd + '"><em>' + $CLTMSG.CD0134 + '</em></a>										<input type="checkbox" id="mod_isremember' + rnd + '" class="chkb" checked="checked" /><label for="mod_isremember' + rnd + '">' + $CLTMSG.CY0123 + '</label>									</th>								</tr>								</table>							</div>							<div class="infoRight">								<p class="p1">' + $CLTMSG.CY0122 + '</p>								<p class="p2"><a href="javascript:void(0);" class="btnlogin1" onclick="App.modRunToRegisterOrLogin(\'register\');"></a></p>							</div>							<div class="clearit"></div>						</div>					</div>					</div>					</div>					</td>					<td class="mid_r"></td>					</tr>					<tr>					<td class="bottom_l"></td>					<td class="bottom_c"></td>					<td class="bottom_r"></td>					</tr>					</table>';
        var box = $C("DIV");
        box.innerHTML = html;
        box.style.position = "absolute";
        box.style.zIndex = 1600;
        box.style.width = "540px";
        document.body.appendChild(box);
        iniRegForm(rnd, callBackFunction);
        iniLoginForm(rnd, callBackFunction);
        var cachePassCardStatus = passcardOBJ.menuStatus;
        App.modRunToRegisterOrLogin = function(type) {
            if (type === "login") {
                $E("mod_reg_login_box" + rnd).style.display = "";
                $E("mod_reg_information_box" + rnd).style.display = "none";
                if (loginTitle) {
                    $E("mod_reg_login_yellow" + rnd).innerHTML = loginTitle;
                    $E("mod_reg_login_yellow" + rnd).style.display = ""
                } else {
                    $E("mod_reg_login_yellow" + rnd).style.display = "none"
                }
                passcardOBJ.menuStatus = {
                    "sina.cn": true,
                    "sina.com": true,
                    "vip.sina.com": true,
                    "163.com": true,
                    "qq.com": true,
                    "126.com": true,
                    "hotmail.com": true,
                    "gmail.com": true,
                    "sohu.com": true
                }
            } else {
                if (type === "register") {
                    $E("mod_reg_login_box" + rnd).style.display = "none";
                    $E("mod_reg_information_box" + rnd).style.display = "";
                    $E("mod_reg_login_yellow" + rnd).innerHTML = regTitle;
                    $E("mod_reg_login_yellow" + rnd).style.display = "";
                    passcardOBJ.menuStatus = {
                        "163.com": true,
                        "qq.com": true,
                        "126.com": true,
                        "hotmail.com": true,
                        "gmail.com": true,
                        "sohu.com": true
                    };
                    try {
                        GB_SUDA._S_uaTrack("tblog_reg", "layer_reg")
                    } catch(ex) {}
                }
            }
        };
        App.setPassword("mod_password" + rnd, "mod_password_text" + rnd);
        App.modRegisterOrLoginClose = function() {
            document.body.removeChild(box);
            document.body.removeChild(mask);
            passcardOBJ.menuStatus = cachePassCardStatus;
            App.modRunToRegisterOrLogin = false
        };
        App.modRunToRegisterOrLogin(showType);
        setMiddle(box);
        var mask = setMask(600);
        try {
            GB_SUDA._S_uaTrack("tblog_reg", "layer_login")
        } catch(exp) {}
        return box
    };
    App.modRefreshCheckCode = function() {
        setTimeout(function() {
            $E("mod_reg_check_img").src = "/pincode/pin1.php?r=" + ((new Date()).getTime()) + "&lang=" + scope.$lang;
            $E("mod_reg_check_img").style.display = ""
        },
        10)
    }
})();
App.ModLogin = function(callBackFunction, title) {
    var tit = title || $CLTMSG.CD0038;
    var regurl = /open\.t\.sina/.test(location.href) ? "http://t.sina.com.cn/reg.php": "/reg.php";
    regurl += "?lang=" + scope.$lang;
    var recoverurl = "http://login.sina.com.cn/cgi/getpwd/getpwd0.php?entry=sso";
    var rnd = (new Date()).getTime();
    var html = '<div class="loginLayer" id="login_wrap' + rnd + '">            	<table>                  <tbody>				  <tr>			      	   <th scope="row"/>	                        <td id="login_tip' + rnd + '"></td>	                    </tr>				  <tr>                    <th scope="row">' + $CLTMSG.CD0039 + '&nbsp;&nbsp;</th>                    <td><span class="cInputBorder"><span class="cInputborderR"><input tabIndex="1" type="text" name="loginname" id="loginname' + rnd + '" class="inputType" style="width: 210px;"/></span></span></td>                    <td><a href="' + regurl + '" target="_blank">' + $CLTMSG.CD0040 + '</a></td>                  </tr>                  <tr>                    <th scope="row">' + $CLTMSG.CD0041 + '&nbsp;&nbsp;</th>                    <td><span class="cInputBorder"><span class="cInputborderR"></span></span></td>                    <td><a href="' + recoverurl + '" target="_blank">' + $CLTMSG.CD0042 + '</a></td>                  </tr>                  <tr>                    <th scope="row"/>                    <td><input type="checkbox" id="isremember' + rnd + '"  checked="checked"/>' + $CLTMSG.CD0043 + '</td>                    <td/>                  </tr>                  <tr>                    <th scope="row"/>                    <td><a href="javascript:void(0);" id="login_submit' + rnd + '" class="btn_normal"><em>' + $CLTMSG.CD0044 + "</em></a></td>                    <td/>                  </tr>                </tbody></table>            </div>";
    var cfg = {
        width: 390,
        zIndex: 1000
    };
    var dialog = new App.Dialog.BasicDialog(tit, html, cfg);
    var disableClass = "btn_notclick";
    var enableClass = "btn_normal";
    var login_submit = $E("login_submit" + rnd);
    var login_tip = $E("login_tip" + rnd);
    var loginname = $E("loginname" + rnd);
    var password = $E("password" + rnd);
    var isremember = $E("isremember" + rnd);
    var options = {
        zIndex: 1010,
        ref: loginname,
        wrap: login_tip,
        offsetX: 0,
        offsetY: 1
    };
    if (!$IE) {
        options.offsetY = 10
    }
    App.initLoginInput(loginname);
    if (callBackFunction && callBackFunction.initErrorTip) {
        App.fixElement.setHTML(callBackFunction.initErrorTip, "", options)
    }
    function checkForm(el, errStr) {
        if (!Core.String.trim(el.value) || (el.value == el.title && el.title)) {
            if (el && el.style && el.style.display !== "none") {
                el.focus()
            }
            App.fixElement.setHTML(errStr, "", options);
            return false
        } else {
            App.fixElement.hidden()
        }
        return true
    }
    login_submit.onclick = function() {
        if (login_submit.className == disableClass) {
            return false
        }
        login_submit.className = enableClass;
        if (!checkForm(loginname, App.getMsg({
            code: "M00901"
        }))) {
            return false
        }
        if (!checkForm(password, App.getMsg({
            code: "M00902"
        }))) {
            return false
        }
        App.LoginAction({
            name: loginname.value,
            pwd: password.value,
            remb: isremember.checked,
            error: function(reason, errno) {
                var msg = "";
                if (errno == "4010") {
                    reason = App.getMsg({
                        code: "R01011"
                    });
                    msg = App.getMsg("R01010", {
                        mail: loginname.value
                    })
                } else {
                    if (errno == "101" || errno == "5") {
                        msg = App.getMsg({
                            code: "R11111"
                        })
                    }
                }
                App.fixElement.setHTML(reason, msg, options)
            },
            succ: function() {
                dialog.close();
                if (callBackFunction) {
                    scope.$uid = "123456";
                    callBackFunction.func(callBackFunction.param)
                } else {
                    location.reload()
                }
            }
        })
    };
    App.enterSubmit({
        parent: password.parentNode,
        action: function() {
            login_submit.onclick()
        }
    });
    passcardOBJ.init(loginname, {
        overfcolor: "#999",
        overbgcolor: "#e8f4fc",
        outfcolor: "#000000",
        outbgcolor: ""
    },
    password, window);
    return dialog
};
App.ModLogin = function(callBackFunction, title) {
    if (App.modRunToRegisterOrLogin) {
        App.modRunToRegisterOrLogin("login")
    } else {
        App.modRegisterAndLogin("login", false, callBackFunction)
    }
};
Core.String.j2o = function(str) {
    if (!str || str == "") {
        return null
    }
    try {
        var o = window.eval("(" + str + ")");
        return o
    } catch(e) {
        $Debug("j2o : 数据分析出错");
        traceError(e);
        return null
    }
};
App.doRequest = function(oData, sUrl, fCb, fEcb, ptype, type) {
    var emptyFun = function() {};
    var param = {
        onComplete: function(result) {
            try {
                if (typeof result == "string") {
                    result = result.replace(/;$/, "")
                }
                result = (typeof result == "string" && (/\s*{/.test(result))) ? Core.String.j2o(result) : result;
                if (result && (result.code == "A00006" || result.code == "S00001")) { (fCb || emptyFun)(result.data, result)
                } else { (fEcb || emptyFun)(result)
                }
            } catch(e) {}
        },
        onException: function(json) { (fEcb || emptyFun)(json)
        }
    };
    ptype = (ptype || "post").toUpperCase();
    param[ptype] = oData;
    param.returnType = "json";
    type = type || "ajax";
    Utils.Io.Ajax.request(sUrl, param)
};
Sina.pkg("Utils.Sinput");
Core.Function.bind3 = function(fFunc, object, args) {
    args = args == null ? [] : args;
    var __method = fFunc;
    return function() {
        return __method.apply(object, args)
    }
};
Utils.Sinput.limitMaxLen = function(oTextNode, nMaxLen) {
    var nValue;
    var keyup = function() {
        nValue = oTextNode.value;
        var strLen = Core.String.byteLength(nValue);
        if (strLen > nMaxLen) {
            oTextNode.value = Core.String.leftB(nValue, nMaxLen)
        }
    };
    Core.Events.addEvent(oTextNode, Core.Function.bind3(keyup, oTextNode), "keyup");
    Core.Events.addEvent(oTextNode, Core.Function.bind3(keyup, oTextNode), "blur");
    Core.Events.addEvent(oTextNode, Core.Function.bind3(keyup, oTextNode), "focus")
}; (function(proxy) {
    var movingKey = false;
    proxy.doFlyOut = function(st, tg, config) {
        if (movingKey) {
            return false
        }
        movingKey = true;
        var getAbsolute = function(ele) {
            var aPoint = Core.Dom.getXY(ele);
            var res = {
                x: aPoint[0],
                y: aPoint[1]
            };
            return res
        };
        var params_st = {
            w: st.offsetWidth,
            h: st.offsetHeight,
            l: (getAbsolute(st))["x"],
            t: (getAbsolute(st))["y"]
        };
        var visible = tg.style.visibility;
        var display = tg.style.display;
        if (tg.style.display == "none") {
            tg.style.visibility = "hidden";
            tg.style.display = "block"
        }
        var params_tg = {
            w: tg.offsetWidth,
            h: tg.offsetHeight,
            l: (getAbsolute(tg))["x"],
            t: (getAbsolute(tg))["y"]
        };
        var oo = document.createElement("DIV");
        oo.style.cssText = config.style;
        oo.style.width = params_st.w + "px";
        oo.style.height = params_st.h + "px";
        oo.style.top = params_st.t + "px";
        oo.style.left = params_st.l + "px";
        oo.style.position = "absolute";
        document.body.appendChild(oo);
        var ct = {
            w: proxy.animation.taccelerate(proxy.timer.delay, params_tg.w - params_st.w, config.time),
            h: proxy.animation.taccelerate(proxy.timer.delay, params_tg.h - params_st.h, config.time),
            l: proxy.animation.taccelerate(proxy.timer.delay, params_tg.l - params_st.l, config.time),
            t: proxy.animation.taccelerate(proxy.timer.delay, params_tg.t - params_st.t, config.time)
        };
        var c = 0;
        var tk = proxy.timer.add(function() {
            if (c >= ct.w.length) {
                proxy.timer.remove(tk);
                oo.style.display = "none";
                config.resFun();
                movingKey = false;
                return false
            }
            oo.style.width = params_st.w + ct.w[c] + "px";
            oo.style.height = params_st.h + ct.h[c] + "px";
            oo.style.top = params_st.t + ct.t[c] + "px";
            oo.style.left = params_st.l + ct.l[c] + "px";
            c++
        });
        tg.style.visibility = visible;
        tg.style.display = display
    }
})(App); (function(proxy) {
    proxy.setOpacity = function(element, value) {
        element.style.filter = "alpha(opacity=" + value + ")";
        element.style.opacity = value / 100
    };
    proxy.opacity = function(element, cfg, callback) {
        var _first = cfg.first;
        var _last = cfg.last || 0;
        if (_last == _first) {
            proxy.setOpacity(element, _first);
            if (typeof callback === "function") {
                callback(_first, _last)
            }
            return false
        }
        var _time = Math.floor((cfg.time || 5) * 100 / proxy.timer.delay);
        var _orbit = [];
        for (var i = 0; i < _time; i++) {
            _orbit.push(_first + (_last - _first) * i / _time)
        }
        var _current = 0;
        var _timerhook = proxy.timer.add(function() {
            if (_current >= _orbit.length) {
                proxy.timer.remove(_timerhook);
                proxy.setOpacity(element, _last);
                if (typeof callback === "function") {
                    callback(_first, _last)
                }
                return false
            }
            proxy.setOpacity(element, _orbit[_current]);
            _current++
        })
    }
})(App);
$registJob("refurbishNumber",
function() {
    var getDoms = function() {
        var MAIN = $E("profile_following_follower_update");
        if (!MAIN) {
            return false
        }
        var ITEMS = MAIN.getElementsByTagName("LI");
        var following = ITEMS[0];
        var follower = ITEMS[1];
        var update = ITEMS[2];
        App.refurbishFollowing = upgrade(following);
        App.refurbishFollower = upgrade(follower);
        App.refurbishUpdate = upgrade(update)
    };
    var orbit = [[20, -1, 80], [22, -2, 70], [24, -3, 60], [28, -5, 40], [32, -7, 30], [36, -9, 20], [36, -9, 0]];
    var upgrade = function(el) {
        var num = el.getElementsByTagName("DIV")[0];
        var that = {};
        el.style.position = "relative";
        that.animation = function(cfg) {
            var duplicate = num.cloneNode(true);
            duplicate.style.position = "absolute";
            el.insertBefore(duplicate, num);
            var width = duplicate.offsetWidth;
            var current = 1;
            var tk = App.timer.add(function() {
                if (cfg.beging) {
                    cfg.beging(duplicate, num)
                }
                if (current >= orbit.length * 2) {
                    App.timer.remove(tk);
                    App.setOpacity(num, 100);
                    el.removeChild(duplicate);
                    duplicate.style.display = "none";
                    num.getElementsByTagName("A")[0].innerHTML = num.getElementsByTagName("A")[0].innerHTML;
                    return false
                }
                if (current == orbit.length) {
                    cfg.middle(duplicate, num)
                }
                var now = orbit.length - Math.abs(current - orbit.length) - 1;
                duplicate.style.fontSize = orbit[now][0] + "px";
                duplicate.style.top = orbit[now][1] + "px";
                duplicate.style.left = 0 - (duplicate.offsetWidth - width) / 2 + "px";
                App.setOpacity(duplicate, orbit[now][2]);
                App.setOpacity(num, orbit[now][2]);
                current += 1;
                if (cfg.ending) {
                    cfg.ending(duplicate, num)
                }
            })
        };
        that.add = function(num) {
            var doadd = function(du, or) {
                var numBox = or.getElementsByTagName("A")[0];
                numBox.innerHTML = (parseInt(numBox.innerHTML) + num) || 0;
                du.getElementsByTagName("A")[0].innerHTML = numBox.innerHTML
            };
            this.animation({
                middle: doadd
            })
        };
        return that
    };
    getDoms()
});
Core.Dom.insertHTML = function(el, html, where) {
    el = $E(el) || document.body;
    where = where.toLowerCase() || "beforeend";
    if (el.insertAdjacentHTML) {
        switch (where) {
        case "beforebegin":
            el.insertAdjacentHTML("BeforeBegin", html);
            return el.previousSibling;
        case "afterbegin":
            el.insertAdjacentHTML("AfterBegin", html);
            return el.firstChild;
        case "beforeend":
            el.insertAdjacentHTML("BeforeEnd", html);
            return el.lastChild;
        case "afterend":
            el.insertAdjacentHTML("AfterEnd", html);
            return el.nextSibling
        }
        throw 'Illegal insertion point -> "' + where + '"'
    }
    var range = el.ownerDocument.createRange();
    var frag;
    switch (where) {
    case "beforebegin":
        range.setStartBefore(el);
        frag = range.createContextualFragment(html);
        el.parentNode.insertBefore(frag, el);
        return el.previousSibling;
    case "afterbegin":
        if (el.firstChild) {
            range.setStartBefore(el.firstChild);
            frag = range.createContextualFragment(html);
            el.insertBefore(frag, el.firstChild);
            return el.firstChild
        } else {
            el.innerHTML = html;
            return el.firstChild
        }
        break;
    case "beforeend":
        if (el.lastChild) {
            range.setStartAfter(el.lastChild);
            frag = range.createContextualFragment(html);
            el.appendChild(frag);
            return el.lastChild
        } else {
            el.innerHTML = html;
            return el.lastChild
        }
        break;
    case "afterend":
        range.setStartAfter(el);
        frag = range.createContextualFragment(html);
        el.parentNode.insertBefore(frag, el.nextSibling);
        return el.nextSibling
    }
    throw 'Illegal insertion point -> "' + where + '"'
};
App.autoHeightTextArea = function(oNode, fInputListener, nMaxHeight) {
    oNode = $E(oNode);
    fInputListener = fInputListener ||
    function() {};
    var listener = function(nMaxHeight) {
        if (fInputListener) {
            fInputListener()
        }
        var nViewHeight;
        var sScrollStyle;
        var nSnapHeight = App.getTextAreaHeight(this);
        nMaxHeight = nMaxHeight || nSnapHeight;
        if (nSnapHeight > nMaxHeight) {
            nViewHeight = nMaxHeight;
            if (this.style.overflowY === "hidden") {
                this.style.overflowY = "auto"
            }
        } else {
            nViewHeight = nSnapHeight;
            if (this.style.overflowY === "auto") {
                this.style.overflowY = "hidden"
            }
        }
        this.style.height = Math.min(nMaxHeight, nSnapHeight) + "px"
    };
    if (oNode.binded == null) {
        Core.Events.addEvent(oNode, Core.Function.bind3(listener, oNode, [nMaxHeight]), "keyup");
        Core.Events.addEvent(oNode, Core.Function.bind3(listener, oNode, [nMaxHeight]), "focus");
        Core.Events.addEvent(oNode, Core.Function.bind3(listener, oNode, [nMaxHeight]), "blur");
        oNode.binded = true;
        oNode.style.overflowY = "hidden";
        oNode.style.overflowX = "hidden"
    }
};
App.getTextAreaHeight = function(oNode) {
    oNode = $E(oNode);
    if (oNode.defaultHeight == null) {
        oNode.defaultHeight = window.parseInt(Core.Dom.getStyle(oNode, "height"))
    }
    var snapHeight;
    if ($IE) {
        snapHeight = Math.max(oNode.scrollHeight, oNode.defaultHeight)
    } else {
        var textArea = $E("_____textarea_____");
        if (textArea == null) {
            textArea = document.createElement("textarea");
            textArea.id = "_____textarea_____";
            document.getElementsByTagName("body")[0].appendChild(textArea)
        }
        if (textArea.currentTarget != oNode) {
            textArea.style.top = "-1000px";
            textArea.style.height = "0px";
            textArea.style.position = "absolute";
            textArea.style.overflow = "hidden";
            textArea.style.width = Core.Dom.getStyle(oNode, "width");
            textArea.style.fontSize = Core.Dom.getStyle(oNode, "fontSize");
            textArea.style.fontFamily = Core.Dom.getStyle(oNode, "fontFamily");
            textArea.style.lineHeight = Core.Dom.getStyle(oNode, "lineHeight");
            textArea.style.paddingLeft = Core.Dom.getStyle(oNode, "paddingLeft");
            textArea.style.paddingRight = Core.Dom.getStyle(oNode, "paddingRight");
            textArea.style.paddingTop = Core.Dom.getStyle(oNode, "paddingTop");
            textArea.style.paddingBottom = Core.Dom.getStyle(oNode, "paddingBottom")
        }
        textArea.value = oNode.value;
        snapHeight = Math.max(textArea.scrollHeight, oNode.defaultHeight);
        textArea.currentTarget = oNode
    }
    return snapHeight
};
Core.Dom.setStyle = function(el, property, val) {
    switch (property) {
    case "opacity":
        el.style.filter = "alpha(opacity=" + (val * 100) + ")";
        if (!el.currentStyle || !el.currentStyle.hasLayout) {
            el.style.zoom = 1
        }
        break;
    case "float":
        property = "styleFloat";
    default:
        el.style[property] = val
    }
};
if (!Core.Base.detect.$IE) {
    Core.Dom.setStyle = function(el, property, val) {
        if (property == "float") {
            property = "cssFloat"
        }
        el.style[property] = val
    }
}
App.EncodeUtils = (function() {
    var _hash = {
        "<": "&lt;",
        ">": "&gt;",
        '"': "&quot;",
        "\\": "&#92;",
        "&": "&amp;",
        "'": "&#039;",
        "\r": "",
        "\n": "<br>"
    },
    fReg = /<|>|\'|\"|&|\\|\r\n|\n| /gi;
    var it = {};
    it.regexp = function(value) {
        return value.replace(/\}|\]|\)|\.|\$|\^|\{|\[|\(|\|\|\*|\+|\?|\\/gi,
        function(k) {
            k = k.charCodeAt(0).toString(16);
            return "\\u" + (new Array(5 - k.length)).join("0") + k
        })
    };
    it.html = function(value, hash) {
        hash = hash || _hash;
        return value.replace(fReg,
        function(k) {
            return hash[k]
        })
    };
    return it
})();
App.PopUpCombo = (function() {
    var it = {},
    ce = Core.Events,
    addEvent = ce.addEvent,
    removeEvent = ce.removeEvent,
    stopEvent = ce.stopEvent,
    filter = App.EncodeUtils.regexp,
    toIndex, value, content, current, key, reg, tip, panel, head, lis = [],
    onSelect,
    onClose,
    len,
    selected = 0;
    it.validate = false;
    it.index = function(num) {
        toIndex = !num ? 0 : selected + num;
        toIndex = toIndex < 0 ? len: (toIndex > len) ? 0 : toIndex;
        lis[selected].className = "";
        lis[toIndex].className = "cur";
        selected = toIndex;
        value = content[selected]
    };
    it.click = function() {
        onSelect && onSelect(value)
    };
    it.hidden = function() {
        it.initTip();
        tip.style.display = "none";
        it.validate && !(it.validate = false) && onClose && onClose()
    };
    it.initTip = function() {
        if (!tip) {
            tip = $C("div");
            tip.appendChild(panel = $C("ul"));
            with(tip.style) {
                zIndex = 2000;
                position = "absolute";
                display = "none"
            }
            tip.className = "Atwho";
            document.body.appendChild(tip)
        }
    };
    it.position = function(x, y, offsetX, offsetY) {
        it.initTip();
        it.validate = true;
        tip.style.display = "block";
        with(tip.style) {
            left = (x + offsetX) + "px";
            top = (y + offsetY) + "px"
        }
    };
    it.selection = function(event) {
        var keyCode = event.keyCode,
        toIndex, value;
        if (!it.validate) {
            return
        }
        if (keyCode == 40 || keyCode == 38) {
            it.index(keyCode == 40 ? 1 : -1);
            stopEvent()
        } else {
            if (keyCode == 13 || keyCode == 9) {
                it.click();
                stopEvent()
            } else {
                if (keyCode == 27) {
                    it.hidden();
                    stopEvent()
                }
            }
        }
    };
    it.addItem = function(itemValue) {
        var li = document.createElement("li"),
        index;
        li.innerHTML = itemValue.replace(reg, "<b>$1</b>");
        lis.push(li);
        len = index = lis.length - 1;
        content.push(itemValue);
        panel.appendChild(li);
        addEvent(li,
        function() {
            lis[selected].className = "";
            lis[index].className = "cur";
            value = itemValue;
            selected = index;
            stopEvent()
        },
        "mouseover");
        addEvent(li,
        function() {
            it.click();
            it.hidden();
            stopEvent()
        },
        "mousedown")
    };
    it.bind = function(oElement, aContent, sKey, fOnSelect, fOnClose, sHead) {
        var i = 0,
        l = aContent.length;
        reg = new RegExp("(" + filter(sKey) + ")", "gi");
        selected = 0;
        content = [];
        onSelect = fOnSelect;
        len = 0;
        lis = [];
        onClose = fOnClose;
        it.initTip();
        panel.innerHTML = "";
        if (sHead) {
            panel.appendChild(head = $C("div"));
            head.innerHTML = sHead
        }
        for (i; i < l; i++) {
            it.addItem(aContent[i])
        }
        if (!lis.length) {
            it.addItem(sKey)
        }
        it.index(0);
        if (current == oElement) {
            return
        }
        current && removeEvent(current, it.selection, "keydown");
        removeEvent(document.body, it.hidden, "mouseup");
        addEvent((current = oElement), it.selection, "keydown");
        addEvent(document.body, it.hidden, "mouseup")
    };
    return it
})();
App.BindAtToTextarea = (function() {
    var d = document,
    format = App.EncodeUtils.html,
    select = App.PopUpCombo,
    cd = Core.Dom,
    getStyle = cd.getStyle,
    selectionStart, setStyle = cd.setStyle,
    getXY = cd.getXY,
    ce = Core.Events,
    addEvent = ce.addEvent,
    removeEvent = ce.removeEvent,
    stopEvent = ce.stopEvent,
    ajax = Utils.Io.Ajax,
    clock;
    var cssg = ["overflowY", "height", "width", "paddingTop", "paddingLeft", "paddingRight", "paddingBottom", "marginTop", "marginLeft", "marginRight", "marginBottom"];
    var font = "Tahoma,宋体",
    cssc = {
        fontFamily: font,
        borderStyle: "solid",
        borderWidth: "0px",
        wordWrap: "break-word",
        fontSize: "14px",
        lineHeight: "18px",
        overflowX: "hidden"
    };
    var isCss1 = false,
    ua = navigator.userAgent,
    r = /MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(ua);
    if (r && (r = parseFloat(RegExp.$1)) && r < 8) {
        isCss1 = true
    }
    var hash = {
        "<": "&lt;",
        ">": "&gt;",
        '"': "&quot;",
        "\\": "&#92;",
        "&": "&amp;",
        "'": "&#039;",
        "\r": "",
        "\n": "<br>",
        " ": !isCss1 ? "<span style='white-space:pre-wrap;font-size:14px;font-family:" + font + ";'> </span>": "<pre style='overflow:hidden;display:inline;font-size:'+fontSize+';font-family:" + font + ";word-wrap:break-word;'> </pre>"
    },
    fReg = /<|>|\'|\"|&|\\|\r\n|\n| /gi;
    var AjaxHasAbort = function(url, success, error) {
        var req, res, error;
        req = window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
        if (!req) {
            return
        }
        req.onreadystatechange = function() {
            try {
                if (req.readyState == 4) {
                    res = eval("(" + req.responseText + ")");
                    success(res)
                }
            } catch(e) {
                return false
            }
        };
        try {
            req.open("GET", url, true);
            req.send(null)
        } catch(e) {
            return false
        }
        return req
    };
    var doRequest = (function() {
        var req;
        return function(url, success, error) {
            if (req) {
                req.abort();
                req
            }
            req = AjaxHasAbort(url, success, error)
        }
    })();
    var at = (function() {
        var it = {},
        current, panel, cache, lastCache, flag, content, nbody, reg, tu = App.TextareaUtils,
        clock, reqed = {},
        validate = false,
        currentKey, keyChange = 0,
        items;
        reg = /@[^@\s]{1,20}$/g;
        it.onClose = function() {
            cache = null;
            lastCache = null;
            currentKey = null;
            setTimeout(function() {
                try {
                    current.focus()
                } catch(e) {}
            },
            0)
        };
        it.onSelect = function(value) {
            var st = current.scrollTop;
            current.focus();
            tu.insertText(current, value + " ", selectionStart, currentKey.length);
            current.scrollTop = st
        };
        it.setContent = function(value, last) {
            panel.style.height = current.clientHeight + "px";
            if (cache != value) {
                cache = value;
                content.innerHTML = format(value, hash)
            }
            if (lastCache != last) {
                lastCache = last;
                nbody.innerHTML = format(last, hash)
            }
            if (scope.$SAFARI) {
                panel.style.overflowY = getStyle(current, "overflowY") == "hidden" ? "hidden": "scroll"
            } else {
                panel.style.overflowY = (current.scrollHeight > current.clientHeight) ? "auto": "hidden"
            }
        };
        it.initTip = function(json) {
            var data, len, i = 0,
            list = [],
            name,
            tmp = "background-color:#ebebeb;",
            point;
            if (json.code == "A00006" && (data = json.data || [])) {
                point = getXY(flag);
                select.position(point[0], point[1], 0, -(current.scrollTop - 20));
                select.bind(current, data, currentKey, it.onSelect, it.onClose, selectHead);
                reqed[currentKey] = json;
                return
            }
            select.hidden()
        };
        it.check = function() {
            var snap, snap = value = current.value.replace(/\r/g, ""),
            key,
            len,
            html,
            param,
            last;
            selectionStart = tu.selectionStart(current);
            value = value.slice(0, selectionStart);
            if ((key = value.match(reg)) && (key = key[0]) && /^@[a-zA-Z0-9\u4e00-\u9fa5_]+$/.test(key)) {
                key = key.slice(1);
                if (currentKey == key) {
                    return
                }
                currentKey = key;
                last = snap.slice(selectionStart - currentKey.length, snap.length);
                value = value.slice(0, -currentKey.length - 1);
                it.setContent(value, last);
                if (reqed[key]) {
                    it.initTip(reqed[key]);
                    return
                }
                doRequest("/mblog/aj_searchat.php?atkey=" + encodeURIComponent(key),
                function(json) {
                    it.initTip(json, key)
                },
                select.hidden);
                return
            }
            select.hidden()
        };
        it.sleep = function(event) {
            var keyCode = event.keyCode;
            if (keyCode == "27") {
                return
            }
            clearTimeout(clock);
            clock = setTimeout(it.check, 100)
        };
        it.bindEvent = function(oElement, b) {
            var act = b ? addEvent: removeEvent;
            act(oElement, it.sleep, "keypress");
            act(oElement, it.sleep, "keyup");
            act(oElement, it.sleep, "mouseup")
        };
        it.rePosition = (function() {
            var clock, stop = function() {
                clearInterval(clock)
            };
            var flush = function() {
                try {
                    if (!current) {
                        return
                    }
                    point = getXY(current);
                    with(panel.style) {
                        left = point[0] + "px";
                        top = point[1] + "px"
                    }
                } catch(e) {
                    stop()
                }
            };
            return function() {
                stop();
                clock = setInterval(flush, 100)
            }
        })();
        it.mirror = function(oStyleFix) {
            var i = 0,
            p, len = cssg.length,
            point, fix = 0,
            size = "14px",
            w;
            if ($MOZ) {
                fix = -2
            }
            if (scope.$SAFARI) {
                fix = -6
            }
            for (i; i < len; i++) {
                panel.style[cssg[i]] = getStyle(current, cssg[i])
            }
            for (p in cssc) {
                panel.style[p] = current.style[p] = cssc[p]
            }
            for (p in oStyleFix) {
                panel.style[p] = current.style[p] = oStyleFix[p]
            }
            if (oStyleFix && oStyleFix.fontSize) {
                size = oStyleFix.fontSize
            }
            hash[" "] = !isCss1 ? "<span style='white-space:pre-wrap;font-size:" + size + ";font-family:" + font + ";'> </span>": "<pre style='overflow:hidden;display:inline;font-size:" + size + ";font-family:" + font + ";word-wrap:break-word;'> </pre>";
            panel.style.width = ((parseInt(current.style.width) || current.offsetWidth) + fix) + "px";
            it.bindEvent(current, true);
            it.rePosition();
            return false
        };
        it.to = function(oElement, oStyleFix) {
            if (current == oElement) {
                return
            }
            if (!it.panel) {
                d.body.appendChild(it.panel = panel = $C("div"));
                panel.appendChild(it.content = content = $C("span"));
                panel.appendChild(it.flag = flag = $C("span"));
                panel.appendChild(it.nbody = nbody = $C("span"));
                with(panel.style) {
                    zIndex = -1000;
                    position = "absolute"
                }
                flag.innerHTML = "@";
                setStyle(panel, "opacity", 0)
            }
            current && it.bindEvent(current, false); (current = oElement) && it.mirror(oStyleFix)
        };
        return it
    })();
    return function(oElement, oStyleFix) {
        oElement.style.fontFamily = font;
        addEvent(oElement,
        function() {
            at.to(oElement, oStyleFix)
        },
        "focus")
    }
})();
scope.loginKit = function() {
    var documentCookie = document.cookie + ";";
    var supRegExp = ["SUP", "=([^;]*)?;"].join("");
    var uidRegExp = ["(\\?|&)", "uid", "=([^&]*)(&|$)"].join("");
    var info = documentCookie.match(new RegExp(supRegExp, "i"));
    info = (info) ? info[1] || "": "";
    info = unescape(info);
    var uid = info.match(new RegExp(uidRegExp));
    uid = (uid) ? uid[2] || "": "";
    var oid = scope["$oid"];
    return {
        uid: uid,
        isLogin: !!uid,
        isAdmin: uid && oid && (uid == oid)
    }
};
scope.$isLogin = function() {
    return scope.loginKit().isLogin
};
scope.$isAdmin = function() {
    return scope.loginKit().isAdmin
};
App.ModForward = function(fid, content, uid, el, exid, forwardName, forwardContent, uname, callback) {
    Core.Events.stopEvent();
    if (el && el.getAttribute("allowforward")) {
        App.alert($SYSMSG.M02020);
        return false
    }
    if (scope.$cuser_status === "nofull" && scope.$uid !== "") {
        App.finishInformation();
        return false
    }
    if (uid === scope.$uid) {
        App.alert($CLTMSG.CD0024);
        return false
    }
    var checkAT = function(content, name) {
        if ((new RegExp("(@|＠)" + name + "([^a-zA-Z0-9\u4e00-\u9fa5_]|$)")).test(content)) {
            return true
        } else {
            return false
        }
    };
    var defaultTxt = $CLTMSG.CD0025;
    var forwardContentFinal = "";
    var testForwardName = decodeURIComponent(forwardName);
    var testForwardContent = decodeURIComponent(forwardContent);
    var testForwardUName = decodeURIComponent(uname);
    if (forwardContent === "" || forwardContent === undefined) {
        forwardContentFinal = defaultTxt
    } else {
        forwardContentFinal = " //@" + testForwardName + ":" + testForwardContent
    }
    var title = $CLTMSG.CD0026;
    var loginStr = '<div class="shareLogin">                    	<div id="loginerror_' + fid + '"></div>						<em>' + $CLTMSG.CD0027 + '</em>                        <span class="cInputBorder"><span class="cInputborderR"><input type="text" id="logintitle_' + fid + '" class="inputType"  style="width: 100px;"/></span></span>                        <em>&nbsp&nbsp&nbsp&nbsp' + $CLTMSG.CD0028 + ' </em>                        <span class="cInputBorder"><span class="cInputborderR"></span></span>                    	<div class="clearit"></div>                    </div>';
    loginStr = "";
    if (el) {
        var lastForwarderName = el.getAttribute("lastforwardername");
        var initBlogerName = el.getAttribute("initblogername")
    }
    var aComment = [];
    aComment.push('<div class="selSend">');
    if (lastForwarderName) {
        aComment.push('<p><label for="lastForwarder_' + fid + '"><input type="checkbox" class="labelbox" id="lastForwarder_' + fid + '" />' + $CLTMSG.CD0029.replace(/#\{forwarder\}/g, lastForwarderName) + "</label></p>")
    }
    if (initBlogerName && initBlogerName != lastForwarderName) {
        aComment.push('<p><label for="initBloger_' + fid + '"><input type="checkbox" class="labelbox" id="initBloger_' + fid + '" />' + $CLTMSG.CD0030.replace(/#\{bloger\}/g, initBlogerName) + "</label></p>")
    }
    aComment.push(" </div>");
    var html = '			<div class="shareLayer" id="forwardcontent_' + fid + '">				<div class="zok" id="modforwardsucess_' + fid + '" style="display:none"></div>				<div id="mdforwardinputarea_' + fid + '">				<div class="turnToTxt" id="sharecontent_' + fid + '">' + $CLTMSG.CD0031 + decodeURIComponent(content) + '</div>				<div class="clearit"></div>				<div style="margin-top:5px;">					<div class="lf">						<a onclick="App.showFaces(this,$E(\'mdforwardtextarea_' + fid + '\'),-29,5);return false;" title="' + $CLTMSG.CD0032 + '" href="####" class="faceicon1"></a>					</div>				</div>				<div id="tipInfoBox' + fid + '" style="float:right;margin-right:13px;color:#008800"></div>				<textarea class="PY_textarea" id="mdforwardtextarea_' + fid + '">' + forwardContentFinal + "</textarea>" + loginStr + aComment.join(" ") + '<div class="MIB_btn"><a href="javascript:void(0);" id="mdforwardbtn_' + fid + '" class="btn_normal"><em>' + $CLTMSG.CD0023 + '</em></a><a href="javascript:void(0)" id="mdforwardcancel_' + fid + '" class="btn_notclick"><em>' + $CLTMSG.CD0005 + "</em></a></div>				</div>			</div>		";
    var cfg = {
        width: 390,
        zIndex: 1000
    };
    var dialog = new App.Dialog.BasicDialog(title, html, cfg);
    dialog._success = function(_cb) {
        dialog.close();
        var tipMsg = new App.alert($CLTMSG.CD0035, {
            icon: 3,
            hasBtn: false
        });
        setTimeout(function() {
            tipMsg.close();
            _cb()
        },
        1000)
    };
    var mdforwardtextarea = $E("mdforwardtextarea_" + fid);
    var tipStringOK = $CLTMSG.CD0033;
    var tipStringErr = $CLTMSG.CD0034;
    var forwardInputLimit = function() {
        var num = Math.ceil(Core.String.byteLength(Core.String.trim(mdforwardtextarea.value)) / 2);
        if ($E("tipInfoBox" + fid)) {
            if (num > 140) {
                $E("tipInfoBox" + fid).innerHTML = tipStringErr.replace(/\$\{num\}/, (maxlen / 2 - num) * ( - 1));
                $E("tipInfoBox" + fid).style.color = "#880000";
                return false
            } else {
                $E("tipInfoBox" + fid).innerHTML = tipStringOK.replace(/\$\{num\}/, (maxlen / 2 - num));
                $E("tipInfoBox" + fid).style.color = "#008800";
                return true
            }
        }
    };
    if (el) {
        try {
            setTimeout(function() {
                $E("mdforwardtextarea_" + fid).focus();
                if (!$IE) {
                    $E("mdforwardtextarea_" + fid).setSelectionRange(0, 0)
                }
                forwardInputLimit()
            },
            100)
        } catch(e) {}
    } else {
        dialog.show();
        $E("mdforwardtextarea_" + fid).focus();
        if (!$IE) {
            $E("mdforwardtextarea_" + fid).setSelectionRange(0, 0)
        }
        setTimeout(forwardInputLimit, 1)
    }
    var url = "/mblog/forward.php";
    if (scope.$eid) {
        url = "/event/aj_forward.php"
    }
    var mdforwardbtn = $E("mdforwardbtn_" + fid);
    var maxlen = 280;
    App.BindAtToTextarea(mdforwardtextarea, {
        borderWidth: "1px",
        fontSize: "12px"
    });
    App.autoHeightTextArea(mdforwardtextarea,
    function() {
        setTimeout(forwardInputLimit, 1)
    },
    145);
    var loginerror = $E("loginerror_" + fid);
    var disClass = "btn_notclick";
    var enableClass = "btn_normal";
    var name = $E("logintitle_" + fid);
    var pwd = $E("loginpwd_" + fid);
    var options = {
        zIndex: 1010,
        ref: name,
        wrap: loginerror,
        offsetY: -1,
        offsetX: 30
    };
    mdforwardtextarea.onfocus = function() {
        if (mdforwardtextarea.value === defaultTxt) {
            mdforwardtextarea.value = ""
        }
    };
    mdforwardtextarea.onblur = function() {
        if (mdforwardtextarea.value === "") {
            mdforwardtextarea.value = defaultTxt
        }
    };
    mdforwardtextarea.onkeydown = function(event) {
        event = event || window.event;
        if (event.keyCode === 13 && event.ctrlKey) {
            mdforwardbtn.onclick()
        }
    };
    if ($E("lastForwarder_" + fid)) {
        $E("lastForwarder_" + fid).onkeydown = function(event) {
            event = event || window.event;
            if (event.keyCode === 13 && event.ctrlKey) {
                mdforwardbtn.onclick()
            }
        }
    }
    if ($E("initBloger_" + fid)) {
        $E("initBloger_" + fid).onkeydown = function(event) {
            event = event || window.event;
            if (event.keyCode === 13 && event.ctrlKey) {
                mdforwardbtn.onclick()
            }
        }
    }
    $E("mdforwardcancel_" + fid).onclick = function() {
        dialog.close();
        return false
    };
    function forwardSuccess() {
        var reason = mdforwardtextarea.value = Core.String.leftB(mdforwardtextarea.value, maxlen);
        if (reason === defaultTxt) {
            reason = ""
        }
        var postdata = {
            reason: reason.replace(/\uff20/ig, "@"),
            mid: fid,
            styleid: scope.styleid,
            retcode: scope.doorretcode || ""
        };
        if (scope.$eid) {
            postdata.eid = scope.$eid
        }
        scope.doorretcode = "";
        if (scope.$pageid === "search") {
            postdata.from = "search"
        }
        if ((scope.$pageid === "myprofile" || scope.$pageid === "search") && scope.$feedtype !== "isori") {
            postdata.isindex = 1
        }
        var cb = function(data, json) {
            if (postdata.isLast) {
                var comments = $E("_comment_count_miniblog2_" + fid);
                if (!comments) {
                    return
                }
                var s = comments.getElementsByTagName("strong");
                if (s && (s = s[1])) {
                    var count = s.innerHTML;
                    count = parseInt(count.match(/(\d+)/));
                    count = ((count + "") == "NaN" ? 0 : count);
                    count = Math.max((count + 1), 0);
                    s.innerHTML = "";
                    count && (s.innerHTML = ["(", count, ")"].join(""))
                }
            }
            var _afterSuccesscallback = function() {
                if (!scope.loginKit().isLogin) {
                    location.reload()
                }
                if (typeof callback === "function") {
                    callback(el)
                }
                if (App.refurbishUpdate) {
                    App.refurbishUpdate.add(1)
                }
                if (!data) {
                    return
                }
                var feedlist = $E("feed_list");
                if (feedlist) {
                    var feedBox = document.createElement("UL");
                    feedBox.innerHTML = data.html;
                    var $d = window.document,
                    $e = $d.documentElement || {};
                    var $t = function() {
                        if (arguments.length > 0) {
                            $e.scrollTop = arguments[0];
                            $d.body.scrollTop = arguments[0];
                            return
                        }
                        return (window.pageYOffset || Math.max($e.scrollTop, $d.body.scrollTop))
                    };
                    setTimeout(function() {
                        var li = feedBox.getElementsByTagName("LI")[0];
                        if (!li) {
                            return
                        }
                        feedlist.parentNode.insertBefore(feedBox, feedlist);
                        feedlist.insertBefore(li, (feedlist.getElementsByTagName("LI"))[0]);
                        feedBox.parentNode.removeChild(feedBox);
                        try {
                            App.bindMedia(li)
                        } catch(e) {}
                        var _h = feedlist.getElementsByTagName("LI")[0].offsetHeight;
                        $t($t() + _h)
                    },
                    1000)
                }
            };
            dialog._success(_afterSuccesscallback);
            var num = $E(exid);
            if (num) {
                var count = num.innerHTML.match(/\d+/) || 0;
                num.innerHTML = "(" + (parseInt(count) + 1) + ")";
                num.style.display = ""
            }
        };
        var ecb = function(json) {
            mdforwardbtn.className = enableClass;
            if (json && typeof json === "string" && json.indexOf("error") > 0) {
                App.alert($CLTMSG.CD0036);
                return false
            }
            if (json.code === "MR0050") {
                mdforwardbtn.className = enableClass;
                App.forbidrefresh(function() {
                    Core.Events.fireEvent(mdforwardbtn, "click")
                },
                url);
                return false
            }
            if (json === $CLTMSG.CD0037) {
                return
            }
            App.alert(json, {
                ok: function() {
                    if (!scope.loginKit().isLogin) {
                        location.reload()
                    }
                    if (json.code === "M01155") {
                        dialog.close()
                    }
                }
            })
        };
        var getPara = 0;
        if ($E("lastForwarder_" + fid) && $E("lastForwarder_" + fid).checked) {
            postdata.isLast = "1";
            getPara++
        }
        if ($E("initBloger_" + fid) && $E("initBloger_" + fid).checked) {
            postdata.isRoot = "1";
            getPara++
        }
        if (getPara > 0) {
            url += "?f=" + getPara
        }
        App.doRequest(postdata, url, cb, ecb)
    }
    function errortTip(str, el) {
        el.focus();
        App.fixElement.setHTML(str, "", options);
        mdforwardbtn.className = enableClass;
        return false
    }
    mdforwardbtn.onclick = function() {
        if (!forwardInputLimit()) {
            var orbit = ["#fff", "#fee", "#fdd", "#fcc", "#fdd", "#fee", "#fff", "#fee", "#fdd", "#fcc", "#fdd", "#fee", "#fff"];
            var index = 0;
            var hook = App.timer.add(function() {
                if (index / 2 >= orbit.length) {
                    App.timer.remove(hook);
                    return false
                }
                mdforwardtextarea.style.backgroundColor = orbit[index / 2];
                index += 1
            });
            return false
        }
        if (mdforwardbtn.className === disClass) {
            return false
        }
        mdforwardbtn.className = disClass;
        if (scope.loginKit().isLogin) {
            forwardSuccess()
        } else {
            App.ModLogin({
                func: function() {
                    forwardSuccess()
                }
            });
            mdforwardbtn.className = enableClass
        }
        return false
    };
    App.enterSubmit({
        parent: "forwardcontent",
        action: function() {
            mdforwardbtn.onclick()
        }
    })
};
Core.Dom.replaceNode = function(oNewNode, oOriginal) {
    if (oNewNode == null || oOriginal == null) {
        return false
    }
    oNewNode = $E(oNewNode);
    oOriginal = $E(oOriginal);
    oOriginal.parentNode.replaceChild(oNewNode, oOriginal)
};
App.flyDialog = function(sText, sDialogType, oFromTarget, oConfig) {
    var oAlert = App[sDialogType || "alert"](sText, oConfig);
    return oAlert
};
Core.Events.getEventTarget = function(ev) {
    ev = ev || Core.Events.getEvent();
    Core.Events.fixEvent(ev);
    return ev.target
};
Core.String.encodeHTML = function(str) {
    var div = document.createElement("div");
    div.appendChild(document.createTextNode(str));
    return div.innerHTML.replace(/\s/g, "&nbsp;")
};
Core.String.decodeHTML = function(str) {
    var div = document.createElement("div");
    div.innerHTML = str;
    return div.innerText == undefined ? div.textContent: div.innerText
}; (function() {
    var NODEMAP = {
        AREA: "MAP",
        CAPTION: "TABLE",
        COL: "TABLE|COLGROUP",
        COLGROUP: "TABLE",
        LEGEND: "FIELDSET",
        OPTGROUP: "SELECT",
        OPTION: "SELECT",
        PARAM: "OBJECT",
        TBODY: "TABLE",
        TD: "TR",
        TFOOT: "TABLE",
        TH: "TABLE|TR",
        THEAD: "TABLE",
        TR: "TBODY|THEAD|TH|TFOOT"
    };
    var trim = Core.String.trim;
    var create = function(tagName, attributes, that) {
        var dom = null;
        if (tagName.toUpperCase() == "TEXT") {
            dom = document.createTextNode(tagName)
        } else {
            dom = $C(tagName)
        }
        if (typeof attributes === "object") {
            for (var k in attributes) {
                switch (k) {
                case "class":
                    dom.className = attributes[k];
                    break;
                case "id":
                    that.domList[attributes[k]] = dom;
                    break;
                case "action":
                    if (that.actList[attributes[k]]) {
                        that.actList[attributes[k]] = that.actList[attributes[k]].concat([dom])
                    } else {
                        that.actList[attributes[k]] = [dom]
                    }
                    break;
                case "style":
                    dom.style.cssText = attributes[k];
                    break;
                case "innerHTML":
                    if (dom.nodeType === 3) {
                        dom.nodeValue = Core.String.decodeHTML(attributes[k])
                    } else {
                        dom.innerHTML = attributes[k]
                    }
                    break;
                case "nodeValue":
                    if (dom.nodeType === 3) {
                        dom.nodeValue = attributes[k]
                    } else {
                        dom.innerHTML = Core.String.encodeHTML(attributes[k])
                    }
                    break;
                default:
                    dom.setAttribute(k, attributes[k])
                }
            }
        }
        return dom
    };
    var check = function(parent, childObj) {
        var tnames = NODEMAP[childObj.tag];
        if (tnames) {
            var pList = tnames.split("|");
            for (var i = 0,
            len = pList.length; i < len; i++) {
                if (parent.tagName == pList[i]) {
                    return true
                }
            }
            return false
        }
        return true
    };
    var append = function(parent, childObj, that) {
        childObj.tag = childObj.tag.toLocaleUpperCase();
        if (!check(parent, childObj)) {
            return false
        }
        var returnDom = create(childObj.tag, childObj.attr, that);
        parent.appendChild(returnDom);
        return returnDom
    };
    var makeTree = function(parent, objList, that) {
        for (var i = 0,
        len = objList.length; i < len; i++) {
            var Leaves = append(parent, objList[i], that);
            if (!Leaves) {
                alert("tree wrong!!!");
                return false
            }
            if (objList[i].list && objList[i].list.length) {
                makeTree(Leaves, objList[i].list, that)
            }
        }
    };
    var parseAttribute = function(attrStr) {
        var ret = {};
        var buff = [];
        if (attrStr) {
            var re = new RegExp("(?:([^\\s=]+)\\s*=\\s*[\\\"\\']([^=\\\"\\']*)[\\\"\\'])", "ig");
            while (buff = re.exec(attrStr)) {
                ret[buff[1]] = buff[2]
            }
        }
        return ret
    };
    var htmlToTemplate = function(htmlStr) {
        var so = parseHTML(htmlStr);
        var ret = [];
        var point = ret;
        var pointList = [];
        for (var i = 0,
        len = so.length; i < len; i += 1) {
            if (so[i][1] === undefined) {
                var a = buildItem(["", "", "text", 'innerHTML="' + so[i][0] + '"', ""]);
                point.push(a)
            }
            if (so[i][1] === "") {
                if (trim(so[i][0]) == "") {
                    continue
                } else {
                    if (/^\<[^\>]+\>$/.test(so[i][0])) {
                        var a = buildItem(so[i]);
                        point.push(a);
                        if (!/\/\s*>$/.test(so[i][0])) {
                            a.list = [];
                            point = a.list;
                            pointList.push(point)
                        }
                    } else {
                        var a = buildItem(["", "", "text", 'innerHTML="' + so[i][0] + '"', ""]);
                        if (trim(so[i][0]).replace(/\r|\n/ig, "")) {
                            point.push(a)
                        }
                    }
                }
            }
            if (so[i][1] === "/") {
                pointList.pop();
                if (pointList.length === 0) {
                    point = ret
                } else {
                    point = pointList[pointList.length - 1]
                }
            }
        }
        return ret
    };
    var buildItem = function(args) {
        var ret = {};
        ret.tag = args[2];
        ret.attr = parseAttribute(args[3]);
        return ret
    };
    var parseHTML = function(htmlStr) {
        var tags = /[^<>]+|<(\/?)([A-Za-z]+)([^<>]*)>/g;
        var a, i;
        var ret = [];
        while ((a = tags.exec(htmlStr))) {
            var n = [];
            for (i = 0; i < a.length; i += 1) {
                n.push(a[i])
            }
            ret.push(n)
        }
        return ret
    };
    App.builder2 = function(spec) {
        var that = {};
        that.box = null;
        that.domList = {};
        that.actList = {};
        if (spec.box) {
            that.box = spec.box
        } else {
            that.box = $C("DIV")
        }
        if (spec.template) {
            if (typeof spec.template === "string") {
                spec.template = htmlToTemplate(spec.template)
            }
            makeTree(that.box, spec.template, that)
        }
        return that
    }
})();
Core.Dom.getLeft = function(element) {
    var left = 0;
    var el = $E(element);
    if (el.offsetParent) {
        while (el.offsetParent) {
            left += el.offsetLeft;
            el = el.offsetParent
        }
    } else {
        if (el.x) {
            left += el.x
        }
    }
    return left
};
App.square_pop = function() {
    if (!$E("square_pop")) {
        return false
    }
    var _addevent = Core.Events.addEvent;
    var _getEventTag = Core.Events.getEventTarget;
    var _stopevent = Core.Events.stopEvent;
    var _getEleCls = Core.Dom.getElementsByClass;
    var _getLeft = Core.Dom.getLeft;
    var _getXY = Core.Dom.getXY;
    var _hook = null;
    var element = {
        oSquare: $E("gotosquare"),
        oPop: $E("square_pop")
    };
    var arrow = _getEleCls(element.oPop, "div", "arrows")[0];
    var arrowLeft = 0;
    var arrowHeight = 0;
    var _abHeight = 0;
    var setposition = function(squa, obj) {
        arrowLeft = arrow.offsetLeft;
        arrowHeight = arrow.offsetHeight;
        var topbar = Core.Dom.getElementsByClass(document, "div", "MIB_trayMain_txt")[0];
        _abHeight = _getXY(topbar)[1] + topbar.offsetHeight + arrowHeight;
        var left = (_getLeft(squa) + (squa.offsetWidth / 2) - arrowLeft) + "px";
        var top = _abHeight + "px";
        obj.style.left = left;
        obj.style.top = top
    };
    var clearposition = function() {
        clearInterval(_hook)
    };
    var mouseover = function(obj) {
        obj.style.display = "";
        setposition(element.oSquare, element.oPop);
        _addevent(document.body, mouseout, "mouseover")
    };
    var mouseout = function() {
        var _event = Core.Events.fixEvent(Core.Events.getEvent());
        var oTarget = _getEventTag(Core.Events.getEvent());
        var _pointY = _event.clientY;
        var _pointX = _event.clientX;
        var _oSquareXY = _getXY(element.oSquare);
        while (oTarget) {
            if ((oTarget == element.oPop || oTarget == element.oSquare) || (_pointX >= _oSquareXY[0] && _pointX <= _oSquareXY[0] + element.oSquare.offsetWidth && _pointY < _abHeight)) {
                return true
            }
            if (oTarget != document.body) {
                oTarget = oTarget.parentNode
            } else {
                break
            }
        }
        clearposition();
        element.oPop.style.display = "none";
        Core.Events.removeEvent(document.body, mouseout, "mouseover")
    };
    _addevent(element.oSquare, (function() {
        return function() {
            mouseover(element.oPop)
        }
    })(), "mouseover")
};
App.Clip = function(el, config) {
    var that = {};
    var cfg = config || {};
    var q, func, i, init;
    var clip = function(el, cfg, clipfun) {
        var spec = {};
        spec.left = (cfg.left && cfg.left + "px") || "auto";
        spec.right = cfg.right || "auto";
        spec.top = cfg.top || "auto";
        spec.bottom = cfg.bottom || "auto";
        spec.endPixel = cfg.endPixel || 0;
        el.style.clip = "rect(" + spec.top + "," + spec.right + "," + spec.bottom + "," + spec.left + ")";
        var i = 0;
        if (!q) {
            q = window.setInterval(function() {
                clipfun(spec)
            },
            1)
        }
    };
    that.stopClip = function() {
        clearInterval(q);
        init(cfg);
        q = null
    };
    that.startClip = function() {
        el.style.visibility = "visible";
        clip(el, config, func)
    };
    switch (cfg.clipType) {
    case "1":
        init = function(cfg) {
            i = parseInt(cfg.right || "0")
        };
        func = function(spec) {
            i += cfg.clipspeed || 2;
            el.style.clip = "rect(" + spec.top + "," + i + "px," + spec.bottom + "," + spec.right + ")";
            if (i >= parseInt(spec.endPixel)) {
                clearInterval(q)
            }
        };
        init(cfg);
        break;
    case "2":
        init = function(cfg) {
            i = parseInt(cfg.bottom || "0")
        };
        func = function(spec) {
            i += cfg.clipspeed || 2;
            el.style.clip = "rect(" + spec.top + "," + spec.right + "," + i + "px," + spec.left + ")";
            if (i >= parseInt(spec.endPixel)) {
                clearInterval(q)
            }
        };
        init(cfg);
        break
    }
    return that
};
App.unit = function() {
    var it = {},
    udf;
    it.u = u = function(func, key) {
        var context = {
            it: it,
            sup: it[key]
        };
        return function() {
            func.apply(context, arguments);
            return it
        }
    };
    return it
}; (function(ns) {
    ns.builder3 = function(html, parent, param) {
        param = typeof param == "object" ? param: {};
        parent.innerHTML = html;
        var i = 0,
        domList = {},
        actList = {},
        nodes = parent.getElementsByTagName("*"),
        len = nodes.length,
        c,
        mm,
        dd,
        cv = param.clear || 1,
        mk = param.mm || "mm",
        dk = param.dd || "dd";
        for (i; i < len; i++) {
            c = nodes[i];
            dd = c.getAttribute(dk);
            mm = c.getAttribute(mk);
            dd && (domList[dd] = c) && (cv && c.removeAttribute(dk));
            mm && ((!actList[mm] && (actList[mm] = [c])) || (actList[mm] = actList[mm].concat([c]))) && (cv && c.removeAttribute(mk))
        }
        return {
            box: parent,
            domList: domList,
            actList: actList
        }
    }
})(App);
App.removeChildren = function(parent) {
    var n;
    while (n = parent.firstChild) {
        parent.removeChild(n)
    }
}; (function(proxy) {
    var d = document,
    zIndex = 1000;
    function b2(t, b) {
        return App.builder3(t, b, {
            dd: "id",
            mm: "action"
        })
    }
    proxy.PopUp = function() {
        var it = App.unit(),
        u = it.u,
        wrap,
        body,
        mask,
        cp = "position:absolute;clear:both;",
        ch = "visibility:hidden;display:none",
        cs = "width:100%;height:100%",
        rall = App.removeChildren;
        with(it.wrap = wrap = $C("div")) {
            appendChild(it.body = body = $C("div"));
            style.cssText = [cp, ch, "z-index:" + zIndex++].join(";")
        }
        it.mask = u(function() {
            if (!mask) {
                wrap.insertBefore(mask = $C("iframe"), body);
                with(mask) {
                    frameborder = 0;
                    src = "about:blank";
                    style.cssText = [cp, cs, "filter:alpha(opacity=0);opacity:0;z-index:-1"].join(";")
                }
            }
        });
        it.content = u(function(html) {
            rall(body);
            it.dom = b2(html, body)["domList"]
        });
        it.position = u(function(x, y) {
            with(wrap.style) {
                left = x + "px";
                top = y + "px"
            }
        });
        it.visible = u(function(b) {
            with(wrap.style) {
                visibility = b ? "visible": "hidden";
                display = b ? "": "none"
            }
        });
        it.zIndex = u(function(nIndex) {
            wrap.style.zIndex = nIndex
        });
        it.destroy = u(function() {
            wrap.parentNode.removeChild(wrap);
            wrap = body = mask = dom = null
        });
        d.body.appendChild(wrap);
        return it
    }
})(App); (function(ns) {
    ns.ELSize = function(oElement, key, hasMargin) {
        var c = Core.Dom.getStyle,
        os = oElement[(key == "width") ? "offsetWidth": "offsetHeight"],
        i = 0,
        p = ["padding", "margin", "border"],
        d = (key == "width") ? ["Left", "Right"] : ["Top", "Bottom"];
        for (i; i < d.length; i++) {
            os -= parseFloat(c(oElement, "padding" + d[i])) || 0;
            hasMargin && (os += parseFloat(c(oElement, "margin" + d[i])) || 0);
            os -= parseFloat(c(oElement, "border" + d[i] + "Width")) || 0
        }
        return os
    }
})(App); (function(ns) {
    var d = document,
    udf;
    App.Wipe = function(eWrap, eTarget, nCount) {
        var it = App.unit(),
        es = App.ELSize,
        isPlaying = 0,
        u = it.u,
        timer,
        c = nCount || 8,
        wp = eWrap,
        ws,
        bp = eTarget,
        bs = bp.style,
        parent,
        sw,
        sh,
        ow,
        oh;
        if (!wp) {
            wp = $C("div");
            wp.style.cssText = "position:relative;clear:both";
            parent = bp.parentNode;
            parent.insertBefore(wp, bp);
            wp.appendChild(bp)
        }
        ws = wp.style;
        it.isPlaying = function() {
            return isPlaying
        };
        it.isVisible = function() {
            return isVisible
        };
        it.reset = u(function() {
            isPlaying = 0;
            clearInterval(timer);
            ws.visibility = "hidden";
            sw = sh = ow = oh = null
        });
        it.wipe = u(function(sType, bVisible, fCallBack, bReverse) {
            if (isPlaying) {
                return
            }
            var d, a, t, o, r, q, i = 1,
            v = bVisible == udf ? true: bVisible,
            que,
            uque;
            isPlaying = 1;
            ws.visibility = ws.overflow = "hidden";
            ws.display = "block";
            bs[$IE ? "styleFloat": "cssFloat"] = "left";
            bs.marginTop = bs.marginLeft = "0px";
            bs.width = (sw || (sw = es(bp, "width"))) + "px";
            bs.height = (sh || (sh = es(bp, "height"))) + "px";
            ws.width = (ow || (ow = bp.offsetWidth)) + "px";
            ws.height = (oh || (oh = bp.offsetHeight)) + "px";
            bs.marginTop = bs.marginLeft = "0px";
            d = {
                up: 0,
                down: 1,
                left: 2,
                right: 3
            } [sType];
            a = ["marginTop", "height", "marginLeft", "width"][d];
            t = [bs, ws, bs, ws][d];
            o = [oh, oh, ow, ow][d];
            r = [0, 1, 0, 1][d];
            que = [o];
            que[c] = 0;
            for (i; i < c; i++) {
                que[i] = (o = o / 2)
            }
            bReverse && que.reverse();
            uque = que.concat().reverse();
            q = (v ? r: !r) ? uque: que;
            t[a] = [q[0], "px"].join("");
            ws.visibility = "visible";
            clearInterval(timer);
            timer = setInterval(function() {
                if (q.length) {
                    t[a] = Math.floor(q.shift()) + "px";
                    return
                }
                clearInterval(timer);
                isPlaying = 0;
                v && (ws.overflow = "");
                try {
                    bs.cssText = "";
                    fCallBack && u(fCallBack)()
                } catch(e) {}
            },
            30)
        });
        return it
    }
})(App); (function(ns) {
    var timer, que, i, step = 8,
    of;
    ns.scrollTo = function(nForm, nTo, nStep) {
        step = nStep || step;
        of = nForm - nTo;
        que = [of];
        que[step] = 0;
        i = 1;
        for (i; i < step; i++) {
            que[i] = (of = of / 2)
        }
        clearInterval(timer);
        timer = setInterval(function() {
            if (que.length) {
                window.scrollTo(0, nTo + que.shift());
                return
            }
            clearInterval(timer)
        },
        30)
    }
})(App); (function(ns) {
    var d = document,
    de = (d.documentElement || {}),
    udf,
    b2 = function(t, b) {
        return App.builder3(t, b, {
            dd: "id",
            mm: "action"
        })
    };
    ns.PopUpWipe = function() {
        var it = ns.PopUp(),
        u = it.u,
        e = it.e,
        uque = [],
        type,
        isOpened,
        cx,
        cy,
        t;
        it.ani = App.Wipe(it.wrap, it.body);
        it.wipe = u(function(sType, bVisible, fCallBack) {
            type = sType;
            it.ani.wipe(sType, bVisible, fCallBack)
        });
        it.wipeHide = u(function() {
            it.ani.reset();
            it.wipe(type, false,
            function() {
                it.visible(false)
            })
        });
        it.position = u(function(x, y) {
            if (cx != x || cy != y) {
                cx = x;
                cy = y;
                it.ani.reset()
            }
            type = null;
            t = window.pageYOffset || Math.max(de.scrollTop, d.body.scrollTop);
            if (y < t) {
                App.scrollTo(t, y)
            }
            this.sup(x, y)
        },
        "position");
        it.close = u(function() {
            if (!type) {
                it.visible(false);
                return false
            }
            it.wipeHide()
        });
        return it
    }
})(App); (function(ns) {
    var d = document,
    ce = Core.Events,
    adde = ce.addEvent,
    removee = ce.removeEvent,
    stope = ce.stopEvent,
    rall = App.removeChildren,
    unf, builder = function(t, b) {
        return App.builder3(t, b, {
            dd: "id",
            mm: "action"
        })
    };
    ns.BasePopUpDialog = function() {
        var contnet = '<div id="panel" class="miniPopLayer" style="width:200px;"><div id="typePanel" class="txt1 gray6"><img class="tipicon tip1" id="icon" src="' + scope.$BASECSS + 'style/images/common/PY_ib.gif"/><div id="content"></div></div><div id="buttonPanel" style="display:none" class="btn"></div></div>';
        var it = ns.PopUpWipe().content(contnet),
        u = it.u,
        dom = it.dom;
        it.show = u(function() {
            it.visible(true)
        });
        it.hide = u(function() {
            it.visible(false)
        });
        it.width = u(function(nWidth) {
            dom.panel.style.width = (nWidth || 200) + "px"
        });
        it.addButton = u(function(sLabel, fClick) {
            if (sLabel === unf && fClick === unf) {
                rall(dom.buttonPanel);
                return
            }
            var span;
            dom.buttonPanel.appendChild(span = $C("span"));
            var button = builder(['<a id="button" style="width:39px;" class="newabtn_ok" href="javascript:void(0)" onclick="return false;"><em>', sLabel, "</em></a>"].join(""), span)["domList"]["button"];
            button.onclick = u(fClick);
            dom.buttonPanel.style.display = ""
        });
        it.content = u(function(sContent) {
            dom.content.innerHTML = sContent
        });
        it.icon = u(function(nType) {
            dom.icon.className = ["tipicon tip", nType].join("")
        });
        it.wipe = u(function(sType, bVisible, fCallBack) {
            this.sup(sType, bVisible, fCallBack)
        },
        "wipe");
        adde(window,
        function() {
            it.visible(false)
        },
        "resize");
        return it
    };
    ns.PopUpAlert = (function() {
        var it, u, cx, cy, clock;
        return function() {
            if (it) {
                return it
            }
            it = ns.BasePopUpDialog();
            u = it.u;
            it.yes = u(function(f) {
                it.onYes = f
            });
            it.close = u(function(f) {
                clearTimeout(clock);
                typeof it.onYes == "function" && it.onYes();
                this.sup()
            },
            "close");
            it.lateClose = u(function(n) {
                clearTimeout(clock);
                clock = setTimeout(function() {
                    it.close()
                },
                n || 3000)
            });
            it.position = u(function(x, y) {
                if (x != cx || y != cy) {
                    cx = x;
                    cy = y;
                    clearTimeout(clock)
                }
                this.sup(x, y)
            },
            "position");
            return it
        }
    })();
    ns.PopUpConfirm = (function() {
        var it, u, cx, cy;
        return function() {
            if (it) {
                return it
            }
            it = ns.BasePopUpDialog();
            u = it.u;
            it.yes = u(function(f) {
                it.onYes = f
            });
            it.no = u(function(f) {
                it.onNo = f
            });
            it.close = u(function(f) {
                typeof it.onNo == "function" && it.onNo();
                this.sup()
            },
            "close");
            it.addButton($CLTMSG.CX0125,
            function() {
                typeof it.onYes == "function" && it.onYes();
                it.wipeHide()
            });
            it.addButton($CLTMSG.CX0126,
            function() {
                it.close()
            });
            return it
        }
    })()
})(App);
App.Dom = (function() {
    var documentElement = document.documentElement,
    CLASS = (!documentElement.hasAttribute) ? "className": "class";
    var dom = {
        trim: function(s) {
            try {
                return s.replace(/^\s+|\s+$/g, "")
            } catch(e) {
                return s
            }
        },
        hasClass: function(el, className) {
            var ret = false,
            current;
            if (el && className) {
                current = el.getAttribute(CLASS) || "";
                if (className.exec) {
                    ret = className.test(current)
                } else {
                    ret = className && (" " + current + " ").indexOf(" " + className + " ") > -1
                }
            } else {}
            return ret
        },
        addClass: function(el, className) {
            var ret = false,
            current;
            if (el && className) {
                current = el.className || "";
                if (!this.hasClass(el, className)) {
                    current += " " + className;
                    el.setAttribute(CLASS, current.replace(/^\s+|\s+$/g, ""));
                    ret = true
                }
            } else {}
            return ret
        },
        removeClass: function(el, className) {
            var ret = false,
            current, newClass, attr;
            if (el && className) {
                current = el.getAttribute(CLASS) || "";
                el.setAttribute(CLASS, dom.trim((current + " ").replace(className + " ", "")));
                newClass = el.getAttribute(CLASS);
                if (current !== newClass) {
                    el.setAttribute(CLASS, dom.trim(newClass));
                    ret = true;
                    if (el.getAttribute(CLASS) === "") {
                        el.removeAttribute(CLASS)
                    }
                }
            } else {}
            return ret
        },
        replaceClass: function(el, newClass, oldClass) {
            dom.removeClass(el, oldClass);
            dom.addClass(el, newClass)
        },
        getByClass: function(className, tag, root) {
            className = dom.trim(className);
            tag = tag || "*";
            if (!root) {
                return []
            }
            var nodes = [],
            elements = root.getElementsByTagName(tag);
            for (var i = 0,
            len = elements.length; i < len; ++i) {
                if (dom.hasClass(elements[i], className)) {
                    nodes[nodes.length] = elements[i]
                }
            }
            return nodes
        },
        getBy: function(method, tag, root) {
            tag = tag || "*";
            if (!root) {
                return []
            }
            var nodes = [],
            elements = root.getElementsByTagName(tag);
            for (var i = 0,
            len = elements.length; i < len; ++i) {
                if (method(elements[i])) {
                    nodes[nodes.length] = elements[i]
                }
            }
            return nodes
        },
        getXY: function(el, config) {
            config = config || {};
            config.abs = config.abs || false;
            var pos = {};
            var _base = function(obj) {
                var x = 0,
                y = 0;
                if (obj.getBoundingClientRect) {
                    var box = obj.getBoundingClientRect();
                    var D = documentElement;
                    x = box.left + Math.max(D.scrollLeft, document.body.scrollLeft) - D.clientLeft;
                    y = box.top + Math.max(D.scrollTop, document.body.scrollTop) - D.clientTop
                } else {
                    for (; obj != document.body; x += obj.offsetLeft, y += obj.offsetTop, obj = obj.offsetParent) {}
                }
                return {
                    x: x,
                    y: y
                }
            };
            pos = _base(el);
            if (config.abs) {
                while (el = el.offsetParent) {
                    if (App.Dom.getStyle(el, "position") == "absolute") {
                        var tpos = _base(el);
                        pos.x -= tpos.x;
                        pos.y -= tpos.y
                    }
                }
            }
            return pos
        },
        getScreen: function() {
            var screen = {};
            if ($IE) {
                screen.w = documentElement.clientWidth;
                screen.h = documentElement.clientHeight
            } else {
                screen.w = window.innerWidth;
                screen.h = window.innerHeight
            }
            return screen
        },
        getStyle: function(el, property) {
            if ($IE) {
                var value = el.currentStyle ? el.currentStyle[property] : null;
                switch (property) {
                case "opacity":
                    var val = 100;
                    try {
                        val = el.filters["DXImageTransform.Microsoft.Alpha"].opacity
                    } catch(e) {
                        try {
                            val = el.filters("alpha").opacity
                        } catch(e) {}
                    }
                    return val / 100;
                case "float":
                    property = "styleFloat";
                case "height":
                    return (value == "auto") ? "0px": el.style[property];
                case "width":
                    return (value == "auto") ? "0px": el.style[property];
                default:
                    var value = el.currentStyle ? el.currentStyle[property] : null;
                    return (el.style[property] || value)
                }
            } else {
                if (property == "float") {
                    property = "cssFloat"
                }
                try {
                    var computed = document.defaultView.getComputedStyle(el, "")
                } catch(e) {
                    traceError(e)
                }
                return el.style[property] || computed ? computed[property] : null
            }
        },
        setStyle: function(el, property, val) {
            if ($IE) {
                switch (property) {
                case "opacity":
                    el.style.filter = "alpha(opacity=" + (val * 100) + ")";
                    if (!el.currentStyle || !el.currentStyle.hasLayout) {
                        el.style.zoom = 1
                    }
                    break;
                case "float":
                    property = "styleFloat"
                }
            } else {
                if (property == "float") {
                    property = "cssFloat"
                }
            }
            el.style[property] = val
        },
        insertAfter: function(obj, target) {
            var parentEl = target.parentNode;
            if (parentEl.lastChild == target) {
                parentEl.appendChild(obj)
            } else {
                parentEl.insertBefore(obj, target.nextSibling)
            }
        },
        getScroll: function() {
            var de = document.documentElement,
            db = document.body;
            var t, l, w, h;
            if (de && de.scrollTop) {
                t = de.scrollTop;
                l = de.scrollLeft;
                w = de.scrollWidth;
                h = de.scrollHeight
            } else {
                if (db) {
                    t = db.scrollTop;
                    l = db.scrollLeft;
                    w = db.scrollWidth;
                    h = db.scrollHeight
                }
            }
            return {
                t: t,
                l: l,
                w: w,
                h: h
            }
        },
        domClick: function(obj) {
            if ($IE) {
                obj.click()
            } else {
                var evt = document.createEvent("MouseEvents");
                evt.initEvent("click", true, true);
                obj.dispatchEvent(evt)
            }
        },
        contains: function(parent, node) {
            if (!$IE) {
                do {
                    if (parent == node) {
                        return true
                    }
                } while ( node = node . parentNode );
                return false
            } else {
                return parent.contains(node)
            }
        }
    };
    return dom
})();
Core.Dom.getTop = function(element) {
    var top = 0;
    var el = $E(element);
    if (el.offsetParent) {
        while (el.offsetParent) {
            top += el.offsetTop;
            el = el.offsetParent
        }
    } else {
        if (el.y) {
            top += el.y
        }
    }
    return top
};
App.skin_pop = function() {
    if (!$E("skin_tip")) {
        return false
    }
    var _addevent = Core.Events.addEvent;
    var _getEventTag = Core.Events.getEventTarget;
    var _stopevent = Core.Events.stopEvent;
    var _getEleCls = Core.Dom.getElementsByClass;
    var _getLeft = Core.Dom.getLeft;
    var _getTop = Core.Dom.getTop;
    var _getXY = Core.Dom.getXY;
    var _hook = null;
    var html = '<div id="skin_showtip" style="display:none;z-Index:999" class="pertemplate"><p><a href="/person/myskin.php">' + $CLTMSG.CC5701 + '</a></p><img title="" class="icon_pertemplate" src="' + scope.$BASEIMG + 'style/images/common/transparent.gif"></div>';
    Core.Dom.insertHTML(document.body, html, "beforeend");
    var element = {
        oSkin: $E("skin_tip"),
        oPop: $E("skin_showtip")
    };
    var mouseover = function(obj) {
        var skinbtnLeft = _getLeft(element.oSkin);
        var skinbtnTop = _getTop(element.oSkin);
        var left = (skinbtnLeft - 38) + "px";
        var top = (skinbtnTop - 36) + "px";
        obj.style.left = left;
        obj.style.top = top;
        obj.style.display = "";
        _addevent(document.body, mouseout, "mouseover")
    };
    var mouseout = function() {
        var _event = Core.Events.fixEvent(Core.Events.getEvent());
        var oTarget = _getEventTag(Core.Events.getEvent());
        while (oTarget) {
            if ((oTarget == element.oPop || oTarget == element.oSkin.parentNode)) {
                return true
            }
            if (oTarget != document.body) {
                oTarget = oTarget.parentNode
            } else {
                break
            }
        }
        element.oPop.style.display = "none";
        Core.Events.removeEvent(document.body, mouseout, "mouseover")
    };
    _addevent(element.oSkin, (function() {
        return function() {
            mouseover(element.oPop)
        }
    })(), "mouseover")
};
$registJob("initSearch",
function() {
    Core.Events.addEvent($E("m_keyword"), App.focusblur, "blur");
    App.square_pop();
    App.skin_pop();
    App.search("m_keyword", "m_submit", "m_search", 30, (scope.$GFW == 0) ? $CLTMSG.WL0001: $CLTMSG.WL0002);
    $E("m_keyword").value = (scope.$GFW == 0) ? $CLTMSG.WL0001: $CLTMSG.WL0002
});
App.search = function(input, subbtn, form, maxlen, txt, cindex) {
    var maxlen = maxlen || 30;
    var textnode = $E(input);
    var subbtn = $E(subbtn);
    var form = $E(form);
    Utils.Sinput.limitMaxLen(textnode, maxlen);
    var auto = new App.autoSelect({
        input: textnode,
        id: textnode.id + "_tip",
        subbtn: subbtn,
        panel: form,
        maxlen: 12
    });
    var urls = {
        0 : "/k/",
        1 : "/search/user.php?search="
    };
    if (scope.$GFW == 0 && cindex !== undefined) {
        auto.curIndex = cindex
    }
    function formget(event) {
        var value = Core.String.trim(textnode.value);
        value = Core.String.leftB(value, maxlen);
        if (value == ((scope.$GFW == 0) ? $CLTMSG.WL0001: $CLTMSG.WL0002)) {
            return
        }
        if (value && value != txt) {
            location.href = urls[scope.$GFW == 0 ? auto.curIndex: 1] + encodeURIComponent(encodeURIComponent(value))
        } else {
            textnode.focus()
        }
        Core.Events.stopEvent(event)
    }
    Core.Events.addEvent(subbtn, formget, "click");
    App.enterSubmit({
        parent: form,
        action: function(event) {
            Core.Events.fireEvent(subbtn, "click")
        }
    })
};
App.autoSelect = function(options) {
    this.panel = options.panel;
    this.input = $E(options.input);
    this.maxLen = options.maxlen || 4 * 2;
    this.subbtn = options.subbtn;
    this.initHTML(options.id);
    this.clip = App.Clip($E(options.id), {
        clipType: "2",
        bottom: "0px",
        endPixel: "200px",
        clipspeed: 4
    });
    Core.Events.addEvent(this.input, this.fileElement.bind2(this), "focus");
    scope.$GFW == 0 && Core.Events.addEvent(this.input, this.keydown.bind2(this), "keydown");
    scope.$GFW == 0 && Core.Events.addEvent(this.input, this.fileElement.bind2(this), "keyup");
    scope.$GFW == 0 && Core.Events.addEvent(document.body, this.removeElement.bind2(this), "click")
};
App.autoSelect.prototype = {
    initHTML: function(id) {
        var wrap = $E(id);
        var html = "<span>" + $CLTMSG.CD0002 + '</span><ul id="#{id}_content">' + $CLTMSG.CD0003 + "</ul>";
        html = html.replace(/#\{id\}/g, id);
        wrap.innerHTML = html;
        var _txt = $E("m_keyword").value.replace(/^\s+|\s+$/g, "");
        var _isDef = _txt == "" || _txt == ((scope.$GFW == 0) ? $CLTMSG.WL0001: $CLTMSG.WL0002);
        App.Dom.getBy(function(el) {
            if (el.getAttribute("act") == "def") {
                el.style.display = _isDef ? "": "none"
            }
            if (el.getAttribute("act") == "isinput") {
                el.style.display = !_isDef ? "": "none"
            }
        },
        "span", $E("m_keyword_tip"));
        wrap.style.zIndex = 300;
        wrap.style.left = (Core.Dom.getXY(this.input)[0] - Core.Dom.getXY(wrap.parentNode)[0]) + "px";
        wrap.style.top = (Core.Dom.getElementsByClass(wrap.parentNode, "div", "head_menu")[0].offsetTop + this.panel.offsetTop + this.panel.offsetHeight) + "px";
        this.wrap = wrap;
        this.searchBlog = $E(id + "_blog");
        this.searchAuthor = $E(id + "_author");
        this.curIndex = 0;
        this.elements = $E(id + "_content").getElementsByTagName("li");
        var othis = this;
        for (var i = 0,
        els = this.elements,
        el; i < els.length; i++) {
            var el = els[i];
            el.onclick = Core.Function.bind3(othis.setCurElement, othis, [i, el, "click"]);
            el.onmouseover = Core.Function.bind3(othis.setCurElement, othis, [i, el, "mouseover"]);
            el.onmouseout = Core.Function.bind3(othis.setCurElement, othis, [i, el, "mouseout"])
        }
    },
    setCurElement: function(index, el, type) {
        var event = Core.Events.getEvent();
        this.curIndex = index;
        this.curElement = el;
        this.complete();
        this.curElement = this.elements[this.curIndex];
        if (type == "mouseout") {
            var relatedTarget = event.relatedTarget || event.toElement;
            if (relatedTarget && relatedTarget.nodeType == 1) {
                if (relatedTarget.tagName.toLowerCase() == "li") {
                    this.elements[this.curIndex].className = ""
                }
            }
        }
        if (type == "mouseover") {
            this.setBackGroud(el)
        }
        if (type == "click") {
            Core.Events.fireEvent(this.subbtn, "click");
            Core.Events.stopEvent(event);
            return false
        }
    },
    setBackGroud: function(el) {
        for (var i = 0,
        len = this.elements.length,
        els = this.elements; i < len; i++) {
            var cur = els[i];
            if (cur != el) {
                cur.className = ""
            } else {
                cur.className = "cur"
            }
        }
    },
    fileElement: function(event) {
        if (App.focusblur) {
            App.focusblur()
        }
        if (scope.$GFW == 1) {
            return
        }
        var event = Core.Events.getEvent();
        var str = this.input.value;
        str = Core.String.trim(str);
        var _txt = $E("m_keyword").value.replace(/^\s+|\s+$/g, "");
        var _isDef = _txt == "" || _txt == ((scope.$GFW == 0) ? $CLTMSG.WL0001: $CLTMSG.WL0002);
        if (_isDef) {
            this.wrap.style.display = "none"
        } else {
            this.wrap.style.display = "";
            this.clipStart()
        }
        if (Core.String.byteLength(str) > this.maxLen) {
            str = Core.String.leftB(str, this.maxLen - 1) + "..."
        }
        this.searchBlog.innerHTML = Core.String.encodeHTML(str);
        this.searchAuthor.innerHTML = Core.String.encodeHTML(str);
        Core.Events.addEvent(this.input,
        function() {
            var _txt = $E("m_keyword").value.replace(/^\s+|\s+$/g, "");
            var _isDef = _txt == "" || _txt == ((scope.$GFW == 0) ? $CLTMSG.WL0001: $CLTMSG.WL0002);
            App.Dom.getBy(function(el) {
                if (el.getAttribute("act") == "def") {
                    el.style.display = _isDef ? "": "none"
                }
                if (el.getAttribute("act") == "isinput") {
                    el.style.display = !_isDef ? "": "none"
                }
                if (el.getAttribute("act") == "txt") {
                    el.innerHTML = _txt
                }
            },
            "span", $E("m_keyword_tip"))
        },
        "keyup");
        return this
    },
    keydown: function(event) {
        event = event || window.event;
        if (event.keyCode == "38" || event.keyCode == "37") {
            this.curIndex--
        }
        if (event.keyCode == "40" || event.keyCode == "39") {
            this.curIndex++
        }
        this.curIndex = this.complete();
        if (this.curElement == this.elements[this.curIndex]) {
            return true
        }
        if (this.curElement) {
            this.curElement.className = "";
            this.curElement = null
        }
        this.curElement = this.elements[this.curIndex];
        this.curElement.className = "cur";
        this.url = this.curElement.getAttribute("url")
    },
    clipStart: function() {
        if (this.wrap.style.visibility != "visible") {
            this.clip.startClip()
        }
    },
    complete: function() {
        if (this.curIndex < 0) {
            this.curIndex = this.elements.length - 1
        }
        if (this.curIndex >= this.elements.length) {
            this.curIndex = 0
        }
        return this.curIndex
    },
    removeElement: function() {
        this.wrap.style.visibility = "hidden";
        this.clip.stopClip();
        this.wrap.style.display = "none"
    }
}; (function() {
    var tips = App.builder2({
        template: '<div class="inter_tip" id="outer" style="position:absolute"><div class="tipcontent" id="inner"></div><div class="tipbt"></div></div>'
    });
    var setTips = function() {
        document.body.appendChild(tips.domList.outer);
        tips.domList.outer.style.zIndex = 200;
        var pos = Core.Dom.getXY($E("cancelfollow"));
        tips.domList.outer.style.left = (pos[0] - 45) + "px";
        tips.domList.outer.style.top = (pos[1] - 70) + "px";
        tips.domList.inner.innerHTML = $CLTMSG.CY0107
    };
    var bindTips = function() {
        if ($E("cancelfollow")) {
            setTips();
            $E("cancelfollow").onmouseover = function() {
                tips.domList.outer.style.display = ""
            };
            $E("cancelfollow").onmouseout = function() {
                tips.domList.outer.style.display = "none"
            };
            tips.domList.outer.style.display = "none"
        } else {
            tips.domList.outer.style.display = "none";
            setTimeout(bindTips, 2000)
        }
    };
    bindTips();
    App.followOper = function(type, uid, el, param, name, conf) {
        if (!scope.$uid) {
            location.replace("/login.php?url=" + encodeURIComponent(location.href));
            return false
        }
        if (scope.$cuser_status === "nofull") {
            App.finishInformation();
            return false
        }
        if (scope.$uid == "123456") {
            var arg = arguments[0];
            type = arg[0];
            uid = arg[1];
            el = arg[2];
            param = arg[3];
            name = arg[4]
        }
        var delay = 1;
        var url = "";
        var p = $C("div");
        if (type == "add") {
            bindTips();
            url = "/attention/aj_addfollow.php";
            if (conf) {
                url += ("?" + App.jsonToQuery(conf))
            }
            if (scope.isfans) {
                p.className = "MIB_btn_inter lf";
                p.innerHTML = $CLTMSG.CY0105 + '<span class="MIB_line_sp">|</span><a id="cancelfollow" onclick="App.removeFollow(\'' + uid + "',this,'" + name + '\')" href="javascript:void(0);"><em>' + $CLTMSG.CD0005 + "</em></a>"
            } else {
                p.className = "MIB_btn2 lf";
                p.innerHTML = $CLTMSG.CD0004 + '<span class="MIB_line_sp">|</span><a id="cancelfollow" onclick="App.removeFollow(\'' + uid + "',this,'" + name + '\')" href="javascript:void(0);"><em>' + $CLTMSG.CD0005 + "</em></a>"
            }
            if (scope.$pageid == "profile" && Core.Dom.getElementsByClass(document, "DIV", "roommate").length > 0) {
                Core.Dom.getElementsByClass(document, "DIV", "roommate")[0].style.display = "";
                var rm = Core.Dom.getElementsByClass(document, "DIV", "roommate")[0];
                var a = Core.Dom.getElementsByAttr(rm, "action", "groupselector")[0];
                var b = App.group_selector.person(a); (function(k) {
                    a.onclick = function(e) {
                        App.group_selector.dropBox.moveTo(k).show();
                        Core.Events.stopEvent(e)
                    }
                })(b)
            }
            if (scope.$pageid == "profile") {
                if (scope.setGroup) {
                    scope.setGroup.show = true
                }
                if (scope.nickname) {
                    scope.nickname.show = true
                }
                if ($E("line")) {
                    $E("line").style.display = ""
                }
                if ($E("setgroup")) {
                    $E("setgroup").style.display = ""
                }
            }
        } else {
            url = "/attention/aj_delfollow.php";
            if (scope.$pageid == "profile" && Core.Dom.getElementsByClass(document, "DIV", "roommate").length > 0) {
                var rm = Core.Dom.getElementsByClass(document, "DIV", "roommate")[0];
                rm.style.display = "none";
                Core.Dom.getElementsByAttr(rm, "action", "groupselector")[0].setAttribute("groupids", "");
                Core.Dom.getElementsByClass(document, "DIV", "downmenu downmenuAttr")[0].style.display = "none"
            }
            if (scope.$pageid == "profile") {
                if (scope.setGroup) {
                    scope.setGroup.show = false;
                    scope.setGroup.gids = ""
                }
                if (scope.nickname) {
                    scope.nickname.show = false;
                    scope.nickname.remarkName = "";
                    if ($E("remark_name")) {
                        $E("remark_name").innerHTML = ""
                    }
                }
                if ($E("line")) {
                    $E("line").style.display = "none"
                }
                if ($E("setgroup")) {
                    $E("setgroup").style.display = "none"
                }
            }
            p.className = "lf";
            var imgURI = scope.$BASEIMG + "style/images/common/transparent.gif";
            p.innerHTML = '<a href="javascript:void(0);" onclick="App.followOne(\'' + uid + "',this,'" + name + '\')" class="btn_add"><img class="SG_icon" src="' + imgURI + '" title="' + $CLTMSG.CD0006 + '"><em>' + $CLTMSG.CD0006 + "</em></a>"
        }
        function cb(json) {
            if (scope.$uid == "123456") {
                location.reload()
            } else {
                if (el) {
                    el.ask_following = true
                }
                setTimeout(function() {
                    while (el.nodeName.toLowerCase(0) != "div") {
                        el = el.parentNode
                    }
                    Core.Dom.replaceNode(p, el);
                    try {
                        if (type == "add" && scope.$pageid == "profile") {
                            App.grpDialog(scope.setGroup, true)
                        }
                        if (type == "remove" && scope.$pageid == "profile") {
                            window.location.reload(true)
                        }
                    } catch(e) {}
                },
                delay)
            }
        }
        function ecb(json) {
            if (el) {
                el.ask_following = false
            }
            if (json && json.code == "MR0050") {
                App.forbidrefresh(function() {
                    param.retcode = scope.doorretcode;
                    App.doRequest(param, url, cb, ecb)
                },
                "/attention/aj_addfollow.php")
            } else {
                App.flyDialog(json, null, null, {
                    ok: function() {
                        if (scope.$uid == "123456") {
                            location.reload()
                        }
                    }
                })
            }
        }
        App.doRequest(param, url, cb, ecb)
    }
})();
App.followOne = function(uid, el, name, conf) {
    if (el.ask_following) {
        return false
    }
    App.followOper("add", uid, el, {
        uid: uid,
        fromuid: scope.$uid
    },
    name, conf)
};
App.removeFollow = (function() {
    var current;
    return function(uid, el, name) {
        var pos = Core.Dom.getXY(el);
        var x = pos[0] - ((200 - el.offsetWidth) / 2);
        var y = pos[1] - (el.offsetHeight) - 70;
        var msg = [$CLTMSG.CD0007, name, "?"].join("");
        App.PopUpConfirm().position(x, y).content(msg).icon(4).yes(function() {
            App.followOper("remove", uid, el, {
                touid: uid,
                fromuid: scope.$uid
            },
            name)
        }).no(function() {
            el.isOpened = null
        }).wipe("up", true)
    }
})();
App.focusblur = function() {
    var el = Core.Events.getEventTarget();
    var event = Core.Events.getEvent();
    var txt = (scope.$GFW == 0) ? $CLTMSG.WL0001: $CLTMSG.WL0002;
    txt = txt || $CLTMSG.CD0008;
    if (event.type == "focus") {
        if (el.value == txt || el.value == $CLTMSG.CD0008) {
            el.value = ""
        }
    }
    if (event.type == "blur") {
        if (el.value == "") {
            el.value = txt;
            if ($E("m_keyword_tip")) {
                $E("m_keyword_tip").style.display = "none"
            }
        }
    }
};
Core.Dom.insertAfter = function(newElement, targetElement) {
    var parent = targetElement.parentNode;
    if (parent.lastChild == targetElement) {
        parent.appendChild(newElement)
    } else {
        parent.insertBefore(newElement, targetElement.nextSibling)
    }
    return newElement
};
Core.Dom.removeNode = function(node) {
    node = $E(node) || node;
    try {
        node.parentNode.removeChild(node)
    } catch(e) {}
};
App.copyText = function(text2copy) {
    var checkFlashVer = function() {
        var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin: 0;
        if (plugin) {
            var words = navigator.plugins["Shockwave Flash"].description.split(" ");
            for (var i = 0; i < words.length; ++i) {
                if (isNaN(parseInt(words[i], 10))) {
                    continue
                }
                var MM_PluginVersion = words[i]
            }
            return MM_PluginVersion >= 10
        } else {
            if ($IE) {
                try {
                    new ActiveXObject("ShockwaveFlash.ShockwaveFlash.10");
                    return true
                } catch(e) {
                    return false
                }
            }
        }
    };
    if (window.clipboardData && $IE6) {
        window.clipboardData.clearData();
        return window.clipboardData.setData("Text", text2copy)
    } else {
        if (checkFlashVer()) {
            if ($IE) {
                try {
                    window.clipboardData.clearData();
                    return window.clipboardData.setData("Text", text2copy)
                } catch(e) {
                    return false
                }
            }
            try {
                netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
                var clip = Components.classes["@mozilla.org/widget/clipboard;1"].createInstance(Components.interfaces.nsIClipboard);
                if (!clip) {
                    return
                }
                var trans = Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);
                if (!trans) {
                    return
                }
                trans.addDataFlavor("text/unicode");
                var str = {};
                var len = {};
                str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
                var copytext = text2copy;
                str.data = copytext;
                trans.setTransferData("text/unicode", str, copytext.length * 2);
                var clipid = Components.interfaces.nsIClipboard;
                if (!clip) {
                    return false
                }
                clip.setData(trans, null, clipid.kGlobalClipboard);
                return true
            } catch(e) {
                return false
            }
        } else {
            var flashcopier = "flashcopier";
            if (!$E(flashcopier)) {
                var divholder = $C("div");
                divholder.id = flashcopier;
                document.body.appendChild(divholder)
            }
            text2copy = text2copy.replace(/%/g, escape("%")).replace(/&/g, escape("&"));
            var divinfo = '<embed src="/view/js/clipboard.swf" FlashVars="clipboard=' + text2copy + '" width="0" height="0" type="application/x-shockwave-flash"></embed>';
            $E(flashcopier).innerHTML = divinfo;
            return true
        }
    }
};
App.copyTextDialog = function(text, cfg) {
    var config = cfg || {};
    var sucStr = config.succText || $CLTMSG.CC4101;
    var options = {
        icon: 3
    };
    if (App.copyText(text || "") == false) {
        sucStr = config.errorText || $CLTMSG.CD0016;
        options = {
            icon: 1
        }
    }
    App.alert(sucStr, options);
    Core.Events.stopEvent()
};
Core.Dom.contains = function(oParentNode, oNode) {
    return oParentNode.contains(oNode)
};
if (!$IE) {
    Core.Dom.contains = function(oParentNode, oNode) {
        do {
            if (oParentNode == oNode) {
                return true
            }
        } while ( oNode = oNode . parentNode );
        return false
    }
}
App.changeBackColor = function(event, el) {
    event = event || window.event;
    var id = el.id;
    var cancel = $E("cancel_" + id);
    var message = $E("message_" + id);
    var remark = $E("remark_" + id);
    var fire = $E("fire_" + id);
    if (event.type == "mouseover") {
        var relatedTarget = event.relatedTarget || event.fromElement;
        if (el != relatedTarget && relatedTarget && !Core.Dom.contains(el, relatedTarget)) {
            if (cancel) {
                cancel.style.display = ""
            }
            if (message) {
                message.style.display = ""
            }
            if (remark) {
                remark.style.display = ""
            }
            if (fire) {
                fire.style.display = ""
            }
        }
    }
    if (event.type == "mouseout") {
        var relatedTarget = event.relatedTarget || event.toElement;
        if (el != relatedTarget && relatedTarget && !Core.Dom.contains(el, relatedTarget)) {
            if (cancel) {
                cancel.style.display = "none"
            }
            if (message) {
                message.style.display = "none"
            }
            if (remark) {
                remark.style.display = "none"
            }
            if (fire) {
                fire.style.display = "none"
            }
        }
    }
};
App.admin_uid_list = ["1257113795", "1642909335", "1658688240", "1661523401"];
App.followadd = function(uid, el, url, name, conf) {
    url = "/attention/aj_addfollow.php";
    if (conf) {
        url += ("?" + App.jsonToQuery(conf))
    }
    while (el.nodeName.toLowerCase(0) != "p") {
        el = el.parentNode
    }
    function cb(json) {
        if (scope.$pageid == "follow" && scope.$oid == scope.$uid) {
            var imgURI = scope.$BASECSS + "style/images/common/transparent.gif";
            el.innerHTML = '<img class="small_icon sicon_atteo" title="' + $CLTMSG.CC3001 + '" src="' + imgURI + '">'
        } else {
            el.innerHTML = '<a class="concernBtn_Yet" href="javascript:void(0);"><span class="add_yet"></span>' + $CLTMSG.CC2510 + "</a>"
        }
    }
    if (el.ask_following) {
        return false
    }
    App.followOperation({
        uid: uid,
        fromuid: scope.$uid
    },
    url, cb, el)
};
App.followcancel = (function() {
    var current;
    return function(uid, el, act, name, sex) {
        sex = sex || "TA";
        var fix = act == 1 ? -40 : 0;
        var pos = Core.Dom.getXY(el);
        var x = pos[0] - (((act == 1 ? 250 : 200) - el.offsetWidth) / 2);
        var y = pos[1] - (el.offsetHeight) - 70 + fix;
        var str = $CLTMSG.CC3101;
        var tmp1 = new Utils.Template(str);
        var stxt = tmp1.evaluate({
            sex: sex
        });
        if (Core.Array.findit(App.admin_uid_list, uid) === -1) {
            stxt += '<div class="block"><input type="checkbox" id="del_block_user"><label for="del_block_user">' + $CLTMSG.CC2701 + "</label></div>"
        }
        var msg = act == 1 ? [stxt, $CLTMSG.CC3102 + name + "?"].join("") : [$CLTMSG.CC3103, name, "?"].join("");
        var ok = function() {
            var url = "/attention/aj_delfollow.php";
            var param = {
                touid: uid,
                fromuid: scope.$uid
            };
            if (act && act == 1) {
                param.action = 1
            }
            if ($E("del_block_user") && $E("del_block_user").checked) {
                param.isblack = "OK"
            }
            function cb(json) {
                var reload = function() {
                    setTimeout(function() {
                        window.location.reload(true)
                    },
                    500)
                };
                var li = $E(uid);
                if (!li) {
                    reload();
                    return
                }
                li.onmouseover = null;
                li.onmouseout = null;
                App.Wipe(null, li).wipe("down", false,
                function() {
                    li.parentNode.parentNode.removeChild(li.parentNode);
                    if ($E("att_wrap")) {
                        if (!$E("att_wrap").getElementsByTagName("LI").length) {
                            reload();
                            return false
                        }
                    }
                    if (scope.$pageid == "profile") {
                        reload();
                        return false
                    }
                })
            }
            App.followOperation(param, url, cb, null, "del")
        };
        var cf = App.PopUpConfirm().position(x, y).content(msg).width(act == 1 ? 250 : 200).icon(4).yes(function() {
            if (!scope.loginKit().isLogin) {
                App.ModLogin({
                    func: function() {
                        setTimeout(function() {
                            Core.Events.fireEvent(el, "click")
                        },
                        200)
                    }
                });
                return false
            }
            ok();
            return false
        }).no(function() {
            return false
        });
        setTimeout(function() {
            cf.wipe("up", true)
        },
        100)
    }
})();
App.followOperation = function(data, url, cb, el, type, errorfunc) {
    if (!scope.$uid) {
        App.ModLogin({
            func: arguments.callee,
            param: [data, url, cb]
        });
        return false
    }
    if (scope.$cuser_status === "nofull") {
        App.finishInformation();
        return false
    }
    if (scope.$uid == "123456") {
        var arg = arguments[0];
        data = arg[0];
        url = arg[1];
        cb = arg[2]
    }
    function ecb(json) {
        if (el) {
            el.ask_following = false
        }
        if (json.code == "M00003") {
            App.ModLogin()
        } else {
            if (json && json.code == "MR0050") {
                App.forbidrefresh(function() {
                    data.retcode = scope.doorretcode;
                    App.doRequest(data, url, sucss, ecb)
                },
                "/attention/aj_addfollow.php")
            } else {
                App.alert(json, {
                    ok: function() {
                        if (scope.$uid == "123456") {
                            location.reload()
                        }
                    }
                });
                if (typeof errorfunc === "function") {
                    errorfunc.call(null, json)
                }
            }
        }
    }
    var sucss = function(json) {
        cb(json);
        if (scope.$uid == "123456") {
            location.reload(true)
        }
    };
    if (type === "del") {
        App.doRequest(data, url, sucss, ecb)
    } else {
        App.doRequest(data, url,
        function(json) {
            if (el) {
                el.ask_following = true
            }
            sucss(json)
        },
        ecb)
    }
};
App.copyLink = function(event) {
    var copytext = $E("copytext");
    var sucStr = $CLTMSG.CC2508;
    var options = {
        icon: 3
    };
    if (App.copyText(copytext.value) == false) {
        sucStr = $CLTMSG.CC2509;
        options = {
            icon: 1
        }
    }
    App.flyDialog(sucStr, null, $E("copylink"), options);
    Core.Events.stopEvent(event)
};
$registJob("initPage",
function() {
    var copytext = $E("copytext");
    if (copytext) {
        copytext.onfocus = copytext.onclick = function() {
            copytext.select()
        };
        Core.Events.addEvent($E("copylink"), App.copyLink, "click")
    }
});
App.followAll = function(btn) {
    try {
        if (scope.$uid != scope.$oid) {
            return
        }
        var els = $E("att_wrap").getElementsByTagName("li");
        var uids = [];
        for (var i = 0,
        len = els.length; i < len; i++) {
            var el = els[i];
            if (el.className.search(/cur/i) != -1) {
                continue
            }
            uids.push(el.id)
        }
        if (!uids.length) {
            return false
        }
        var pos = Core.Dom.getXY(btn);
        var x = pos[0] - ((200 - btn.offsetWidth) / 2);
        var y = pos[1] - (btn.offsetHeight) - 50;
        var msg = [$CLTMSG.CD0007, name, "?"].join("");
        var _alert = App.PopUpAlert().position(x, y);
        function changeBGcolor(uids) {
            for (var i = 0,
            ilen = uids.length; i < ilen; i++) {
                var uid = uids[i];
                var add = $E("add_" + uid);
                if (add) {
                    if (scope.$uid == scope.$oid && scope.$pageid == "follow") {
                        var imgURI = scope.$BASECSS + "style/images/common/transparent.gif";
                        var _p = $C("p");
                        _p.className = "mutual";
                        _p.innerHTML = '<img class="small_icon sicon_atteo" title="' + $CLTMSG.CC3001 + '" src="' + imgURI + '">';
                        Core.Dom.replaceNode(_p, add)
                    } else {
                        add.innerHTML = '<a class="concernBtn_Yet" href="javascript:void(0);"><span class="add_yet"/>' + $CLTMSG.CC2510 + "</a>"
                    }
                }
            }
        }
        function cb() {
            changeBGcolor(uids);
            setTimeout(function() {
                _alert.content($CLTMSG.CC2601).position(x, y + 20).icon(3).wipe("up", true).lateClose(1500)
            },
            500);
            btn.style.visibility = "hidden"
        }
        function ecb(json) {
            if (json && json.code == "MR0050") {
                App.forbidrefresh(function() {
                    var data = {
                        uid: uids.join(","),
                        fromuid: scope.$uid
                    };
                    data.retcode = scope.doorretcode;
                    App.doRequest(data, "/attention/aj_addfollow.php", cb, ecb)
                },
                "/attention/aj_addfollow.php")
            } else {
                if (json.code == "R01440") {
                    App.alert({
                        code: json.code
                    });
                    return false
                }
                App.promptTip(json, null, "system_information", "error");
                if (json.code == "M05003") {
                    changeBGcolor(json.data.uids)
                }
                if ($IE) {
                    location.hash = "top"
                } else {
                    document.body.scrollIntoView()
                }
            }
        }
        App.PopUpConfirm().position(x, y).width(200).content($CLTMSG.CL0803).icon(4).yes(function() {
            App.doRequest({
                uid: uids.join(","),
                fromuid: scope.$uid
            },
            "/attention/aj_addfollow.php", cb, ecb)
        }).wipe("up", true)
    } catch(e) {
        throw e
    }
};
App.followRemarkAdd = function(el, fid, oldMark) {
    var initErrorTip = $CLTMSG.CC3104;
    var html = '<div style="width: 390px;" class="layerBoxCon">	    <div class="inviteLayer">	        <p class="flName">	            ' + $CLTMSG.CC3105 + '	        </p>	        <div class="inviteLayerInput">	            <input type="text" class="PY_input" id="remark" value="">	            <a id="submit" href="javascript:void(0);" class="btn_normal"><em>' + $CLTMSG.CC1102 + '</em></a>	        </div>	        <p class="errorTs yellow2" id="errorTip" style="display:none;">' + initErrorTip + "</p>	    </div>	</div>";
    var cfg = {
        width: 390,
        zIndex: 1000,
        hidden: true
    };
    var dialog = new App.Dialog.BasicDialog($CLTMSG.CC3106, html, cfg);
    dialog.show();
    var remark = $E("remark"),
    errorTip = $E("errorTip"),
    submit = $E("submit");
    var isChrome = (navigator.userAgent.toLowerCase().indexOf("chrome") != -1);
    if (isChrome) {
        submit.style.top = "-3px"
    }
    remark.focus();
    remark.value = (App._remarks_ && App._remarks_[fid]) || oldMark || remark.value;
    if (App._remarks_ && App._remarks_[fid] == "") {
        remark.value = ""
    }
    var init = true;
    Core.Events.addEvent(remark,
    function() {
        if (init && !oldMark && !(App._remarks_ && App._remarks_[fid])) {
            remark.value = "";
            init = false
        }
    },
    "focus");
    Core.Events.addEvent(remark,
    function() {
        var len = Core.String.byteLength(remark.value);
        if (len > 16) {
            errorTip.innerHTML = initErrorTip;
            errorTip.style.display = "block";
            setTimeout(function() {
                remark.focus()
            },
            100)
        } else {
            if (errorTip.innerHTML == initErrorTip) {
                errorTip.style.display = "none"
            }
        }
    },
    "blur");
    Core.Events.addEvent(remark,
    function() {
        var len = Core.String.byteLength(remark.value);
        if (len > 16) {
            remark.value = Core.String.leftB(remark.value, 16)
        } else {
            if (errorTip.innerHTML == initErrorTip) {
                errorTip.style.display = "none"
            }
        }
    },
    "keyup");
    function setRemark() {
        if (Core.String.byteLength(remark.value) > 16) {
            errorTip.innerHTML = initErrorTip;
            errorTip.style.display = "block";
            setTimeout(function() {
                remark.focus()
            },
            200);
            return
        }
        var name = remark.value;
        App.doRequest({
            fuid: fid,
            remarkname: name
        },
        "/attention/aj_remarkname.php",
        function() {
            App._remarks_ = App._remarks_ || {};
            App._remarks_[fid] = name;
            dialog.close();
            if (scope.$pageid == "profile") {
                window.location.reload(true)
            }
            var remarkName = Core.Dom.getElementsByClass(el.parentNode.parentNode.parentNode, "span", "remark")[0];
            if (remarkName && Core.String.trim(name).length > 0) {
                remarkName.innerHTML = "&nbsp;(" + Core.String.encodeHTML(Core.String.trim(name)) + ")"
            }
            if (remarkName && Core.String.trim(name).length === 0) {
                remarkName.innerHTML = ""
            }
        },
        function() {
            if (arguments[0] && arguments[0].code) {
                errorTip.innerHTML = $SYSMSG[arguments[0].code];
                errorTip.style.display = "block"
            } else {
                App.alert($CLTMSG.CC3107, {
                    icon: 2,
                    width: 370,
                    height: 120
                })
            }
        })
    }
    Core.Events.addEvent(submit, setRemark, "click");
    App.enterSubmit({
        parent: submit.parentNode,
        action: function() {
            Core.Events.fireEvent(submit, "click")
        }
    })
};
App.rightSideFollow = function(uid, el, callback, conf) {
    var url = "/attention/aj_addfollow.php";
    if (conf) {
        url += ("?" + App.jsonToQuery(conf))
    }
    function cb() {
        var newDom = document.createElement("SPAN");
        newDom.innerHTML = $CLTMSG.CC2510;
        Core.Dom.insertAfter(newDom, el);
        Core.Dom.removeNode(el);
        if (typeof(callback) == "function") {
            callback()
        }
    }
    App.followOperation({
        uid: uid,
        fromuid: scope.$uid
    },
    url, cb)
}; (function() {
    var cb = function(uid, el) {
        var delEle = el;
        if (delEle.tagName !== "DL") {
            delEle = el.parentNode.parentNode.parentNode
        }
        App.replaceByAnewUser(delEle)
    };
    App.rightSuggestFollow = function(uid, el, conf) {
        var dl = el.parentNode.parentNode.parentNode;
        var retFun = function() {
            setTimeout(function() {
                cb(uid, dl)
            },
            1000)
        };
        App.rightSideFollow(uid, el, retFun, conf)
    };
    App.card_follow = function(uid) {
        var _di = $E("interest_person");
        var _dl = _di.getElementsByTagName("dl");
        for (var i = 0; i < _dl.length; i++) {
            if (_dl[i].getAttribute("uid") == uid) {
                var el = _dl[i];
                break
            }
        }
        if (el) {
            cb(uid, el)
        }
    }
})();
App.delDialog = function(sText, sPostApi, oPost, fCallBack, fError, oFormTarget, sTitle) {
    var oDialog = App.flyDialog(sText, "confirm", oFormTarget || null, {
        ok: function() {
            if ($E("block_user") && $E("block_user").checked) {
                oPost.isblack = "OK"
            }
            Utils.Io.Ajax.request(sPostApi, {
                POST: oPost,
                onComplete: function(json) {
                    if (json && json.code == "A00006") {
                        fCallBack(json)
                    } else {
                        fError(json)
                    }
                },
                onException: fError,
                returnType: "json"
            })
        },
        icon: 4,
        title: sTitle
    });
    return oDialog
};
App.msgPublisher = function(oElement, oConfig, bRefresh, fCallBack) {
    oElement = oElement || {};
    oConfig = oConfig || {
        limit: 600,
        postUrl: "/message/addmsg.php",
        normClass: "btn_normal",
        disabledClass: "btn_notclick"
    };
    var msgPublisher = {};
    msgPublisher.limit = (function(e, c) {
        return function() {
            var snapText = e.editor.value;
            var snapLength = Core.String.byteLength(snapText);
            if (snapLength > c.limit) {
                e.editor.value = Core.String.leftB(snapText, c.limit)
            }
        }
    })(oElement, oConfig);
    App.autoHeightTextArea(oElement.editor, msgPublisher.limit, oConfig.maxHeight || null);
    msgPublisher.submit = (function(e, c) {
        return function() {
            try {
                if (!e.submit.lock) {
                    e.submit.className = c.disabledClass || e.submit.className;
                    e.submit.lock = true;
                    var nick = Core.String.trim(e.nick.value);
                    if (!nick || nick == $CLTMSG.CD0049) {
                        e.submit.className = c.normClass || e.submit.className;
                        e.submit.lock = false;
                        e.info.innerHTML = $SYSMSG.M01100;
                        e.info.style.display = "";
                        return
                    }
                    var content = Core.String.trim(e.editor.value);
                    if (!content) {
                        e.submit.className = c.normClass || e.submit.className;
                        e.submit.lock = false;
                        e.info.innerHTML = $SYSMSG.M07001;
                        e.info.style.display = "";
                        return
                    }
                    var oPost = {
                        content: encodeURIComponent(content),
                        name: encodeURIComponent(nick)
                    };
                    Utils.Io.Ajax.request(c.postUrl, {
                        POST: oPost,
                        onComplete: function(oResult) {
                            e.submit.className = c.normClass || e.submit.className;
                            e.submit.lock = false;
                            if (oResult.code == "A00006") {
                                if (fCallBack) {
                                    fCallBack()
                                }
                                if (bRefresh) {
                                    window.location.reload(true)
                                } else {
                                    var al = App.alert($SYSMSG.M09003, {
                                        icon: 3,
                                        hasBtn: false
                                    });
                                    setTimeout(function() {
                                        al.close()
                                    },
                                    1000)
                                }
                            } else {
                                if (oResult.code == "M00003") {
                                    App.ModLogin(function() {
                                        window.location.reload(true)
                                    })
                                } else {
                                    e.info.innerHTML = $SYSMSG[oResult.code];
                                    e.info.style.display = ""
                                }
                            }
                        },
                        onException: function() {
                            e.submit.className = c.normClass || e.submit.className;
                            e.submit.lock = false
                        },
                        returnType: "json"
                    })
                }
            } catch(error) {}
        }
    })(oElement, oConfig);
    if (oElement.editor) {
        Core.Events.addEvent(oElement.editor,
        function(event) {
            if ((event.ctrlKey == true && event.keyCode == "13") || (event.altKey == true && event.keyCode == "83")) {
                oElement.editor.blur();
                msgPublisher.submit()
            }
        },
        "keyup")
    }
    if (oElement.nick) {
        Core.Events.addEvent(oElement.nick, (function(n) {
            return function() {
                if (n.value === $CLTMSG.CD0049) {
                    n.value = ""
                }
                n.style.color = "#333333"
            }
        })(oElement.nick), "focus");
        Core.Events.addEvent(oElement.nick, (function(n) {
            return function() {
                if (Core.String.trim(n.value) == "") {
                    n.value = $CLTMSG.CD0049
                }
                n.style.color = "#999999"
            }
        })(oElement.nick), "blur");
        oElement.nick.value = oElement.nick.value || $CLTMSG.CD0049;
        oElement.nick.style.color = "#999999"
    }
    if (oElement.submit) {
        Core.Events.addEvent(oElement.submit, msgPublisher.submit, "click")
    }
    return msgPublisher
};
App.simpleAjax = function(url, success, error, fail) {
    var req, res, error;
    req = window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
    if (!req) {
        return
    }
    req.onreadystatechange = function() {
        try {
            if (req.readyState == 4) {
                res = eval("(" + req.responseText + ")");
                if (res && res.code == "A00006") {
                    success && success(res);
                    return
                }
                error && error(res)
            }
        } catch(e) {
            fail && fail(e.message);
            return false
        }
    };
    try {
        req.open("GET", url, true);
        req.send(null)
    } catch(e) {
        fail && fail(e.message);
        return false
    }
    return {
        abort: function() {
            req.abort();
            return false
        }
    }
};
var swfobject = function() {
    var D = "undefined",
    r = "object",
    S = "Shockwave Flash",
    W = "ShockwaveFlash.ShockwaveFlash",
    q = "application/x-shockwave-flash",
    R = "SWFObjectExprInst",
    x = "onreadystatechange",
    O = window,
    j = document,
    t = navigator,
    T = false,
    U = [h],
    o = [],
    N = [],
    I = [],
    l,
    Q,
    E,
    B,
    J = false,
    a = false,
    n,
    G,
    m = true,
    M = function() {
        var aa = typeof j.getElementById != D && typeof j.getElementsByTagName != D && typeof j.createElement != D,
        ah = t.userAgent.toLowerCase(),
        Y = t.platform.toLowerCase(),
        ae = Y ? /win/.test(Y) : /win/.test(ah),
        ac = Y ? /mac/.test(Y) : /mac/.test(ah),
        af = /webkit/.test(ah) ? parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false,
        X = !+"\v1",
        ag = [0, 0, 0],
        ab = null;
        if (typeof t.plugins != D && typeof t.plugins[S] == r) {
            ab = t.plugins[S].description;
            if (ab && !(typeof t.mimeTypes != D && t.mimeTypes[q] && !t.mimeTypes[q].enabledPlugin)) {
                T = true;
                X = false;
                ab = ab.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
                ag[0] = parseInt(ab.replace(/^(.*)\..*$/, "$1"), 10);
                ag[1] = parseInt(ab.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
                ag[2] = /[a-zA-Z]/.test(ab) ? parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0
            }
        } else {
            if (typeof O.ActiveXObject != D) {
                try {
                    var ad = new ActiveXObject(W);
                    if (ad) {
                        ab = ad.GetVariable("$version");
                        if (ab) {
                            X = true;
                            ab = ab.split(" ")[1].split(",");
                            ag = [parseInt(ab[0], 10), parseInt(ab[1], 10), parseInt(ab[2], 10)]
                        }
                    }
                } catch(Z) {}
            }
        }
        return {
            w3: aa,
            pv: ag,
            wk: af,
            ie: X,
            win: ae,
            mac: ac
        }
    } (),
    k = function() {
        if (!M.w3) {
            return
        }
        if ((typeof j.readyState != D && j.readyState == "complete") || (typeof j.readyState == D && (j.getElementsByTagName("body")[0] || j.body))) {
            f()
        }
        if (!J) {
            if (typeof j.addEventListener != D) {
                j.addEventListener("DOMContentLoaded", f, false)
            }
            if (M.ie && M.win) {
                j.attachEvent(x,
                function() {
                    if (j.readyState == "complete") {
                        j.detachEvent(x, arguments.callee);
                        f()
                    }
                });
                if (O == top) { (function() {
                        if (J) {
                            return
                        }
                        try {
                            j.documentElement.doScroll("left")
                        } catch(X) {
                            setTimeout(arguments.callee, 0);
                            return
                        }
                        f()
                    })()
                }
            }
            if (M.wk) { (function() {
                    if (J) {
                        return
                    }
                    if (!/loaded|complete/.test(j.readyState)) {
                        setTimeout(arguments.callee, 0);
                        return
                    }
                    f()
                })()
            }
            s(f)
        }
    } ();
    function f() {
        if (J) {
            return
        }
        try {
            var Z = j.getElementsByTagName("body")[0].appendChild(C("span"));
            Z.parentNode.removeChild(Z)
        } catch(aa) {
            return
        }
        J = true;
        var X = U.length;
        for (var Y = 0; Y < X; Y++) {
            U[Y]()
        }
    }
    function K(X) {
        if (J) {
            X()
        } else {
            U[U.length] = X
        }
    }
    function s(Y) {
        if (typeof O.addEventListener != D) {
            O.addEventListener("load", Y, false)
        } else {
            if (typeof j.addEventListener != D) {
                j.addEventListener("load", Y, false)
            } else {
                if (typeof O.attachEvent != D) {
                    i(O, "onload", Y)
                } else {
                    if (typeof O.onload == "function") {
                        var X = O.onload;
                        O.onload = function() {
                            X();
                            Y()
                        }
                    } else {
                        O.onload = Y
                    }
                }
            }
        }
    }
    function h() {
        if (T) {
            V()
        } else {
            H()
        }
    }
    function V() {
        var X = j.getElementsByTagName("body")[0];
        var aa = C(r);
        aa.setAttribute("type", q);
        var Z = X.appendChild(aa);
        if (Z) {
            var Y = 0; (function() {
                if (typeof Z.GetVariable != D) {
                    var ab = Z.GetVariable("$version");
                    if (ab) {
                        ab = ab.split(" ")[1].split(",");
                        M.pv = [parseInt(ab[0], 10), parseInt(ab[1], 10), parseInt(ab[2], 10)]
                    }
                } else {
                    if (Y < 10) {
                        Y++;
                        setTimeout(arguments.callee, 10);
                        return
                    }
                }
                X.removeChild(aa);
                Z = null;
                H()
            })()
        } else {
            H()
        }
    }
    function H() {
        var ag = o.length;
        if (ag > 0) {
            for (var af = 0; af < ag; af++) {
                var Y = o[af].id;
                var ab = o[af].callbackFn;
                var aa = {
                    success: false,
                    id: Y
                };
                if (M.pv[0] > 0) {
                    var ae = c(Y);
                    if (ae) {
                        if (F(o[af].swfVersion) && !(M.wk && M.wk < 312)) {
                            w(Y, true);
                            if (ab) {
                                aa.success = true;
                                aa.ref = z(Y);
                                ab(aa)
                            }
                        } else {
                            if (o[af].expressInstall && A()) {
                                var ai = {};
                                ai.data = o[af].expressInstall;
                                ai.width = ae.getAttribute("width") || "0";
                                ai.height = ae.getAttribute("height") || "0";
                                if (ae.getAttribute("class")) {
                                    ai.styleclass = ae.getAttribute("class")
                                }
                                if (ae.getAttribute("align")) {
                                    ai.align = ae.getAttribute("align")
                                }
                                var ah = {};
                                var X = ae.getElementsByTagName("param");
                                var ac = X.length;
                                for (var ad = 0; ad < ac; ad++) {
                                    if (X[ad].getAttribute("name").toLowerCase() != "movie") {
                                        ah[X[ad].getAttribute("name")] = X[ad].getAttribute("value")
                                    }
                                }
                                P(ai, ah, Y, ab)
                            } else {
                                p(ae);
                                if (ab) {
                                    ab(aa)
                                }
                            }
                        }
                    }
                } else {
                    w(Y, true);
                    if (ab) {
                        var Z = z(Y);
                        if (Z && typeof Z.SetVariable != D) {
                            aa.success = true;
                            aa.ref = Z
                        }
                        ab(aa)
                    }
                }
            }
        }
    }
    function z(aa) {
        var X = null;
        var Y = c(aa);
        if (Y && Y.nodeName == "OBJECT") {
            if (typeof Y.SetVariable != D) {
                X = Y
            } else {
                var Z = Y.getElementsByTagName(r)[0];
                if (Z) {
                    X = Z
                }
            }
        }
        return X
    }
    function A() {
        return ! a && F("6.0.65") && (M.win || M.mac) && !(M.wk && M.wk < 312)
    }
    function P(aa, ab, X, Z) {
        a = true;
        E = Z || null;
        B = {
            success: false,
            id: X
        };
        var ae = c(X);
        if (ae) {
            if (ae.nodeName == "OBJECT") {
                l = g(ae);
                Q = null
            } else {
                l = ae;
                Q = X
            }
            aa.id = R;
            if (typeof aa.width == D || (!/%$/.test(aa.width) && parseInt(aa.width, 10) < 310)) {
                aa.width = "310"
            }
            if (typeof aa.height == D || (!/%$/.test(aa.height) && parseInt(aa.height, 10) < 137)) {
                aa.height = "137"
            }
            j.title = j.title.slice(0, 47) + " - Flash Player Installation";
            var ad = M.ie && M.win ? "ActiveX": "PlugIn",
            ac = "MMredirectURL=" + O.location.toString().replace(/&/g, "%26") + "&MMplayerType=" + ad + "&MMdoctitle=" + j.title;
            if (typeof ab.flashvars != D) {
                ab.flashvars += "&" + ac
            } else {
                ab.flashvars = ac
            }
            if (M.ie && M.win && ae.readyState != 4) {
                var Y = C("div");
                X += "SWFObjectNew";
                Y.setAttribute("id", X);
                ae.parentNode.insertBefore(Y, ae);
                ae.style.display = "none"; (function() {
                    if (ae.readyState == 4) {
                        ae.parentNode.removeChild(ae)
                    } else {
                        setTimeout(arguments.callee, 10)
                    }
                })()
            }
            u(aa, ab, X)
        }
    }
    function p(Y) {
        if (M.ie && M.win && Y.readyState != 4) {
            var X = C("div");
            Y.parentNode.insertBefore(X, Y);
            X.parentNode.replaceChild(g(Y), X);
            Y.style.display = "none"; (function() {
                if (Y.readyState == 4) {
                    Y.parentNode.removeChild(Y)
                } else {
                    setTimeout(arguments.callee, 10)
                }
            })()
        } else {
            Y.parentNode.replaceChild(g(Y), Y)
        }
    }
    function g(ab) {
        var aa = C("div");
        if (M.win && M.ie) {
            aa.innerHTML = ab.innerHTML
        } else {
            var Y = ab.getElementsByTagName(r)[0];
            if (Y) {
                var ad = Y.childNodes;
                if (ad) {
                    var X = ad.length;
                    for (var Z = 0; Z < X; Z++) {
                        if (! (ad[Z].nodeType == 1 && ad[Z].nodeName == "PARAM") && !(ad[Z].nodeType == 8)) {
                            aa.appendChild(ad[Z].cloneNode(true))
                        }
                    }
                }
            }
        }
        return aa
    }
    function u(ai, ag, Y) {
        var X, aa = c(Y);
        if (M.wk && M.wk < 312) {
            return X
        }
        if (aa) {
            if (typeof ai.id == D) {
                ai.id = Y
            }
            if (M.ie && M.win) {
                var ah = "";
                for (var ae in ai) {
                    if (ai[ae] != Object.prototype[ae]) {
                        if (ae.toLowerCase() == "data") {
                            ag.movie = ai[ae]
                        } else {
                            if (ae.toLowerCase() == "styleclass") {
                                ah += ' class="' + ai[ae] + '"'
                            } else {
                                if (ae.toLowerCase() != "classid") {
                                    ah += " " + ae + '="' + ai[ae] + '"'
                                }
                            }
                        }
                    }
                }
                var af = "";
                for (var ad in ag) {
                    if (ag[ad] != Object.prototype[ad]) {
                        af += '<param name="' + ad + '" value="' + ag[ad] + '" />'
                    }
                }
                aa.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + ah + ">" + af + "</object>";
                N[N.length] = ai.id;
                X = c(ai.id)
            } else {
                var Z = C(r);
                Z.setAttribute("type", q);
                for (var ac in ai) {
                    if (ai[ac] != Object.prototype[ac]) {
                        if (ac.toLowerCase() == "styleclass") {
                            Z.setAttribute("class", ai[ac])
                        } else {
                            if (ac.toLowerCase() != "classid") {
                                Z.setAttribute(ac, ai[ac])
                            }
                        }
                    }
                }
                for (var ab in ag) {
                    if (ag[ab] != Object.prototype[ab] && ab.toLowerCase() != "movie") {
                        e(Z, ab, ag[ab])
                    }
                }
                aa.parentNode.replaceChild(Z, aa);
                X = Z
            }
        }
        return X
    }
    function e(Z, X, Y) {
        var aa = C("param");
        aa.setAttribute("name", X);
        aa.setAttribute("value", Y);
        Z.appendChild(aa)
    }
    function y(Y) {
        var X = c(Y);
        if (X && X.nodeName == "OBJECT") {
            if (M.ie && M.win) {
                X.style.display = "none"; (function() {
                    if (X.readyState == 4) {
                        b(Y)
                    } else {
                        setTimeout(arguments.callee, 10)
                    }
                })()
            } else {
                X.parentNode.removeChild(X)
            }
        }
    }
    function b(Z) {
        var Y = c(Z);
        if (Y) {
            for (var X in Y) {
                if (typeof Y[X] == "function") {
                    Y[X] = null
                }
            }
            Y.parentNode.removeChild(Y)
        }
    }
    function c(Z) {
        var X = null;
        try {
            X = j.getElementById(Z)
        } catch(Y) {}
        return X
    }
    function C(X) {
        return j.createElement(X)
    }
    function i(Z, X, Y) {
        Z.attachEvent(X, Y);
        I[I.length] = [Z, X, Y]
    }
    function F(Z) {
        var Y = M.pv,
        X = Z.split(".");
        X[0] = parseInt(X[0], 10);
        X[1] = parseInt(X[1], 10) || 0;
        X[2] = parseInt(X[2], 10) || 0;
        return (Y[0] > X[0] || (Y[0] == X[0] && Y[1] > X[1]) || (Y[0] == X[0] && Y[1] == X[1] && Y[2] >= X[2])) ? true: false
    }
    function v(ac, Y, ad, ab) {
        if (M.ie && M.mac) {
            return
        }
        var aa = j.getElementsByTagName("head")[0];
        if (!aa) {
            return
        }
        var X = (ad && typeof ad == "string") ? ad: "screen";
        if (ab) {
            n = null;
            G = null
        }
        if (!n || G != X) {
            var Z = C("style");
            Z.setAttribute("type", "text/css");
            Z.setAttribute("media", X);
            n = aa.appendChild(Z);
            if (M.ie && M.win && typeof j.styleSheets != D && j.styleSheets.length > 0) {
                n = j.styleSheets[j.styleSheets.length - 1]
            }
            G = X
        }
        if (M.ie && M.win) {
            if (n && typeof n.addRule == r) {
                n.addRule(ac, Y)
            }
        } else {
            if (n && typeof j.createTextNode != D) {
                n.appendChild(j.createTextNode(ac + " {" + Y + "}"))
            }
        }
    }
    function w(Z, X) {
        if (!m) {
            return
        }
        var Y = X ? "visible": "hidden";
        if (J && c(Z)) {
            c(Z).style.visibility = Y
        } else {
            v("#" + Z, "visibility:" + Y)
        }
    }
    function L(Y) {
        var Z = /[\\\"<>\.;]/;
        var X = Z.exec(Y) != null;
        return X && typeof encodeURIComponent != D ? encodeURIComponent(Y) : Y
    }
    var d = function() {
        if (M.ie && M.win) {
            window.attachEvent("onunload",
            function() {
                var ac = I.length;
                for (var ab = 0; ab < ac; ab++) {
                    I[ab][0].detachEvent(I[ab][1], I[ab][2])
                }
                var Z = N.length;
                for (var aa = 0; aa < Z; aa++) {
                    y(N[aa])
                }
                for (var Y in M) {
                    M[Y] = null
                }
                M = null;
                for (var X in swfobject) {
                    swfobject[X] = null
                }
                swfobject = null
            })
        }
    } ();
    return {
        registerObject: function(ab, X, aa, Z) {
            if (M.w3 && ab && X) {
                var Y = {};
                Y.id = ab;
                Y.swfVersion = X;
                Y.expressInstall = aa;
                Y.callbackFn = Z;
                o[o.length] = Y;
                w(ab, false)
            } else {
                if (Z) {
                    Z({
                        success: false,
                        id: ab
                    })
                }
            }
        },
        getObjectById: function(X) {
            if (M.w3) {
                return z(X)
            }
        },
        embedSWF: function(ab, ah, ae, ag, Y, aa, Z, ad, af, ac) {
            var X = {
                success: false,
                id: ah
            };
            if (M.w3 && !(M.wk && M.wk < 312) && ab && ah && ae && ag && Y) {
                w(ah, false);
                K(function() {
                    ae += "";
                    ag += "";
                    var aj = {};
                    if (af && typeof af === r) {
                        for (var al in af) {
                            aj[al] = af[al]
                        }
                    }
                    aj.data = ab;
                    aj.width = ae;
                    aj.height = ag;
                    var am = {};
                    if (ad && typeof ad === r) {
                        for (var ak in ad) {
                            am[ak] = ad[ak]
                        }
                    }
                    if (Z && typeof Z === r) {
                        for (var ai in Z) {
                            if (typeof am.flashvars != D) {
                                am.flashvars += "&" + ai + "=" + Z[ai]
                            } else {
                                am.flashvars = ai + "=" + Z[ai]
                            }
                        }
                    }
                    if (F(Y)) {
                        var an = u(aj, am, ah);
                        if (aj.id == ah) {
                            w(ah, true)
                        }
                        X.success = true;
                        X.ref = an
                    } else {
                        if (aa && A()) {
                            aj.data = aa;
                            P(aj, am, ah, ac);
                            return
                        } else {
                            w(ah, true)
                        }
                    }
                    if (ac) {
                        ac(X)
                    }
                })
            } else {
                if (ac) {
                    ac(X)
                }
            }
        },
        switchOffAutoHideShow: function() {
            m = false
        },
        ua: M,
        getFlashPlayerVersion: function() {
            return {
                major: M.pv[0],
                minor: M.pv[1],
                release: M.pv[2]
            }
        },
        hasFlashPlayerVersion: F,
        createSWF: function(Z, Y, X) {
            if (M.w3) {
                return u(Z, Y, X)
            } else {
                return undefined
            }
        },
        showExpressInstall: function(Z, aa, X, Y) {
            if (M.w3 && A()) {
                P(Z, aa, X, Y)
            }
        },
        removeSWF: function(X) {
            if (M.w3) {
                y(X)
            }
        },
        createCSS: function(aa, Z, Y, X) {
            if (M.w3) {
                v(aa, Z, Y, X)
            }
        },
        addDomLoadEvent: K,
        addLoadEvent: s,
        getQueryParamValue: function(aa) {
            var Z = j.location.search || j.location.hash;
            if (Z) {
                if (/\?/.test(Z)) {
                    Z = Z.split("?")[1]
                }
                if (aa == null) {
                    return L(Z)
                }
                var Y = Z.split("&");
                for (var X = 0; X < Y.length; X++) {
                    if (Y[X].substring(0, Y[X].indexOf("=")) == aa) {
                        return L(Y[X].substring((Y[X].indexOf("=") + 1)))
                    }
                }
            }
            return ""
        },
        expressInstallCallback: function() {
            if (a) {
                var X = c(R);
                if (X && l) {
                    X.parentNode.replaceChild(l, X);
                    if (Q) {
                        w(Q, true);
                        if (M.ie && M.win) {
                            l.style.display = "block"
                        }
                    }
                    if (E) {
                        E(B)
                    }
                }
                a = false
            }
        }
    }
} ();
App.iframeMask = function(zIndex, fResize) {
    var IM = {};
    var oParent = IM.oParent = document.getElementsByTagName("body")[0];
    var oMask = IM.oMask = oParent.appendChild($C("div"));
    var oProtective = IM.oProtective = oParent.appendChild($C("iframe"));
    oProtective.frameborder = 0;
    var oMStyle = oMask.style;
    var oPStyle = oProtective.style;
    var oPStyle = oProtective.style;
    oMStyle.top = oPStyle.top = "0px";
    oMStyle.left = oPStyle.left = "0px";
    oMStyle.overflow = oPStyle.overflow = "hidden";
    oMStyle.border = oPStyle.border = "0px";
    oMStyle.position = oPStyle.position = "absolute";
    oMStyle.display = oPStyle.display = "none";
    oMStyle.backgroundColor = oPStyle.backgroundColor = "#000000";
    oMStyle.zIndex = zIndex || 799;
    oPStyle.zIndex = (zIndex - 1) || 798;
    Core.Dom.setStyle(oMask, "opacity", "0.15");
    Core.Dom.setStyle(oProtective, "opacity", "0");
    IM.oMaskResize = (function(p) {
        return function() {
            var pageSize = Core.System.pageSize();
            p.oMask.style.width = p.oProtective.style.width = Math.max(document.body.scrollWidth, (document.documentElement) ? document.documentElement.scrollWidth: 0) + "px";
            p.oMask.style.height = p.oProtective.style.height = pageSize[1] + "px";
            if (fResize) {
                fResize(pageSize)
            }
        }
    })(IM);
    IM.hidden = (function(p) {
        return function() {
            p.oMask.style.display = p.oProtective.style.display = "none"
        }
    })(IM);
    IM.show = (function(p) {
        return function() {
            p.oMask.style.display = p.oProtective.style.display = "block"
        }
    })(IM);
    IM.oMaskResize();
    Core.Events.addEvent(window, IM.oMaskResize, "resize");
    return IM
};
App.PopUpSwfPlayer = (function() {
    var popUp, panel, view, clock, ce = Core.Events,
    add = ce.addEvent,
    unadd = ce.removeEvent;
    return function(url) {
        var id = "view_ani",
        w = window,
        d = document,
        dd = d.documentElement || {},
        b = d.body;
        if (scope.statistics) {
            scope.statistics({
                type: "ani",
                source: encodeURIComponent(url)
            })
        }
        if (!swfobject.hasFlashPlayerVersion("9.0.0")) {
            App.alert({
                code: "CD0084"
            });
            return
        }
        if (!panel) {
            document.body.appendChild(panel = $C("div"));
            panel.style.position = "absolute";
            panel.style.zIndex = "2012"
        }
        panel.style.display = "";
        if (!view) {
            panel.innerHTML = "";
            panel.appendChild(view = $C("div"));
            view.id = id;
            view.innerHTML = ['<div style="padding-left:202px;padding-top:172px;"><center><img src="', [scope.$BASECSS, "style/images/common/loading.gif"].join(""), '"/></center></div>'].join("")
        }
        var justify = function(size) {
            var top = w.pageYOffset || Math.max(dd.scrollTop, b.scrollTop);
            panel.style.left = (size[2] - 440) / 2 + "px";
            panel.style.top = ((size[3] - 360) / 2 + top) + "px"
        };
        if (!popUp) {
            popUp = App.iframeMask(2000, justify)
        } else {
            justify(Core.System.pageSize())
        }
        var flashParams = {
            id: "view_ani",
            quality: "high",
            allowScriptAccess: "never",
            wmode: "transparent",
            allowFullscreen: true,
            allownetworking: "internal"
        };
        var flashVars = {
            playMovie: "true"
        };
        var clear = function(e) {
            if (e && e.keyCode !== 27 && e.type !== "mouseup") {
                return
            }
            clearInterval(clock);
            swfobject.removeSWF(id);
            panel.style.display = "none";
            view = null;
            popUp.hidden();
            unadd(b, clear, "keyup");
            unadd(b, clear, "mouseup");
            if (!e) {
                return
            }
            Core.Events.stopEvent()
        };
        swfobject.embedSWF(url, id, "440", "360", "10.0.0", null, flashVars, flashParams);
        popUp.show();
        w.clearInterval(clock);
        clock = setInterval(function() {
            var swf = swfobject.getObjectById(id),
            snap = 0;
            if (swf && swf.PercentLoaded() == 100) {
                w.clearInterval(clock);
                clock = setInterval(function() {
                    var c = swf.CurrentFrame(),
                    t;
                    try {
                        t = swf.TotalFrames()
                    } catch(e) {
                        t = swf.TotalFrames
                    }
                    if (c < 0) {
                        return
                    }
                    if (c < t && snap <= c) {
                        snap = c
                    } else {
                        clear()
                    }
                },
                80)
            }
        },
        100);
        add(b, clear, "keyup");
        add(popUp.oMask, clear, "mouseup");
        popUp.oMask.title = $CLTMSG.CF0105
    }
})();
App.group = function(items, action, setClass) {
    var it = {},
    i = 0,
    len = items.length,
    selectedStyle, unselectedStyle, add = Core.Events.addEvent;
    it.current = -1;
    it.items = items;
    it.selected;
    selectedStyle = setClass && setClass.selected || null;
    unselectedStyle = setClass && setClass.unselected || null;
    for (i; i < len; i++) { (function(item, index) {
            add(item,
            function(e) {
                if (it.current == index && setClass) {
                    return
                }
                unselectedStyle && (it.current != -1) && (items[it.current].className = unselectedStyle);
                selectedStyle && (item.className = selectedStyle);
                it.current = index;
                action(item, index, it);
                return false
            },
            "mouseup")
        })(items[i], i)
    }
}; (function() {
    var d = document,
    api = "/face/aj_face.php",
    ce = Core.Events,
    cs = Core.String,
    st = ce.stopEvent,
    add = ce.addEvent,
    unadd = ce.removeEvent,
    fire = ce.fireEvent,
    ajax = App.simpleAjax,
    getXY = Core.Dom.getXY,
    group = App.group,
    removeAll = App.removeChildren,
    popUp = App.PopUp,
    req;
    function b2(t, b) {
        return App.builder3(t, b, {
            dd: "id",
            mm: "action"
        })
    }
    function encodeTitle(value) {
        return value.replace(/[^\w\u4e00-\u9fa5\uff10-\uff19\uff21-\uff3a\uff41-\uff5a\u2014\uff3f]/g, "")
    }
    App.showFaces = (function() {
        var cache = {},
        dom, panel, inited = false,
        hotinited = false,
        insertFunc, setCss = {
            selected: "cur",
            unselected: " "
        };

        return function(target, editor, offsetX, offsetY, width, flush, fInsertFunc) {
            if (target.tagName == "A") {
                target.href = "####"
            }
            insertFunc = fInsertFunc ||
            function() {
                return false
            };
            if (!inited) {
                panel = popUp().zIndex(1500).content(panelHTML);
                var dom = panel.dom,
                close = dom.close,
                hot = dom.hot,
                hotPanel = dom.hotPanel,
                magicNotes = dom.magicNotes,
                norm = dom.norm,
                normPanel = dom.normPanel,
                pageing = dom.pageing,
                prevBtn = dom.prevBtn,
                nextBtn = dom.nextBtn,
                tab = dom.tab;
                face = dom.face,
                ani = dom.ani,
                cType = 1,
                tabIndex = 0;
                function insertIcon(data, parent) {
                    removeAll(parent);
                    var i = 0,
                    len = data.length,
                    iconList = [],
                    c,
                    acts,
                    icons,
                    plays,
                    className = "",
                    viewButton = "",
                    nv;
                    for (i; i < len; i++) {
                        c = data[i];
                        nv = encodeTitle(c.title);
                        cType == 1 && (className = 'class="face_box"');
                        cType == 1 && (viewButton = ('<a action="play" title="' + $CLTMSG.CL0912 + '" class="play_btn" href="#" onclick="return false;"></a><span class="face_box_tex">' + (cs.byteLength(nv) > 8 ? cs.leftB(nv, 6) + "...": nv) + "</span>"));
                        iconList.push(['<li action="icon" title="', nv, '"><a href="#" onclick="return false;" ', className, ">", '<img src="', c.icon, '"/>', "</a>", viewButton, "</li>"].join(""))
                    }
                    acts = b2(iconList.join(""), parent)["actList"];
                    icons = acts.icon;
                    plays = acts.play;
                    if (plays) {
                        group(plays,
                        function(item, index, c) {
                            item.onclick = function() {
                                return false
                            };
                            st();
                            App.PopUpSwfPlayer(data[index].src);
                            return false
                        })
                    }
                    group(icons,
                    function(item, index, c) {
                        item.onclick = function() {
                            return false
                        };
                        setTimeout(function() {
                            tArea.focus()
                        },
                        0);
                        setTimeout(function() {
                            var range = tArea.getAttribute("range");
                            var value = data[index].value + " ";
                            if (insertFunc(value)) {} else {
                                if (document.selection) {
                                    var sel = document.selection.createRange();
                                    document.selection.empty();
                                    sel.text = value
                                } else {
                                    if (tArea.setSelectionRange) {
                                        var start = tArea.selectionStart;
                                        var end = tArea.selectionEnd;
                                        var str1 = tArea.value.substring(0, start);
                                        var str2 = tArea.value.substring(end);
                                        var v = str1 + value,
                                        len = v.length;
                                        tArea.value = v + str2;
                                        tArea.setSelectionRange(len, len)
                                    } else {
                                        tArea.value += value
                                    }
                                }
                            }
                            if (reflush) {
                                reflush()
                            }
                            panel.visible(false)
                        },
                        200);
                        return false
                    })
                }
                function initPage(data) {
                    removeAll(pageing);
                    var i = 0,
                    len = data.length,
                    pageList = [],
                    pages;
                    if (!len) {
                        return
                    }
                    for (i; i < len; i++) {
                        pageList.push('<a action="pageBtn" href="#" onclick="return false;">' + (i + 1) + "</a>")
                    }
                    pages = b2(pageList.join(""), pageing)["actList"]["pageBtn"];
                    group(pages,
                    function(item, index) {
                        item.onclick = function() {
                            return false
                        };
                        hotPanel.style.display = (!cType && !tabIndex && !index) ? "": "none";
                        setTimeout(function() {
                            insertIcon(data[index], norm)
                        },
                        50);
                        item.blur()
                    },
                    setCss);
                    pageing.style.display = pages.length < 2 ? "none": "";
                    fire(pages[0], "mouseup")
                }
                function initTab(json) {
                    removeAll(tab);
                    var data = [{
                        type: $CLTMSG.CL0914,
                        icon: json.data.norm
                    }].concat(json.data.more);
                    var i = 0,
                    len = data.length,
                    current, tabList = [],
                    tabs;
                    for (i; i < len; i++) {
                        current = data[i];
                        if (!current || !current.type) {
                            continue
                        }
                        tabList.push('<li style="visibility:hidden"><a action="tabs" onclick="return false;" href="#">' + current.type + "</a></li>")
                    }
                    if (!tabList.length) {
                        return
                    }
                    tabs = b2(tabList.join(splitHTML), tab)["actList"]["tabs"];
                    group(tabs,
                    function(item, index) {
                        item.onclick = function() {
                            return false
                        };
                        tabIndex = index;
                        initPage(data[index].icon);
                        item.blur()
                    },
                    {
                        selected: "magicTcur",
                        unselected: " "
                    });
                    fire(tabs[0], "mouseup");
                    var pi = 1,
                    mi = 0,
                    lil = tab.getElementsByTagName("li"),
                    ml = lil.length,
                    pageList = [],
                    step = 0,
                    cacheList = [],
                    pl;
                    setTimeout(function() {
                        for (mi; mi < ml; mi++) {
                            lil[mi].style.visibility = "visible";
                            lil[mi].style.display = "";
                            var width = lil[mi].innerHTML == "|" ? 8 : lil[mi].offsetWidth;
                            if (step + width > 400) {
                                step = 0;
                                pageList.push(cacheList);
                                cacheList = []
                            }
                            lil[mi].style.display = "none";
                            cacheList.push(lil[mi]);
                            step += width
                        }
                        cacheList.length && pageList.push(cacheList);
                        pl = pageList.length - 1;
                        function setPN() {
                            prevBtn.className = pi == 0 ? "magicbtnL01": "magicbtnL02";
                            nextBtn.className = pi == pl ? "magicbtnR01": "magicbtnR02"
                        }
                        function toggle(list, b) {
                            var i = 0;
                            len = list.length,
                            end = Math.max(len - 1, 0);
                            for (i; i < len; i++) {
                                list[i].style.visibility = b ? "visible": "hidden";
                                list[i].style.display = !b ? "none": ((i == 0 || i == end) && list[i].innerHTML == "|") ? "none": ""
                            }
                        }
                        function dep(key, n) {
                            var snap = Math[key](pi + n, n > 0 ? pl: 0);
                            if (pi == snap) {
                                setPN();
                                return
                            }
                            pageList[pi] && toggle(pageList[pi], false);
                            pageList[snap] && toggle(pageList[snap], true);
                            pi = snap;
                            setPN()
                        }
                        prevBtn.onclick = function() {
                            dep("max", -1);
                            prevBtn.blur();
                            return false
                        };
                        nextBtn.onclick = function() {
                            dep("min", 1);
                            nextBtn.blur();
                            return false
                        };
                        dep("max", -1)
                    },
                    100)
                }
                function onTabChange(item, index, data) {
                    st();
                    item.onclick = function() {
                        return false
                    };
                    removeAll(norm);
                    removeAll(tab);
                    removeAll(pageing);
                    face.className = index ? "": "cur";
                    ani.className = index ? "magic cur": "magic";
                    normPanel.className = index ? "magic_list": "faceItemPicbg";
                    hotPanel.style.display = index ? "none": "";
                    magicNotes.style.display = index ? "": "none";
                    pageing.style.display = "none";
                    prevBtn.className = "magicbtnL01";
                    nextBtn.className = "magicbtnR01";
                    prevBtn.onclick = function() {
                        return false
                    };
                    nextBtn.onclick = function() {
                        return false
                    };
                    cType = index;
                    req && req.abort();
                    if (cache[index]) {
                        initTab(cache[index]);
                        return false
                    }
                    norm.innerHTML = '<center><img style="margin-top:10px;margin-bottom:10px" src="' + scope.$BASEIMG + 'style/images/common/loading.gif"/></center>';
                    req = ajax([api, "?type=", index ? "ani": "face"].join(""),
                    function(json) {
                        var data;
                        if (json.code == "A00006" && (data = json.data)) {
                            initTab(json);
                            if (!hotinited && data.hot) {
                                hotinited = true;
                                insertIcon(data.hot, hot)
                            }
                            cache[index] = json
                        }
                    });
                    item.blur();
                    return false
                }
                group([face, ani], onTabChange);
                inited = true;
                add(close,
                function() {
                    close.onclick = function() {
                        return false
                    };
                    panel.visible(false);
                    st()
                },
                "mouseup");
                add(panel.wrap,
                function() {
                    st()
                },
                "mouseup");
                add(d.body,
                function() {
                    panel.visible(false)
                },
                "mouseup");
                var s = Core.System.winSize();
                add(window,
                function(event) {
                    var s1 = Core.System.winSize();
                    if (s.width != s1.width || s.height != s1.height) {
                        panel.visible(false);
                        s = s1
                    }
                },
                "resize")
            }
            tArea = editor;
            reflush = flush;
            var point = getXY(target);
            panel.position(point[0] + 19 + (offsetX || 0), point[1] + target.offsetHeight + (offsetY || 5));
            fire(face, "mouseup");
            setTimeout(function() {
                panel.visible(true)
            },
            0);
            return false
        }
    })()
})(); (function(proxy) {
    $C = function(tagName) {
        return document.createElement(tagName)
    };
    var adEvent = Core.Events.addEvent;
    var spEvent = Core.Events.stopEvent;
    var rmEvent = Core.Events.removeEvent;
    var position = Core.Dom.getXY;
    var makeItem = function(spec) {
        if (spec === undefined) {
            throw "the dropDown item need parameters"
        }
        spec.text = spec.text || spec.value;
        spec.ele = spec.ele || $C("LI");
        spec.focus = spec.focus ||
        function() {};
        spec.blur = spec.blur ||
        function() {};
        spec.ok = spec.ok ||
        function() {};
        spec.tnode = document.createTextNode("");
        spec.ele.appendChild(spec.tnode);
        spec.ele.setAttribute("unselectable", "on");
        if (spec.itemStyle) {
            spec.ele.style.cssText = spec.itemStyle
        }
        adEvent(spec.ele,
        function() {
            spec.focus(that)
        },
        "mouseover");
        adEvent(spec.ele,
        function() {
            spec.blur(that)
        },
        "mouseout");
        adEvent(spec.ele,
        function() {
            spEvent();
            spec.ok(that)
        },
        "click");
        adEvent(spec.ele, spEvent, "mousedown");
        var that = {};
        that.set = function(key, value) {
            if ((key == "focus" || key == "ok") && typeof value != "function") {
                throw "dropDown item need function as parameters"
            }
            spec[key] = value;
            if (key == "text") {
                spec.ele.innerHTML = value
            }
            if (key == "HTML") {
                spec.ele.innerHTML = value
            }
            return that
        };
        that.get = function(key) {
            return spec[key]
        };
        return that
    };
    var dropDown = function(spec) {
        var that = {};
        if (spec === undefined) {
            spec = {}
        }
        spec.items = [];
        spec.count = 0;
        spec.current = -1;
        spec.key = {
            ENTER: 13,
            ESC: 27,
            UP: 38,
            DOWN: 40,
            LEFT: 37,
            RIGHT: 39,
            BACK: 8,
            TABLE: 9
        };
        spec.box = $C("DIV");
        spec.shell = $C("UL");
        spec.showing = false;
        spec.box.appendChild(spec.shell);
        document.body.appendChild(spec.box);
        var light = function(item) {
            item = item || spec.items[spec.current];
            spec.light(item.get("ele"))
        };
        var dark = function(item) {
            item = item || spec.items[spec.current];
            if (item) {
                spec.dark(item.get("ele"))
            }
        };
        spec.newItem = function() {
            var item = makeItem({
                ok: spec.select,
                focus: function(item) {
                    if (spec.items[spec.current]) {
                        dark()
                    }
                    spec.current = item.index;
                    light()
                },
                itemStyle: spec.itemStyle
            });
            spec.shell.appendChild(item.get("ele"));
            return item
        };
        spec.getItem = function(k) {
            if (!spec.items[k]) {
                spec.items[k] = spec.newItem();
                spec.items[k].index = k
            }
            return spec.items[k]
        };
        spec.up = function() {
            if (spec.current >= spec.count || spec.current <= 0) {
                dark(spec.items[0]);
                spec.current = spec.count - 1
            } else {
                dark();
                spec.current -= 1
            }
            light()
        };
        spec.down = function() {
            if (spec.current >= spec.count - 1 || spec.current < 0) {
                dark(spec.items[spec.count - 1]);
                spec.current = 0
            } else {
                dark();
                spec.current += 1
            }
            light()
        };
        spec.open = function() {
            spec.box.style.display = "";
            adEvent(document.documentElement, spec.hotKey, "keydown");
            spec.showing = true
        };
        spec.close = function() {
            spec.box.style.display = "none";
            if ($E("_iframe4select_")) {
                $E("_iframe4select_").style.display = "none"
            }
            rmEvent(document.documentElement, spec.hotKey, "keydown");
            spec.showing = false
        };
        spec.hotKey = function(e) {
            var ev = window.event || e;
            var code = ev.keyCode;
            if (code == spec.key.UP) {
                spec.up();
                spEvent();
                return false
            } else {
                if (code == spec.key.DOWN) {
                    spec.down();
                    spEvent();
                    return false
                } else {
                    if (code == spec.key.ESC) {
                        spec.close();
                        spEvent();
                        return false
                    }
                }
            }
        };
        that.show = function(el) {
            spec.open();
            return that
        };
        that.hidd = function(el) {
            spec.close();
            if (spec.current !== -1) {
                dark()
            }
            spec.current = -1;
            return that
        };
        that.light = function(index) {
            light(spec.items[index]);
            return that
        };
        that.dark = function(index) {
            dark(spec.items[index]);
            return that
        };
        that.data = function(param) {
            for (var i = 0,
            len = param.length; i < len; i += 1) {
                spec.getItem(i).set("text", param[i]["text"]).set("value", param[i]["value"]).get("ele").style.display = ""
            }
            for (var i = param.length,
            len = spec.items.length; i < len; i += 1) {
                spec.getItem(i).get("ele").style.display = "none"
            }
            spec.count = param.length;
            dark();
            spec.current = -1;
            return that
        };
        that.pushData = function(param) {
            for (var i = 0,
            len = param.length; i < len; i += 1) {
                spec.getItem(spec.count + i).set("text", param[i]["text"]).set("value", param[i]["value"])
            }
            spec.count += param.length;
            return that
        };
        that.set = function(key, value) {
            if (key === "position") {
                spec.box.style.left = value[0] + "px";
                spec.box.style.top = value[1] + "px"
            }
            return that
        };
        that.get = function(key) {
            if (key === "current") {
                return spec.items[spec.current]
            }
            if (key === "index") {
                return spec.current
            }
            return spec[key]
        };
        return that
    };
    var infoTips = function(spec) {
        var that = {};
        spec.box = document.createElement("DIV");
        spec.box.innerHTML = spec.info;
        if (spec.style) {
            spec.box.style.cssText = spec.style
        }
        if (spec.className) {
            spec.box.className = spec.className
        }
        spec.box.style.position = "absolute";
        spec.box.style.display = "none";
        document.body.appendChild(spec.box);
        that.show = function() {
            spec.box.style.display = ""
        };
        that.hidd = function() {
            spec.box.style.display = "none"
        };
        that.set = function(key, value) {
            if (key === "position") {
                spec.box.style.left = value[0] + "px";
                spec.box.style.top = value[1] + "px"
            }
            return that
        };
        that.get = function(key) {
            return spec[key]
        };
        return that
    };
    var searchInfo = function(spec) {
        var that = {};
        var defaultSearch = function(key, cb) {
            if (spec.data.length === 0 || !key) {
                setTimeout(function() {
                    cb([])
                },
                0)
            } else {
                var res = [];
                for (var i = 0,
                len = spec.data.length; i < len; i += 1) {
                    if (spec.data[i].value.indexOf(key) != -1) {
                        res[res.length] = spec.data[i]
                    }
                }
                setTimeout(function() {
                    cb(res)
                },
                0)
            }
        };
        ajax = function(key, cb) {
            Utils.Io.Ajax.request(spec.data, {
                GET: {
                    key: key
                },
                onComplete: function(json) {
                    if (json.code === "A00006") {
                        if (typeof spec.search === "function") {
                            json.data = spec.search(json.data)
                        }
                        cb(json.data)
                    }
                },
                returnType: "json"
            })
        };
        jsonp = function() {};
        if (spec.type === "ajax") {
            defaultSearch = ajax
        } else {
            if (spec.type === "jsonp") {
                defaultSearch = jsonp
            } else {
                if (typeof spec.search === "function") {
                    defaultSearch = spec.search
                }
            }
        }
        that.result = function(key, cb) {
            defaultSearch(key, cb)
        };
        that.set = function(key, value) {
            spec[key] = value;
            return that
        };
        return that
    };
    proxy.autoComplate = function(spec) {
        if (!spec.input) {
            throw "the autoComplate need an input as an parameter"
        }
        var timeHandle = null;
        var search = searchInfo({
            type: spec.type,
            data: spec.data,
            search: spec.search
        });
        var dropper = dropDown({
            select: function(item) {
                spec.ok(item.get("value"), item.get("text"));
                spec.input.blur()
            },
            itemStyle: spec.itemStyle,
            light: spec.light,
            dark: spec.dark
        });
        if (spec.emptyInfo) {
            var infobox = infoTips({
                info: spec.emptyInfo,
                style: spec.emptyStyle,
                className: spec.emptyClass
            })
        }
        dropper.get("box").className = spec["class"];
        dropper.get("box").style.cssText = spec.style;
        dropper.hidd();
        if ("v" == "\v") {
            var frame = $C("IFRAME");
            frame.id = "_iframe4select_";
            frame.style.zIndex = 50;
            frame.style.display = "none";
            frame.style.position = "absolute";
            document.body.appendChild(frame)
        }
        var cache = {};
        spec.formatKey = spec.formatKey ||
        function(v) {
            return v
        };
        var getData = function(key, cb) {
            key = spec.formatKey(key);
            if (!cache[key]) {
                search.result(key,
                function(data) {
                    if (data.length === 0) {
                        if (key.indexOf(spec.emptkey) !== -1) {
                            spec.emptykey = key
                        }
                    }
                    cb(data);
                    cache[key] = data
                })
            } else {
                setTimeout(function() {
                    cb(cache[key])
                },
                0)
            }
        };
        adEvent(spec.input,
        function(e) {
            var ev = window.event || e;
            if (ev.keyCode === 13) {
                if (dropper.get("current")) {
                    spec.ok(dropper.get("current").get("value"), dropper.get("current").get("text"));
                    spEvent(ev)
                }
                if (!spec.noBlur) {
                    spec.input.blur()
                }
            }
        },
        "keypress");
        var start = function() {
            timeHandle = setInterval(loop, 100 * spec.timer);
            spec.searching = "";
            spec.emptykey = "";
            var dis = position(spec.input);
            dis[1] += spec.input.offsetHeight;
            if (infobox) {
                infobox.set("position", dis).show()
            }
        };
        var end = function() {
            clearInterval(timeHandle);
            dropper.hidd();
            spec.searching = "";
            spec.emptykey = "";
            if ("v" == "\v") {
                frame.style.display = "none"
            }
            if (infobox) {
                infobox.hidd()
            }
        };
        var callback = function(data) {
            dropper.data(data);
            if (data.length) {
                if (!dropper.get("showing")) {
                    dropper.show()
                }
                if ("v" == "\v") {
                    frame.style.width = dropper.get("box").offsetWidth + "px";
                    frame.style.height = dropper.get("box").offsetHeight + "px";
                    var dis = position(dropper.get("box"));
                    frame.style.top = dis[1] + "px";
                    frame.style.left = dis[0] + "px";
                    frame.style.display = ""
                }
            } else {
                dropper.hidd();
                if ("v" == "\v") {
                    frame.style.display = "none"
                }
            }
        };
        var loop = function() {
            if (spec.input.value === spec.searching) {
                return false
            }
            if (spec.input.value.indexOf(spec.emptykey) !== -1 && spec.emptykey !== "") {
                return false
            }
            spec.searching = spec.input.value;
            var dis = position(spec.input);
            dis[1] += spec.input.offsetHeight;
            dropper.set("position", dis);
            if (spec.input.value === "") {
                setTimeout(function() {
                    callback([])
                },
                0);
                if (infobox) {
                    infobox.set("position", dis).show()
                }
            } else {
                getData(spec.input.value, callback);
                if (infobox) {
                    infobox.hidd()
                }
            }
        };
        adEvent(spec.input, start, "focus");
        adEvent(spec.input, end, "blur");
        spec.searching = "";
        spec.emptykey = "";
        var that = {};
        that.get = function(key) {
            if (key === "index") {
                return dropper.get("index")
            }
            return spec[key]
        };
        that.set = function(key, value) {
            if (key === "data") {
                search.set("data", value);
                cache = {}
            }
        };
        that.end = function() {
            end();
            return that
        };
        return that
    }
})(App);
App.fansfind = function(spec) {
    spec.ok = function(value, text) {
        text = text.replace(/\(.*\)/g, "");
        if (spec.input.value && /,|;|\uFF0C|\uFF1B|\u3001|\s/.test(spec.input.value)) {
            var arr = spec.input.value.split(/,|;|\uFF0C|\uFF1B|\u3001|\s/);
            var v = spec.input.value.substring(0, spec.input.value.length - arr[arr.length - 1].length);
            spec.input.value = v + text + " "
        } else {
            spec.input.value = text
        }
        if (spec.select && typeof spec.select == "function") {
            spec.select(value, text)
        }
    };
    spec.timer = spec.timer || 5;
    spec.style = spec.style || "width:" + spec.input.clientWidth + "px;position:absolute;z-Index:1200;";
    spec.light = spec.light ||
    function(el) {
        el.className = "cur"
    };
    spec.dark = spec.dark ||
    function(el) {
        el.className = ""
    };
    spec["class"] = spec["class"] || "layerMedia_menu";
    spec.type = spec.type || "ajax";
    spec.data = spec.data || "/attention/aj_chooser.php?key=" + spec.input.value + "&type=" + spec.searchtype;
    spec.itemStyle = "overflow:hidden;height:20px";
    return App.autoComplate(spec)
};
App.msgDialog = function(nick, bRefresh) {
    var getTarget = function() {
        var oEvent = Core.Events.getEvent();
        var oTarget = oEvent.srcElement || oEvent.target;
        while (oTarget.nodeType != 1) {
            oTarget = oTarget.parentNode
        }
        return oTarget
    };
    var oFormElement = getTarget();
    var html = '<table class="noteTab2"><tbody>	<tr>	<th>' + $CLTMSG.CD0050 + '&nbsp;</th><td><input  id="popUpNick" type="text"  class="PY_input" value="' + (nick || "") + '"/>&nbsp;&nbsp;</td></tr>	<tr class="tPadding" ><th>' + $CLTMSG.CD0051 + '&nbsp;</th><td><textarea id="popUpEditor" class="PY_input"></textarea></td>	</tr>	 <tr class="tPadding1"><th></th><td><a class="faceicon1" id="insert_face_icon" href="javascript:void(0);" title="表情"></a></td></tr>	<tr><th/><td><a id="popUpSubmit" href="javascript:void(0);" class="btn_normal" ><em>' + $CLTMSG.CD0052 + '</em></a>	<span id="popUpError" style="display:none" class="errorTs2 error_color">' + $SYSMSG.M01112 + '</span></td></tr>	<tr><td></td><td><p class="inviteLayer_tip gray9">' + $CLTMSG.CD0053 + "</p></td></tr> 	</tbody></table>";
    var c = {
        width: 430,
        zIndex: 1000,
        hidden: true
    };
    var oDialog = new App.Dialog.BasicDialog($CLTMSG.CD0054, html, c);
    Core.Events.addEvent($E("insert_face_icon"),
    function(e) {
        var target = e.srcElement || e.target;
        App.showFaces(target, $E("popUpEditor"), -30, 0, "360px")
    },
    "click");
    App.fansfind({
        input: $E("popUpNick"),
        searchtype: 1
    });
    if (oFormElement) {
        App.doFlyOut(oFormElement, oDialog._node, {
            resFun: function() {
                try {
                    oDialog.show()
                } catch(e) {}
            },
            style: "border:#000 2px solid;background:#bad;opacity:0.2;filter:alpha(opacity=20);zoom:1",
            time: 0.75
        })
    } else {
        oDialog.show()
    }
    var oElement = {
        submit: $E("popUpSubmit"),
        editor: $E("popUpEditor"),
        info: $E("popUpError"),
        nick: $E("popUpNick")
    };
    App.msgPublisher(oElement, null, bRefresh,
    function() {
        oDialog.close()
    });
    return oDialog
};
$registJob("login",
function() {
    var submit = $E("login_submit_btn");
    var loginname = $E("loginname");
    var password = $E("password");
    var remusrname = $E("remusrname");
    var login_form = $E("login_form");
    if (!remusrname) {
        remusrname = {
            checked: true
        }
    }
    App.initLoginInput(loginname);
    var options = {
        zIndex: 1010,
        ref: loginname,
        offsetY: 1,
        offsetX: 1
    };
    function checkForm(el, errStr) {
        if (!Core.String.trim(el.value) || (el.value == el.title && el.title)) {
            el.focus();
            App.fixElement.setHTML(errStr, "", options);
            return false
        } else {
            App.fixElement.hidden()
        }
        return true
    }
    Core.Events.addEvent(submit,
    function(event) {
        if (!checkForm(loginname, App.getMsg({
            code: "M00901"
        }))) {
            return false
        }
        if (!checkForm(password, App.getMsg({
            code: "M00902"
        }))) {
            return false
        } else {
            App.LoginAction({
                name: loginname.value,
                pwd: password.value,
                remb: remusrname.checked,
                error: function(reason, errno) {
                    var msg = "";
                    if (errno == "4010") {
                        reason = App.getMsg({
                            code: "R01011"
                        });
                        msg = App.getMsg("R01010", {
                            mail: loginname.value
                        })
                    } else {
                        if (errno == "101" || errno == "5") {
                            msg = App.getMsg({
                                code: "R11111"
                            })
                        }
                    }
                    App.fixElement.setHTML(reason, msg, options)
                },
                succ: function() {
                    var redirect = scope.redirect ? Core.String.trim(scope.redirect) : "http://t.sina.com.cn/";
                    location.replace(redirect)
                }
            })
        }
        Core.Events.stopEvent(event)
    },
    "click");
    if (login_form) {
        App.enterSubmit({
            parent: $E("password").parentNode,
            action: function() {
                Core.Events.fireEvent("login_submit_btn", "click")
            }
        })
    }
    passcardOBJ.init(loginname, {
        overfcolor: "#999",
        overbgcolor: "#e8f4fc",
        outfcolor: "#000000",
        outbgcolor: ""
    },
    password, parent);
    if (Core.String.trim(loginname.value) != "" && Core.String.trim(password.value) != "") {
        setTimeout(function() {
            Core.Events.fireEvent(submit, "click")
        },
        100)
    }
    if (scope.isActiveBack === true) {
        App.fixElement.setHTML($CLTMSG.CY0115, "", options);
        $E("mod_login_title").className = "";
        $E("mod_login_title").style.color = "#f00";
        $E("mod_login_title").style.fontWeight = "bold"
    }
});
$registJob("login1",
function() {
    var submit = $E("login_submit_btn1");
    var loginname = $E("loginname1");
    var password = $E("password1");
    var remusrname = $E("remusrname1");
    var login_form = $E("login_form1");
    if (!remusrname) {
        remusrname = {
            checked: true
        }
    }
    App.initLoginInput(loginname, "CR0001");
    var options = {
        zIndex: 1010,
        ref: loginname,
        offsetY: 1,
        offsetX: 1
    };
    function checkForm(el, errStr) {
        if (!Core.String.trim(el.value) || (el.value == el.title && el.title)) {
            el.focus();
            App.fixElement.setHTML(errStr, "", options);
            return false
        } else {
            App.fixElement.hidden()
        }
        return true
    }
    Core.Events.addEvent(submit,
    function(event) {
        if (!checkForm(loginname, App.getMsg({
            code: "M00901"
        }))) {
            return false
        }
        if (!checkForm(password, App.getMsg({
            code: "M00902"
        }))) {
            return false
        } else {
            App.LoginAction({
                name: loginname.value,
                pwd: password.value,
                remb: remusrname.checked,
                error: function(reason, errno) {
                    var msg = "";
                    if (errno == "4010") {
                        reason = App.getMsg({
                            code: "R01011"
                        });
                        msg = App.getMsg("R01010", {
                            mail: loginname.value
                        })
                    } else {
                        if (errno == "101" || errno == "5") {
                            msg = App.getMsg({
                                code: "R11111"
                            })
                        }
                    }
                    App.fixElement.setHTML(reason, msg, options)
                },
                succ: function() {
                    var redirect = scope.redirect ? Core.String.trim(scope.redirect) : "http://t.sina.com.cn/";
                    location.replace(redirect)
                }
            })
        }
        Core.Events.stopEvent(event)
    },
    "click");
    if (login_form) {
        App.enterSubmit({
            parent: password.parentNode,
            action: function() {
                Core.Events.fireEvent("login_submit_btn1", "click")
            }
        })
    }
    passcardOBJ.init(loginname, {
        overfcolor: "#999",
        overbgcolor: "#e8f4fc",
        outfcolor: "#000000",
        outbgcolor: ""
    },
    password, parent)
});
$registJob("init_input",
function() {
    App.Dom.getBy(function(el) {
        if (el.getAttribute("dycolor") || el.getAttribute("dycolor") == false) {
            return
        }
        var sType = el.getAttribute("type");
        var name = el.getAttribute("name");
        if (/text|password/.test(sType) && name != "nickname") {
            var _clew = el.getAttribute("clew");
            el.style.color = "#999";
            Core.Events.addEvent(el,
            function() {
                if (_clew) {
                    if (_clew === el.value) {
                        el.value = ""
                    }
                }
                el.style.color = "#333"
            },
            "focus");
            Core.Events.addEvent(el,
            function() {
                if (_clew) {
                    if (el.value === "") {
                        el.value = _clew
                    }
                }
                el.style.color = "#999"
            },
            "blur")
        }
    },
    "input", document)
});
Core.Dom.domInsert = function(pnode, param, pos, callback) {
    pos = /^(afterBegin|afterEnd|beforeBegin|beforeEnd)$/.test(pos) ? pos: "beforeEnd";
    callback = (typeof callback == "function" ? callback: function() {});
    var args = arguments;
    if ($IE) {
        var ctype = "HTML";
        if (typeof param == "object") {
            if (param.nodeType == 1) {
                ctype = "Element"
            } else {
                if (param.nodeType == 3) {
                    ctype = "Text";
                    param = param.data
                } else {
                    ctype = "HTML"
                }
            }
        } (function() {
            try {
                pnode.doScroll("left");
                pnode["insertAdjacent" + ctype](pos, param);
                callback.call(args.caller);
                callback = param = null
            } catch(e) {
                window.setTimeout(arguments.callee, 0)
            }
        })()
    } else {
        if (typeof param == "object" && /^(1|3)$/.test(param.nodeType)) {
            switch (pos) {
            case "afterBegin":
                pnode.insertBefore(param, pnode.firstChild);
                break;
            case "afterEnd":
                if (pnode.parentNode.nodeType == 1) {
                    pnode.parentNode.insertBefore(param, pnode.nextSibling)
                }
                break;
            case "beforeBegin":
                if (pnode.parentNode.nodeType == 1) {
                    pnode.parentNode.insertBefore(param, pnode)
                }
                break;
            case "beforeEnd":
                pnode.appendChild(param);
                break
            }
        } else {
            var tmp = document.createElement("div");
            tmp.innerHTML = param;
            switch (pos) {
            case "afterBegin":
                while (tmp.lastChild) {
                    pnode.insertBefore(tmp.lastChild, pnode.firstChild)
                }
                break;
            case "afterEnd":
                if (pnode.parentNode.nodeType == 1) {
                    while (tmp.lastChild) {
                        pnode.parentNode.insertBefore(tmp.lastChild, pnode.nextSibling)
                    }
                }
                break;
            case "beforeBegin":
                if (pnode.parentNode.nodeType == 1) {
                    while (tmp.firstChild) {
                        pnode.parentNode.insertBefore(tmp.firstChild, pnode)
                    }
                }
                break;
            case "beforeEnd":
                while (tmp.firstChild) {
                    pnode.appendChild(tmp.firstChild)
                }
                break
            }
            tmp = null
        }
        callback.call(args.caller)
    }
};
Core.Dom.previous = function(elm, _className) {
    var o = $E(elm);
    if (o == o.parentNode.firstChild) {
        return null
    }
    var prev = o.previousSibling;
    if (prev.nodeType != 1) {
        return Core.Dom.previous(prev, _className)
    }
    if (prev.className.indexOf(_className) != -1) {
        return prev
    } else {
        return Core.Dom.previous(prev, _className)
    }
}; (function() {
    var toStyleAttribute = function(styleName) {
        var arr = styleName.split("-");
        var cc = arr[0];
        for (var i = 1; i < arr.length; i++) {
            cc += arr[i].charAt(0).toUpperCase() + arr[i].substring(1)
        }
        return cc
    };
    Core.Dom.setStyle2 = function(elem, style) {
        if (typeof elem == "string") {
            elem = $E(elem)
        }
        for (var name in style) {
            styleAttr = toStyleAttribute(name);
            Core.Dom.setStyle(elem, styleAttr, style[name])
        }
    }
})(); (function(proxy) {
    proxy.insmarquee = function(pulley, list, cfg) {
        var that = {
            hooker: null,
            list: list,
            sttimeout: cfg.sttimeout
        };
        var insorbit = [];
        var hooker = null;
        var current = 0;
        var showing = 0;
        var scroll = 0;
        var parent = that.list[0].parentNode;
        var st;
        var ele;
        if (cfg === undefined) {
            cfg = {}
        }
        var speed = cfg.speed || 5;
        var forward = cfg.forward || "left";
        var orbitk = 2;
        var getinsOrbit = function(distance) {
            return proxy.animation.speed(proxy.timer.delay * orbitk, distance, speed)
        };
        var finishOne = function() {};
        var moveOne = function() {};
        var looping = function() {};
        pulley.style.overflow = "hidden";
        var isIns = false;
        if (forward === "up") {
            scroll = pulley.scrollTop;
            insorbit = getinsOrbit(that.list[0].offsetHeight);
            finishOne = function(itemNum) {
                parent.removeChild(that.list[itemNum]);
                parent.appendChild(that.list[itemNum])
            };
            moveOne = function(itemNum) {
                insorbit = getinsOrbit(that.list[itemNum].offsetHeight)
            };
            looping = function(step) {
                pulley.scrollTop = scroll + insorbit[step]
            }
        } else {
            if (forward === "down") {
                scroll = pulley.scrollTop;
                insorbit = getinsOrbit(that.list[that.list.length - 1].offsetHeight);
                finishOne = function(itemNum) {
                    that.pause("opacity");
                    isIns = false;
                    that.list[that.list.length - 1 - itemNum].style.backgroundColor = "";
                    proxy.opacity(that.list[that.list.length - 1 - itemNum], {
                        first: 0,
                        last: 100,
                        time: Math.ceil(that.list[that.list.length - 1 - itemNum].offsetHeight / speed / 4)
                    },
                    function() {
                        clearTimeout(st);
                        st = setTimeout(function() {
                            if (!that.hooker || that.hooker == "parse") {
                                return false
                            }
                            that.restart()
                        },
                        that.sttimeout || 3000)
                    })
                };
                moveOne = function(itemNum) {
                    insorbit = getinsOrbit(that.list[that.list.length - 1 - itemNum].offsetHeight)
                };
                looping = function(step, itemNum) {
                    if (!isIns) {
                        parent.removeChild(that.list[that.list.length - 1 - itemNum]);
                        proxy.setOpacity(that.list[that.list.length - 1 - itemNum], "0");
                        that.list[that.list.length - 1 - itemNum].style.height = "0px";
                        that.list[that.list.length - 1 - itemNum].style.overflow = "hidden";
                        Core.Dom.domInsert(parent, that.list[that.list.length - 1 - itemNum], "afterBegin")
                    }
                    isIns = true;
                    that.list[that.list.length - 1 - itemNum].style.height = insorbit[step] + "px"
                }
            } else {
                if (forward === "right") {} else {
                    if (forward === "left") {
                        scroll = pulley.scrollLeft;
                        insorbit = getinsOrbit(that.list[0].offsetWidth);
                        finishOne = function(itemNum) {
                            parent.removeChild(that.list[itemNum]);
                            parent.appendChild(that.list[itemNum])
                        };
                        moveOne = function(itemNum) {
                            insorbit = getinsOrbit(that.list[itemNum].offsetWidth - parseInt(Core.Dom.getStyle(that.list[that.list.length - 1], "paddingTop")))
                        };
                        looping = function(step) {}
                    } else {
                        if (forward == "insertDown") {
                            pulley.style.overflow = "visible";
                            ele = that.list.shift();
                            insorbit = getinsOrbit(ele.offsetHeight);
                            finishOne = function(itemNum) {
                                that.pause("opacity");
                                isIns = false;
                                if (ele && ele.style) {
                                    ele.style.height = "auto";
                                    ele.style.backgroundColor = "#fff";
                                    proxy.opacity(ele, {
                                        first: 0,
                                        last: 100,
                                        time: 1
                                    },
                                    function() {
                                        clearTimeout(st);
                                        st = setTimeout(function() {
                                            if (typeof that.afterRoll === "function") {
                                                that.afterRoll()
                                            }
                                            that.rollDone = true;
                                            if (that.list.length == 0 || !that.hooker || that.liveStop == true || that.hooker == "pause") {
                                                return false
                                            }
                                            that.restart();
                                            ele = that.list.shift()
                                        },
                                        that.sttimeout || 2500)
                                    })
                                }
                            };
                            moveOne = function(itemNum) {
                                if (typeof cfg.afterIns === "function") {
                                    cfg.afterIns(ele)
                                }
                            };
                            looping = function(step, itemNum) {
                                if (!isIns) {
                                    if (!ele) {
                                        return false
                                    }
                                    insorbit = getinsOrbit(ele.offsetHeight);
                                    proxy.setOpacity(ele, "0");
                                    ele.style.height = "0px";
                                    ele.style.overflow = "hidden";
                                    Core.Dom.domInsert(pulley, ele, "afterBegin",
                                    function() {
                                        that.rollDone = false
                                    })
                                }
                                isIns = true;
                                ele.style.height = insorbit[step] + "px"
                            }
                        }
                    }
                }
            }
        }
        that.start = function() {
            hooker = proxy.timer.add(function() {
                looping(current, showing);
                current += 1;
                if (current >= insorbit.length) {
                    finishOne(showing);
                    showing += 1;
                    showing %= that.list.length;
                    moveOne(showing);
                    current = 0
                }
            });
            that.hooker = hooker
        };
        that.stop = function() {
            proxy.timer.remove(hooker);
            that.hooker = null
        };
        that.pause = function(str) {
            proxy.timer.pause(hooker);
            that.hooker = str || "parse"
        };
        that.restart = function() {
            proxy.timer.play(hooker);
            that.hooker = hooker
        };
        that.setList = function(arr, act) {
            if (act === "reset" || that.list.length == 0) {
                that.list = [];
                for (var k = 0; k < arr.length; k++) {
                    that.list.push(arr[k])
                }
                clearTimeout(st);
                ele = that.list.shift();
                that.setLivePlay()
            } else {
                that.list = that.list.concat(arr)
            }
        };
        that.getList = function() {
            return that.list
        };
        that.setLiveStop = function(fun) {
            that.liveStop = true;
            if (typeof fun == "function") {
                fun()
            }
        };
        that.getLiveStop = function() {
            return that.liveStop
        };
        that.setLivePlay = function() {
            proxy.timer.play(hooker);
            that.hooker = hooker;
            that.liveStop = false
        };
        return that
    }
})(App); (function(proxy) {
    proxy.marquee = function(pulley, list, cfg) {
        var that = {};
        var orbit = [];
        var hook = null;
        var current = 0;
        var showing = 0;
        var scroll = 0;
        var parent = list[0].parentNode;
        var margin = cfg.margin || 8;
        if (cfg === undefined) {
            cfg = {}
        }
        var speed = cfg.speed || 5;
        var forward = cfg.forward || "left";
        var getOrbit = function(distance) {
            return proxy.animation.speed(proxy.timer.delay, distance, speed)
        };
        var finishOne = function() {};
        var moveOne = function() {};
        var looping = function() {};
        pulley.style.overflow = "hidden";
        if (forward === "up") {
            scroll = pulley.scrollTop;
            orbit = getOrbit(list[0].offsetHeight);
            finishOne = function(itemNum) {
                parent.removeChild(list[itemNum]);
                parent.appendChild(list[itemNum])
            };
            moveOne = function(itemNum) {
                orbit = getOrbit(list[itemNum].offsetHeight)
            };
            looping = function(step) {
                pulley.scrollTop = scroll + orbit[step]
            }
        } else {
            if (forward === "down") {} else {
                if (forward === "right") {} else {
                    scroll = pulley.scrollLeft;
                    orbit = getOrbit(list[0].offsetWidth + margin);
                    finishOne = function(itemNum) {
                        parent.removeChild(list[itemNum]);
                        parent.appendChild(list[itemNum])
                    };
                    moveOne = function(itemNum) {
                        orbit = getOrbit(list[itemNum].offsetWidth + margin)
                    };
                    looping = function(step) {
                        pulley.scrollLeft = scroll + orbit[step]
                    }
                }
            }
        }
        that.start = function() {
            hook = proxy.timer.add(function() {
                if (current >= orbit.length) {
                    finishOne(showing);
                    showing += 1;
                    showing %= list.length;
                    moveOne(showing);
                    current = 0
                }
                looping(current);
                current += 1
            })
        };
        that.stop = function() {
            proxy.timer.remove(hook)
        };
        that.pause = function() {
            proxy.timer.pause(hook)
        };
        that.restart = function() {
            proxy.timer.play(hook)
        };
        return that
    }
})(App);
$registJob("marquee",
function() {
    var marqueeBox = $E("txtBoxCon").parentNode;
    var divs = marqueeBox.getElementsByTagName("div");
    var items = [];
    for (var i = 0,
    len = divs.length; i < len; i += 1) {
        if (divs[i].className === "itemt") {
            items.push(divs[i])
        }
    }
    App.bindMedia($E("txtBoxCon"));
    var ss = setTimeout(function() {
        var doMarquee = new App.insmarquee(marqueeBox, items, {
            forward: "down",
            speed: 5
        });
        Core.Events.addEvent(marqueeBox,
        function() {
            doMarquee.pause()
        },
        "mouseover");
        Core.Events.addEvent(marqueeBox,
        function() {
            doMarquee.restart()
        },
        "mouseout");
        doMarquee.start();
        clearTimeout(ss)
    },
    500)
});
$registJob("set_password",
function() {
    App.setPassword("password", "password_text")
});
$registJob("topicmarquee",
function() {
    var topicmarqueeBox = $E("topicBoxCon");
    var lis = $E("acticle_list").getElementsByTagName("li");
    var li_items = [];
    for (var j = 0,
    lent = lis.length; j < lent; j += 1) {
        li_items.push(lis[j])
    }
    var marquee = new App.marquee(topicmarqueeBox, li_items, {
        forward: "left",
        speed: 2
    });
    Core.Events.addEvent(topicmarqueeBox,
    function() {
        marquee.pause()
    },
    "mouseover");
    Core.Events.addEvent(topicmarqueeBox,
    function() {
        marquee.restart()
    },
    "mouseout");
    marquee.start()
});
$registJob("highLightLi",
function() {
    if (!$E("imgList")) {
        return false
    }
    var imgs = $E("imgList").getElementsByTagName("img");
    var randomIMGs = [];
    while (randomIMGs.length < 12) {
        var randomIndex = Math.floor(Math.random() * imgs.length);
        if (Core.Array.findit(randomIMGs, imgs[randomIndex]) === -1) {
            randomIMGs.push(imgs[randomIndex])
        }
    }
    var len = randomIMGs.length;
    for (var i = 0; i < len; i++) {
        randomIMGs[i].parentNode.parentNode.style.display = "list-item"
    }
});
$registJob("login3",
function() {
    var submit = $E("login_submit_btn");
    var loginname = $E("loginname");
    var password_text = $E("password_text");
    var remusrname = $E("remusrname");
    var login_form = $E("login_form");
    if (!remusrname) {
        remusrname = {
            checked: true
        }
    }
    App.initLoginInput(loginname);
    var options = {
        zIndex: 1010,
        ref: loginname,
        offsetY: 1,
        offsetX: 1
    };
    function checkForm(el, errStr) {
        if (!Core.String.trim(el.value) || (el.value == el.title && el.title)) {
            password_text.focus();
            App.fixElement.setHTML(errStr, "", options);
            return false
        } else {
            App.fixElement.hidden()
        }
        return true
    }
    Core.Events.addEvent(submit,
    function(event) {
        if (!checkForm(loginname, App.getMsg({
            code: "M00901"
        }))) {
            return false
        }
        if (!checkForm($E("password"), App.getMsg({
            code: "M00902"
        }))) {
            return false
        } else {
            App.LoginAction({
                name: loginname.value,
                pwd: $E("password").value,
                remb: remusrname.checked,
                error: function(reason, errno) {
                    var msg = "";
                    if (errno == "4010") {
                        reason = App.getMsg({
                            code: "R01011"
                        });
                        msg = App.getMsg("R01010", {
                            mail: loginname.value
                        })
                    } else {
                        if (errno == "101" || errno == "5") {
                            msg = App.getMsg({
                                code: "R11111"
                            })
                        }
                    }
                    App.fixElement.setHTML(reason, msg, options)
                },
                succ: function() {
                    var redirect = scope.redirect ? Core.String.trim(scope.redirect) : "http://t.sina.com.cn/";
                    location.replace(redirect)
                }
            })
        }
        Core.Events.stopEvent(event)
    },
    "click");
    if (login_form) {
        App.enterSubmit({
            parent: $E("password").parentNode,
            action: function() {
                Core.Events.fireEvent("login_submit_btn", "click")
            }
        })
    }
    passcardOBJ.init(loginname, {
        overfcolor: "#999",
        overbgcolor: "#e8f4fc",
        outfcolor: "#000000",
        outbgcolor: ""
    },
    password_text, parent);
    if (Core.String.trim(loginname.value) != "" && Core.String.trim($E("password").value) != "") {
        setTimeout(function() {
            Core.Events.fireEvent(submit, "click")
        },
        100)
    }
}); (function(proxy) {
    var $w = window,
    $d = $w.document,
    $e = $d.documentElement || {},
    $pl = 2,
    count = 1,
    cacheid = 1;
    var $a = Core.Events.addEvent;
    var $r = Core.Events.removeEvent;
    var $t = function() {
        return ($w.pageYOffset || Math.max($e.scrollTop, $d.body.scrollTop))
    };
    var $y = function(el) {
        var et, pn;
        if ("getBoundingClientRect" in el) {
            et = el.getBoundingClientRect().top;
            return et + $t()
        }
        if (! (pn = el.offsetParent)) {
            return 0
        }
        et = pn.offsetTop;
        while (pn && pn != $d.body) {
            et += pn.offsetTop;
            pn = pn.offsetParent
        }
        return et || 0
    };
    var $sh = function() {
        return Math.max($e.clientHeight, $e.scrollHeight, $e.offsetHeight, $d.body.scrollHeight, $d.body.offsetHeight)
    };
    var $wh = function() {
        return $w.innerHeight || ($e && $e.clientHeight) ? $e.clientHeight: $d.body["clientHeight"]
    };
    var isRemoved = function(element) {
        var e, p, n;
        return ! (e = element) || !(p = e.parentNode) || ((n = p.nodeName) && n == "#document-fragment")
    };
    var model = (function() {
        var oInstance = {},
        _aQueue = [];
        oInstance.add = function(init, fFlush, fExtract) {
            try {
                _aQueue.push({
                    queue: init() || [],
                    flush: fFlush,
                    extract: fExtract || null
                })
            } catch(e) {
                $Debug(e)
            }
        };
        oInstance.flush = function(tStep, step) {
            var _i = 0,
            _len = _aQueue.length,
            delay = 0;
            for (_i; _i < _len; _i++) {
                var i = 0,
                current = _aQueue[_i],
                queue = current.queue,
                len = queue.length,
                returns = [];
                for (i; i < len; i++) {
                    var item = queue[i],
                    y;
                    if (isRemoved(item)) {
                        queue.splice(i, 1);
                        len--;
                        i--;
                        continue
                    }
                    if ((y = $y(item)) > step || y < tStep) {
                        continue
                    }
                    try {
                        current.extract && current.extract(item)
                    } catch(e) {
                        $Debug(e)
                    }
                    returns.push(queue.splice(i, 1)[0]);
                    len--,
                    i--
                }
                try {
                    returns.length && (function(cf, rts) {
                        setTimeout(function() {
                            cf(rts)
                        },
                        0)
                    })(current.flush, returns)
                } catch(e) {
                    $Debug(e)
                }
                if (!queue.length) {
                    _aQueue.splice(_i, 1);
                    _len--;
                    _i--
                }
            }
            return ! _aQueue.length ? false: true
        };
        return oInstance
    })();
    var screen = (function() {
        var clock, sleep, oInstance = {},
        _enabled = false,
        _step, flush = model.flush,
        _delay = 100,
        _mode = "Timeout",
        validate = true;
        oInstance.validate = function() {
            validate = false;
            clearTimeout(sleep);
            sleep = setTimeout(function() {
                validate = true
            },
            200)
        };
        oInstance.loop = (function() {
            var step = 0,
            tStep = 0,
            snap, snapSH, sh, t;
            return function() {
                sh = $sh();
                if (sh < (snapSH || 0)) {
                    step -= (snapSH - sh)
                }
                snapSH = sh;
                t = $t();
                snap = t + _step;
                if (((count % 200 == 0 && (count = 1)) || snap > step || t < tStep) && validate) {
                    tStep = t - 100;
                    step = snap + _step;
                    if (!flush(tStep, step)) {
                        oInstance.enabled(false)
                    }
                }
                count++
            }
        })();
        oInstance.enabled = function(b) {
            if (b === undefined) {
                return _enabled
            }
            if (b === _enabled) {
                return
            }
            _enabled = b;
            clearInterval(clock); (b ? $a: $r)(window, oInstance.validate, "scroll");
            b && (clock = setInterval(oInstance.loop, 30))
        };
        oInstance.step = function() {
            _step = $wh() * $pl
        };
        oInstance.resize = function() {
            oInstance.step()
        };
        return oInstance
    })();
    var getRid = function(oElement) {
        var attr = oElement.getAttribute("cacheid");
        if (attr) {
            return attr
        }
        oElement.setAttribute("cacheid", cacheid++);
        return attr
    };
    proxy.getElementsByAttribute = (function() {
        var cache = {},
        key = function() {
            return Array.prototype.slice.call(arguments, 0).join("_")
        };
        return function(oElement, sTagName, sAttribute, sValue) {
            oElement = $E(oElement) || $d.body;
            sTagName = sTagName || "*";
            var valueKey, attrKey, tagKey;
            valueKey = key(attrKey = key(tagKey = key(getRid(oElement), sTagName), sAttribute), sValue);
            var attrs = cache[attrKey] || null,
            values = cache[valueKey] || null,
            tags = cache[tagKey] || null;
            if (!sValue && attrs) {
                return attrs
            }
            if (sValue && values) {
                return values
            }
            var elements = attrs || tags || (cache[tagKey] = oElement.getElementsByTagName(sTagName));
            var i = 0,
            len = elements.length,
            retAttrib = [],
            retValue = [],
            current,
            attrib,
            returns;
            var reg = sValue ? new RegExp("(^|\\s)" + sValue + "(\\s|$)") : null;
            for (i; i < len; i++) {
                if ((current = elements[i]).nodeType != 1) {
                    continue
                }
                if (! (attrib = current.getAttribute(sAttribute))) {
                    continue
                }
                if (!attrs) {
                    retAttrib.push(current)
                }
                if (reg && reg.test(attrib)) {
                    retValue.push(current)
                }
            }
            if (retAttrib.length) {
                returns = cache[attrKey] = retAttrib
            }
            if (retValue.length) {
                returns = cache[valueKey] = retValue
            }
            return returns || []
        }
    })();
    var bindProxy = function(oProxy, extract, flush, fGetData) {
        var i = 0,
        ns = App,
        len = (p = ((oProxy || "").split("."))).length;
        for (i = (p[0] == "App") ? 1 : 0; i < len; i++) {
            ns = ns[p[i]] = ns[p[i]] || {}
        }
        ns.flush = function(doms) {
            var i = 0,
            len = (doms = (doms || [])).length;
            if (!len) {
                return
            }
            for (i; i < len; i++) {
                try {
                    extract && extract(doms[i])
                } catch(e) {
                    $Debug(e)
                }
            }
            try {
                flush && flush(doms)
            } catch(e) {
                $Debug(e)
            }
        };
        ns.fire = function() {
            var dom = fGetData();
            ns.flush(dom)
        };
        return ns
    };
    proxy.splitLoader = (function() {
        var oInstance = {};
        oInstance.model = model;
        oInstance.screen = screen;
        oInstance.loop = screen.loop;
        oInstance.plugin = function(oPlug, sProxy) {
            if (oPlug && oPlug.init && (oPlug.flush = oPlug.flush ||
            function() {})) {
                sProxy && (sProxy = bindProxy(sProxy, oPlug.extract, oPlug.flush, oPlug.init));
                if (/\((iPhone|iPad|iPod)/i.test(navigator.userAgent) && sProxy) {
                    sProxy.fire();
                    return oInstance
                }
                oInstance.model.add(oPlug.init, oPlug.flush, oPlug.extract);
                screen.resize();
                screen.enabled(true)
            } else {
                $Debug("invalid plugin")
            }
            return oInstance
        };
        return oInstance
    })()
})(App); (function(pro) {
    var table = "00000000 77073096 EE0E612C 990951BA 076DC419 706AF48F E963A535 9E6495A3 0EDB8832 79DCB8A4 E0D5E91E 97D2D988 09B64C2B 7EB17CBD E7B82D07 90BF1D91 1DB71064 6AB020F2 F3B97148 84BE41DE 1ADAD47D 6DDDE4EB F4D4B551 83D385C7 136C9856 646BA8C0 FD62F97A 8A65C9EC 14015C4F 63066CD9 FA0F3D63 8D080DF5 3B6E20C8 4C69105E D56041E4 A2677172 3C03E4D1 4B04D447 D20D85FD A50AB56B 35B5A8FA 42B2986C DBBBC9D6 ACBCF940 32D86CE3 45DF5C75 DCD60DCF ABD13D59 26D930AC 51DE003A C8D75180 BFD06116 21B4F4B5 56B3C423 CFBA9599 B8BDA50F 2802B89E 5F058808 C60CD9B2 B10BE924 2F6F7C87 58684C11 C1611DAB B6662D3D 76DC4190 01DB7106 98D220BC EFD5102A 71B18589 06B6B51F 9FBFE4A5 E8B8D433 7807C9A2 0F00F934 9609A88E E10E9818 7F6A0DBB 086D3D2D 91646C97 E6635C01 6B6B51F4 1C6C6162 856530D8 F262004E 6C0695ED 1B01A57B 8208F4C1 F50FC457 65B0D9C6 12B7E950 8BBEB8EA FCB9887C 62DD1DDF 15DA2D49 8CD37CF3 FBD44C65 4DB26158 3AB551CE A3BC0074 D4BB30E2 4ADFA541 3DD895D7 A4D1C46D D3D6F4FB 4369E96A 346ED9FC AD678846 DA60B8D0 44042D73 33031DE5 AA0A4C5F DD0D7CC9 5005713C 270241AA BE0B1010 C90C2086 5768B525 206F85B3 B966D409 CE61E49F 5EDEF90E 29D9C998 B0D09822 C7D7A8B4 59B33D17 2EB40D81 B7BD5C3B C0BA6CAD EDB88320 9ABFB3B6 03B6E20C 74B1D29A EAD54739 9DD277AF 04DB2615 73DC1683 E3630B12 94643B84 0D6D6A3E 7A6A5AA8 E40ECF0B 9309FF9D 0A00AE27 7D079EB1 F00F9344 8708A3D2 1E01F268 6906C2FE F762575D 806567CB 196C3671 6E6B06E7 FED41B76 89D32BE0 10DA7A5A 67DD4ACC F9B9DF6F 8EBEEFF9 17B7BE43 60B08ED5 D6D6A3E8 A1D1937E 38D8C2C4 4FDFF252 D1BB67F1 A6BC5767 3FB506DD 48B2364B D80D2BDA AF0A1B4C 36034AF6 41047A60 DF60EFC3 A867DF55 316E8EEF 4669BE79 CB61B38C BC66831A 256FD2A0 5268E236 CC0C7795 BB0B4703 220216B9 5505262F C5BA3BBE B2BD0B28 2BB45A92 5CB36A04 C2D7FFA7 B5D0CF31 2CD99E8B 5BDEAE1D 9B64C2B0 EC63F226 756AA39C 026D930A 9C0906A9 EB0E363F 72076785 05005713 95BF4A82 E2B87A14 7BB12BAE 0CB61B38 92D28E9B E5D5BE0D 7CDCEFB7 0BDBDF21 86D3D2D4 F1D4E242 68DDB3F8 1FDA836E 81BE16CD F6B9265B 6FB077E1 18B74777 88085AE6 FF0F6A70 66063BCA 11010B5C 8F659EFF F862AE69 616BFFD3 166CCF45 A00AE278 D70DD2EE 4E048354 3903B3C2 A7672661 D06016F7 4969474D 3E6E77DB AED16A4A D9D65ADC 40DF0B66 37D83BF0 A9BCAE53 DEBB9EC5 47B2CF7F 30B5FFE9 BDBDF21C CABAC28A 53B39330 24B4A3A6 BAD03605 CDD70693 54DE5729 23D967BF B3667A2E C4614AB8 5D681B02 2A6F2B94 B40BBE37 C30C8EA1 5A05DF1B 2D02EF8D";
    pro.crc32 = function(str, crc) {
        if (crc == window.undefined) {
            crc = 0
        }
        var n = 0;
        var x = 0;
        crc = crc ^ ( - 1);
        for (var i = 0,
        iTop = str.length; i < iTop; i++) {
            n = (crc ^ str.charCodeAt(i)) & 255;
            x = "0x" + table.substr(n * 9, 8);
            crc = (crc >>> 8) ^ x
        }
        return crc ^ ( - 1)
    }
})(App); (function(proxy) {
    proxy.imgURL = function(id, size) {
        size = size || "middle";
        function hexdec(hex_string) {
            hex_string = (hex_string + "").replace(/[^a-f0-9]/gi, "");
            return parseInt(hex_string, 16)
        }
        var types = {
            ss: {
                middle: "&690",
                bmiddle: "&690",
                small: "&690",
                thumbnail: "&690",
                square: "&690",
                orignal: "&690"
            },
            ww: {
                large: "",
                bmiddle: "",
                small: "",
                thumbnail: "",
                square: ""
            }
        };
        var isW = id.charAt(9) == "w";
        var ext = id.charAt(21) == "g" ? ".gif": ".jpg";
        var domainNum = isW ? ((Math.abs(App.crc32(id)) % 4) + 1) : (hexdec(id.substr(19, 2)) % 16 + 1);
        var url = "http://" + (isW ? "ww": "ss") + domainNum + ".sinaimg.cn/" + size + "/" + id + (isW ? ext: "") + types[isW ? "ww": "ss"][size];
        return url
    }
})(App);
Core.Dom.next = function(elm, _className) {
    var o = $E(elm);
    var next = o.nextSibling;
    if (!next) {
        return null
    } else {
        if (next.nodeType != 1) {
            return Core.Dom.next(next, _className)
        } else {
            if (next.nodeType == 8) {
                next.parentNode.removeChild(next);
                return Core.Dom.next(o, _className)
            }
        }
    }
    if (next.className.indexOf(_className) != -1) {
        return next
    } else {
        return Core.Dom.next(next, _className)
    }
};
Core.Dom.getChildrenByClass = function(el, clz) {
    var rs = [];
    var cldr = el.childNodes || el.children;
    var clz = " " + clz + " ";
    var len = cldr.length;
    for (var i = 0; i < len; ++i) {
        var o = cldr[i];
        var ecl = " " + o.className + " ";
        if (ecl.indexOf(clz) != -1) {
            rs[rs.length] = o
        }
    }
    return rs
};
Core.Dom.getElementsByAttr = function(node, attname, attvalue) {
    var nodes = [];
    for (var i = 0,
    l = node.childNodes.length; i < l; i++) {
        if (node.childNodes[i].nodeType == 1) {
            if (node.childNodes[i].getAttribute(attname) == attvalue) {
                nodes.push(node.childNodes[i])
            }
            if (node.childNodes[i].childNodes.length > 0) {
                nodes = nodes.concat(arguments.callee.call(null, node.childNodes[i], attname, attvalue))
            }
        }
    }
    return nodes
};
function intval(v) {
    v = parseInt(v);
    return isNaN(v) ? 0 : v
}
function getPos(e) {
    var l = 0;
    var t = 0;
    var w = intval(e.style.width);
    var h = intval(e.style.height);
    var wb = e.offsetWidth;
    var hb = e.offsetHeight;
    while (e.offsetParent) {
        l += e.offsetLeft + (e.currentStyle ? intval(e.currentStyle.borderLeftWidth) : 0);
        t += e.offsetTop + (e.currentStyle ? intval(e.currentStyle.borderTopWidth) : 0);
        e = e.offsetParent
    }
    l += e.offsetLeft + (e.currentStyle ? intval(e.currentStyle.borderLeftWidth) : 0);
    t += e.offsetTop + (e.currentStyle ? intval(e.currentStyle.borderTopWidth) : 0);
    return {
        x: l,
        y: t,
        w: w,
        h: h,
        wb: wb,
        hb: hb
    }
}
function getScroll() {
    var t, l, w, h;
    if (document.documentElement && document.documentElement.scrollTop) {
        t = document.documentElement.scrollTop;
        l = document.documentElement.scrollLeft;
        w = document.documentElement.scrollWidth;
        h = document.documentElement.scrollHeight
    } else {
        if (document.body) {
            t = document.body.scrollTop;
            l = document.body.scrollLeft;
            w = document.body.scrollWidth;
            h = document.body.scrollHeight
        }
    }
    return {
        t: t,
        l: l,
        w: w,
        h: h
    }
}
function scroller(el, duration, offsetY, offsetX, bYFixed, bXFixed) {
    if (typeof el != "object") {
        el = document.getElementById(el)
    }
    if (!el) {
        return
    }
    var z = this;
    z.el = el;
    z.p = getPos(el);
    z.s = getScroll();
    z.clear = function() {
        window.clearInterval(z.timer);
        z.timer = null
    };
    z.clear();
    z.offsetX = offsetX || 0;
    z.offsetY = offsetY || 0;
    z.p.x += z.offsetX;
    z.p.y += z.offsetY;
    z.t = (new Date).getTime();
    z.step = function() {
        var t = (new Date).getTime();
        var p = (t - z.t) / duration;
        if (t >= duration + z.t) {
            z.clear();
            window.setTimeout(function() {
                z.scroll(z.p.y, z.p.x)
            },
            13)
        } else {
            st = (( - Math.cos(p * Math.PI) / 2) + 0.5) * (z.p.y - z.s.t) + z.s.t;
            sl = (( - Math.cos(p * Math.PI) / 2) + 0.5) * (z.p.x - z.s.l) + z.s.l;
            z.scroll(st, sl)
        }
    };
    z.scroll = function(t, l) {
        window.scrollTo(l, t)
    };
    z.timer = window.setInterval(function() {
        if (bYFixed) {
            if ((z.p.y - z.s.t == 0)) {
                z.clear();
                return false
            }
        }
        if (bXFixed) {
            if ((z.p.x - z.s.l == 0)) {
                z.clear();
                return false
            }
        }
        z.step()
    },
    13)
}
App.bindVideo = function(_dom, _key, _value) {
    var _addevent = Core.Events.addEvent;
    var _seevideo = App.seevideo;
    var _node = {};
    var _previewHTML = function(mid, mtype) {
        try {
            var str = decodeURIComponent(_value.title);
            if (Core.String.byteLength(str) > 24) {
                str = Core.String.leftB(str, 24 - 1) + "..."
            }
            _value.title = str
        } catch(e) {}
        return '<img width="120px" height="80px" alt="" src="' + _value.screen + '">          <div type="' + mtype + '" mid="' + mid + '" class="video_play">            <a shorturl_id="' + _key + '"  href="javascript:void(0);"><img title="' + _value.title + '" src="' + scope.$BASEIMG + 'style/images/common/feedvideoplay.gif"></a>          </div>'
    };
    var render = function(node, videoInfo, _previewdiv) {
        if (_previewdiv && _previewdiv.getAttribute("mbind") != "1") {
            var inspos = {};
            if (Core.Dom.getElementsByClass(_previewdiv, "div", "feed_img").length > 0) {
                inspos.dom = Core.Dom.getElementsByClass(_previewdiv, "div", "feed_img")[0];
                inspos.pos = "afterEnd"
            } else {
                inspos.dom = _previewdiv;
                inspos.pos = "afterBegin"
            }
            var feed_img = $C("div");
            feed_img.className = "feed_img";
            feed_img.innerHTML = _previewHTML(node.mid, node.mtype);
            Core.Dom.domInsert(inspos.dom, feed_img, inspos.pos);
            var cldr = feed_img.childNodes || feed_img.children;
            cldr[0].src = videoInfo.screen;
            _previewdiv.setAttribute("mbind", "1");
            var a = feed_img.getElementsByTagName("A")[0];
            _addevent(a,
            function() {
                node.node = a;
                _seevideo(node, videoInfo)
            },
            "click")
        }
    };
    _dom.href = "javascript:void(0);";
    _dom.target = "";
    _node.mid = _dom.parentNode.getAttribute("mid");
    var prevDiv = $E("prev_" + _node.mid);
    var showvdiv = $E("disp_" + _node.mid);
    _value.shorturl = _key;
    _node.mtype = _dom.parentNode.getAttribute("type");
    _addevent(_dom,
    function() {
        _node.node = _dom;
        _seevideo(_node, _value)
    },
    "click");
    if (! (scope.$pageid == "mblog" && _node.mtype == "1")) {
        render(_node, _value, prevDiv)
    } else {
        if (!_value) {
            return false
        }
        if ((!_value) || _node.mtype != "1" || showvdiv.getAttribute("mbind") == "1") {
            return false
        }
        var video = {
            mid: decodeURIComponent(_node.mid),
            url: decodeURIComponent(_value.flash),
            title: _value.title,
            shorturl: _value.shorturl,
            ourl: decodeURIComponent(_value.url),
            mtype: _node.mtype
        };
        var setswfobject = function(url, mid) {
            var flashParams = {
                quality: "high",
                allowScriptAccess: "always",
                wmode: "transparent",
                allowFullscreen: true
            };
            var flashVars = {
                playMovie: "true"
            };
            swfobject.embedSWF(url, mid, "440", "356", "9.0.0", null, flashVars, flashParams)
        };
        var html = '<div class="MIB_linedot_l1"></div>		          <p><a href="http://sinaurl.cn/' + video.shorturl + '" target = "_blank" class="lose" title="' + video.ourl + '"><img alt="" title="" class="small_icon original" src="' + scope.$BASEIMG + 'style/images/common/transparent.gif"/>' + video.title + '</a></p><div class="note_noflash" id="' + video.mid + '">' + $CLTMSG.CD0180.replace(/#\{shorturl\}/g, video.shorturl) + "</div>";
        showvdiv.innerHTML = html;
        setswfobject(video.url, video.mid);
        showvdiv.setAttribute("mbind", "1")
    }
};
App.bindMusic = function(_dom, _key, _value) {
    var node = {
        node: _dom,
        mid: _dom.parentNode.getAttribute("mid"),
        shorturl: _value
    };
    var _addevent = Core.Events.addEvent;
    _addevent(_dom,
    function() {
        App.listenmusic(node)
    },
    "click")
};
App.seevideo = function(node, videoInfo) {
    if (scope.$pageid == "yunying_index") {
        return true
    }
    var _vinfo = videoInfo;
    if (!_vinfo) {
        return false
    }
    var el = node.node.tagName == "A" ? node.node: node.node.parentNode;
    var video = {
        mid: node.mid,
        url: decodeURIComponent(_vinfo.flash),
        title: _vinfo.title,
        shorturl: _vinfo.shorturl,
        ourl: decodeURIComponent(_vinfo.url),
        mtype: node.mtype
    };
    var _showvdiv = $E("disp_" + video.mid);
    var _imagediv = $E("prev_" + video.mid);
    var checksame = function(vdiv, shorturl) {
        if (Core.Dom.getElementsByClass(vdiv, "A", "lose").length > 0) {
            if ("http://sinaurl.cn/" + shorturl == Core.Dom.getElementsByClass(vdiv, "A", "lose")[0].href) {
                return true
            } else {
                return false
            }
        } else {
            return false
        }
    };
    var setswfobject = function(url, mid) {
        var flashParams = {
            quality: "high",
            allowScriptAccess: "always",
            wmode: "transparent",
            allowFullscreen: true
        };
        var flashVars = {
            playMovie: "true"
        };
        swfobject.embedSWF(url, mid, "440", "356", "9.0.0", null, flashVars, flashParams)
    };
    var getvideoHTML = function(videocfg) {
        if (videocfg) {
            if (scope.$pageid == "mblog" && videocfg.mtype == "1") {
                return '<div class="MIB_linedot_l1"></div>			    <p><a href="http://sinaurl.cn/' + videocfg.shorturl + '" target = "_blank" class="lose" title="' + videocfg.ourl + '"><img alt="" title="" class="small_icon original" src="' + scope.$BASEIMG + 'style/images/common/transparent.gif"/>' + videocfg.title + '</a></p><div class="note_noflash" id="' + videocfg.mid + '">' + $CLTMSG.CD0180.replace(/#\{shorturl\}/g, videocfg.shorturl) + "</div>"
            } else {
                if (videocfg.mtype == "1") {
                    return '<div class="MIB_assign_t"></div>					<div class="MIB_assign_c MIB_txtbl">					<div class="blogPicOri">		                <p>						<a href="javascript:;" onclick="App.closevideo(\'' + videocfg.mid + '\');"><img alt="" title="" class="small_icon cls" src="' + scope.$BASEIMG + 'style/images/common/transparent.gif"/>' + $CLTMSG.CD0079 + '</a>							<cite class="MIB_line_l">|</cite>							<a href="http://sinaurl.cn/' + videocfg.shorturl + '" target = "_blank" class="lose" title="' + videocfg.ourl + '"><img alt="" title="" class="small_icon original" src="' + scope.$BASEIMG + 'style/images/common/transparent.gif"/>' + videocfg.title + '</a> <a style="margin-left:12px;" href="javascript:;" onclick="App.openVideoWindow(this);"><img alt="" title="" class="small_icon turn_r" src="' + scope.$BASEIMG + 'style/images/common/transparent.gif"/>' + $CLTMSG.CX0221 + '</a>											</p>											 <div class="note_noflash" id="' + videocfg.mid + '">									  	' + $CLTMSG.CD0180.replace(/#\{shorturl\}/g, videocfg.shorturl) + '									  </div>											 </div>										</div>										<div class="MIB_assign_b"></div>'
                } else {
                    return '<div class="MIB_linedot_l1" style="display: block;"></div>		                <p>						<a href="javascript:;" onclick="App.closevideo(\'' + videocfg.mid + '\');"><img alt="" title="" class="small_icon cls" src="' + scope.$BASEIMG + 'style/images/common/transparent.gif"/>' + $CLTMSG.CD0079 + '</a>							<cite class="MIB_line_l">|</cite>							<a href="http://sinaurl.cn/' + videocfg.shorturl + '" target = "_blank" class="lose" title="' + videocfg.ourl + '"><img alt="" title="" class="small_icon original" src="' + scope.$BASEIMG + 'style/images/common/transparent.gif"/>' + videocfg.title + '</a> <a style="margin-left:12px;" href="javascript:;" onclick="App.openVideoWindow(this);"><img alt="" title="" class="small_icon turn_r" src="' + scope.$BASEIMG + 'style/images/common/transparent.gif"/>' + $CLTMSG.CX0221 + '</a>											</p>											 <div class="note_noflash" id="' + videocfg.mid + '">									  	' + $CLTMSG.CD0180.replace(/#\{shorturl\}/g, videocfg.shorturl) + "									  </div>"
                }
            }
        }
    };
    if (_showvdiv && _showvdiv.style.display != "none") {
        if (!checksame(_showvdiv, video.shorturl)) {
            _showvdiv.innerHTML = getvideoHTML(video);
            setswfobject(video.url, video.mid);
            scroller(_showvdiv, 1000, -60, 0, true, true)
        }
    } else {
        _imagediv.style.display = "none";
        _showvdiv.innerHTML = getvideoHTML(video);
        setswfobject(video.url, video.mid);
        _showvdiv.style.display = "";
        scroller(_showvdiv, 1000, -60, 0, true, true)
    }
    try {
        scope.statistics({
            video_url: encodeURIComponent("http://sinaurl.cn/" + video.shorturl),
            title: encodeURIComponent(video.title),
            video_src_url: encodeURIComponent(video.ourl)
        })
    } catch(e) {}
    return false
};
App.openVideoWindow = (function() {
    var _next = function(elm) {
        var o = $E(elm);
        var next = o.nextSibling;
        if (!next) {
            return null
        }
        if (next.nodeType !== 1) {
            return _next(next)
        }
        return next
    };
    var _video_window = false;
    return function(d) {
        if (!_video_window) {
            _video_window = $C("div");
            var _module = '			<table class="mBlogLayer">				<tr>					<td class="top_l"></td>					<td class="top_c"></td>					<td class="top_r"></td>				</tr>				<tr>					<td class="mid_l"></td>					<td class="mid_c">						<div class="layerBox">							<div style="padding:3px 0 3px 5px"><a href="javascript:void(0);" id="pop_video_window_close"><img src="' + scope.$BASEIMG + 'style/images/common/transparent.gif" class="small_icon cls" />' + $CLTMSG.CX0222 + '</a></div>							<div class="layerBoxCon" style="width:440px;" id="pop_video_window"></div>						</div>					</td>					<td class="mid_r"></td>				</tr>				<tr>					<td class="bottom_l"></td>					<td class="bottom_c"></td>					<td class="bottom_r"></td>				</tr>			</table>			';
            _video_window.innerHTML = _module;
            document.body.appendChild(_video_window);
            Core.Events.addEvent($E("pop_video_window_close"),
            function() {
                if (_videoplace.childNodes.length > 0) {
                    _video_window.style.display = "none";
                    _videoplace.removeChild(_videoplace.childNodes[0])
                }
            },
            "click")
        }
        var _video = _next(d.parentNode);
        var _newvideo = _video.cloneNode(true);
        var _videoplace = $E("pop_video_window");
        var _x = Core.Dom.getLeft(d);
        var _cssText = "position:fixed;bottom:0px;right:0px;z-index:1000;_position:absolute";
        _video_window.style.cssText = _cssText;
        if (_videoplace.childNodes.length > 0) {
            _videoplace.removeChild(_videoplace.childNodes[0])
        }
        _videoplace.appendChild(_newvideo);
        var _close = d.parentNode.getElementsByTagName("a")[0];
        _video_window.style.display = "";
        Core.Events.fireEvent(_close, "click"); (function() {
            if ($IE6 && _video_window.style.display == "") {
                _video_window.style.cssText = _cssText;
                setTimeout(arguments.callee, 200)
            }
        })()
    }
})();
App.closevideo = function(mid) {
    var _showvdiv = $E("disp_" + mid);
    var _imagediv = $E("prev_" + mid);
    var _img;
    if (Core.Dom.getElementsByAttr(_imagediv, "class", "imgSmall").length > 0) {
        _img = Core.Dom.getElementsByAttr(_imagediv, "class", "imgSmall")
    } else {
        _img = Core.Dom.getElementsByAttr(_imagediv, "className", "imgSmall")
    }
    if (_img.length > 0) {
        var _bigimg = _img[0];
        App.shrinkImg(_bigimg)
    }
    _imagediv.style.display = "";
    _showvdiv.style.display = "none";
    _showvdiv.innerHTML = "";
    return false
};
App.listenmusic = function(node) {
    var el = node.node.tagName == "A" ? node.node: node.node.parentNode;
    el.target = "";
    el.href = "javascript:void(0);";
    var mid = node.mid;
    var shorturl = node.shorturl;
    var music = {
        mid: decodeURIComponent(mid),
        url: decodeURIComponent(shorturl)
    };
    App.popUpMiniPlayer(music.mid, music.url);
    return false
};
App.popUpMiniPlayer = function(mid, url) {
    var openUrl = "http://music.sina.com.cn/yueku/t/player.html";
    var search = "";
    mid && url && (function() {
        search = ["?mid=", mid, "&url=", encodeURIComponent(url)].join("")
    })();
    scope.musicshow = window.open([openUrl, search].join(""), "w_yuekuplayer", "width=629,height=595,top=" + (window.screen.height - 600) / 2 + ", left=" + (window.screen.width - 730) / 2 + ", toolbar=no, menubar=no, scrollbars=no,resizable=no,location=no, status=no");
    if (scope.musicshow) {
        scope.musicshow.focus()
    }
}; (function(ns) {
    ns.bindTitle = function(_dom, _key, _value) {
        if (!_value.url) {
            return
        }
        _dom.setAttribute("title", _value.url)
    }
})(App); (function(ns) {
    ns.bindFace = function(dom, key, value) {
        dom.href = "####";
        dom.target = "";
        var encodeTitle = function(value) {
            return value.replace(/[^\w\u4e00-\u9fa5\uff10-\uff19\uff21-\uff3a\uff41-\uff5a\u2014\uff3f]/g, "")
        };
        var id, face, html, prev, disp, isBinded, flag, type;
        Core.Events.addEvent(dom,
        function() {
            setTimeout((function(v, f) {
                return function() {
                    App.PopUpSwfPlayer(v.flash)
                }
            })(value), 100);
            return false
        },
        "click");
        id = dom.parentNode.getAttribute("mid");
        html = '<div class="feed_img"><a class="magicpic_link" href="####" title="' + encodeTitle(value.title) + '" onclick="App.PopUpSwfPlayer(\'' + value.flash + '\');return false;"><img src="' + value.screen + '"></a><a href="####" class="playmp" title="' + $CLTMSG.CL0912 + '" onclick="App.PopUpSwfPlayer(\'' + value.flash + "');return false;\"></a></div>";
        prev = $E("prev_" + id);
        disp = $E("disp_" + id);
        if (!/1|2/.test(type = dom.parentNode.getAttribute("type"))) {
            return
        }
        if (scope.$pageid === "mblog" && type == "1") {
            prev = disp;
            prev.style.display = ""
        }
        if (!prev) {
            return
        }
        if (prev.getAttribute("mbind") != "1") {
            prev.setAttribute("mbind", "1");
            var imgs = Core.Dom.getElementsByClass(prev, "div", "feed_img"),
            type = "beforebegin";
            imgs.length && (flag = imgs[0]) && (type = "afterEnd"); ! flag && (flag = (flag = Core.Dom.getElementsByClass(prev, "div", "clear")) && flag[0]);
            if (flag) {
                Core.Dom.insertHTML(flag, html, type)
            } else {
                prev.innerHTML = html
            }
        }
    }
})(App); 
App.mapTemplete = (function() {
    var it = {};
    it.popMapPanel = '<table class="mBlogLayer"><tbody>			<tr><td class="top_l"></td><td class="top_c"></td><td class="top_r"></td></tr>			<tr>				<td class="mid_l"></td>				<td class="mid_c">					<div id="popUpMiniMapLoadingPanel" style="position:absolute;left:200px;top:125px;z-index:99999"><img src=\'' + [scope.$BASECSS, "style/images/common/loading.gif"].join("") + '\'/></div>					<div class="layerBox">						<div class="geo_info_layer" style="width:400px;">							<div class="map_box"><iframe id="mini_map_panel" style="width:400px;height:250px;border:0 none;" frameBorder="0" scrolling="no" src="#{SRC}"></iframe></div>							<div id="popUpMiniMapArrow" class="geo_arrow" style="left:120px"></div>							<a href="javascript:;" class="close" title="#{CX0145}" onClick="App.popUpMiniMap.close();return false;"></a>							<a href="javascript:;" id="zoomIn" class="map_zoomIn" title="#{CL0825}" onMouseDown="App.popUpMiniMap.zoomIn();return false;"></a>							<a href="javascript:;" id="zoomOut" class="map_zoomOut" title="#{CL0826}" onMouseDown="App.popUpMiniMap.zoomOut();return false;"></a>						</div>					</div>				</td>				<td class="mid_r"></td>			</tr>			<tr><td class="bottom_l"></td><td class="bottom_c"></td><td class="bottom_r"></td></tr></tbody>		</table>';
    it.popUpMapTip = '<div class="bubble" style="top:20px;left:50px;"></div>';
    return it
})(); (function() {
    var w = window,
    d = document,
    de = document.documentElement || {},
    uni, popUpWindow, popUpWindowHtml = App.mapTemplete.popMapPanel,
    addEvent = Core.Events.addEvent,
    stopEvent = Core.Events.stopEvent;
    
    popUpWindow = (function() {
        var it = {},
        _c;
        it.root = null;
        it.init = function() {
            if (it.root) {
                return it.root
            }
            it.root = $C("div");
            it.root.style.position = "absolute";
            it.root.style.visibility = "hidden";
            it.root.style.zIndex = "2000";
            document.body.appendChild(it.root);
            addEvent(document.body,
            function() {
                it.hidden()
            },
            "mousedown");
            addEvent(window,
            function() {
                it.hidden()
            },
            "resize");
            return it.panel
        };
        it.content = function(content) {
            if (!it.root) {
                it.init()
            }
            if (content && content != _c) {
                _c = it.root.innerHTML = content
            }
        };
        it.show = function(content) {
            setTimeout(function() {
                it.root.style.visibility = "visible"
            },
            10)
        };
        it.hidden = function() {
            it.root.style.visibility = "hidden"
        };
        it.position = function(x, y) {
            it.root.style.left = x + "px";
            it.root.style.top = y + "px"
        };
        return it
    })();
    App.popUpMiniMap = (function() {
        var it = {},
        panel, _p, _c, change = false,
        _ready = false,
        timer, _t = null,
        stopEvent = Core.Events.stopEvent,
        clock, max, min;
        it.info = null;
        it.close = popUpWindow.hidden;
        it.zoomIn = function() {
            stopEvent()
        };
        it.zoomOut = function() {
            stopEvent()
        };
        it.change = function() {};
        it.validateZoom = function(level) {
            $E("zoomOut").className = (level < min) ? "map_zoomOut_no": "map_zoomOut";
            $E("zoomIn").className = (level > max) ? "map_zoomIn_no": "map_zoomIn"
        };
        it.allowZoom = function(zin, zout) {
            $E("zoomOut").className = zin ? "map_zoomOut_no": "map_zoomOut";
            $E("zoomIn").className = zout ? "map_zoomIn_no": "map_zoomIn"
        };
        it.ready = function(map) {
            var lp = $E("popUpMiniMapLoadingPanel");
            lp && (lp.style.display = "none");
            it.zoomIn = function() {
                map.zoomIn();
                stopEvent()
            };
            it.zoomOut = function() {
                map.zoomOut();
                stopEvent()
            };
            it.change = map.change;
            it.change(it.info);
            change = false;
            _ready = true
        };
        it.show = function(el, longitude, latitude, head, internal, address) {
            address = address.replace(/[ ]/g, "&nbsp;");
            clearTimeout(clock);
            clock = setTimeout(function() { (_t !== internal) && (function() {
                    _t = internal;
                    _ready = false,
                    change = true;
                    popUpWindow.content((function() {
                        conf.SRC = (internal == "1" ? "/mblog/map1.php": "/mblog/googlemap.php");
                        max = (internal == "1" ? 16 : 18);
                        min = (internal == "1" ? 4 : 1);
                        return popUpWindowHtml.replace(/#\{(.*?)\}/g,
                        function(h, r) {
                            return conf[r]
                        })
                    })())
                })();
                popUpWindow.show();
                var arrow = $E("popUpMiniMapArrow");
                _p = $E("mini_map_panel");
                it.info = {
                    longitude: longitude,
                    latitude: latitude,
                    head: head,
                    address: address
                };
                var p = Core.Dom.getXY(el);
                var top = window.pageYOffset || Math.max((document.documentElement || {}).scrollTop, document.body.scrollTop);
                var x = (p[0] || 0) - 110;
                var y = Math.max((p[1] || 0) - 270, 0);
                if (scope.$pageid == "mblog") {
                    y = p[1] + 20;
                    var ys = y + 262,
                    wh = (w.innerHeight || ((de && de.clientHeight) ? de.clientHeight: d.body["clientHeight"])) + top;
                    arrow.style.cssText = "left: 120px; background-position: 0px 0px; top:-8px;";
                    popUpWindow.position(x, y);
                    if (ys > wh) {
                        App.scrollTo(top, top + (ys - wh) + 20)
                    }
                } else {
                    arrow.style.backgroundPosition = "0px";
                    arrow.style.bottom = "-8px";
                    arrow.style.cssText = "position:absolute;z-index:1000;left: 120px; background-position: right 0px; bottom: -8px;";
                    popUpWindow.position(x, y);
                    if (y < top) {
                        setTimeout(function() {
                            App.scrollTo(top, y - 20)
                        },
                        10)
                    }
                }
                if (_ready) {
                    it.change(it.info)
                }
            },
            10)
        };
        return it
    })();
    App.bindPopUpMiniMap = function(dom, x, y, type, head, addr, nick) {
        addr = (addr || $CLTMSG.CL0910) + " ";
        dom.innerHTML = ['<img title="', $CLTMSG.CL0909, '" class="small_icon geo_info" src="' + scope.$BASECSS + 'style/images/common/transparent.gif"/>', addr, '- <a href="####" onclick="App.popUpMiniMap.show(this,\'', x, "','", y, "','", head, "','", type, "','", (nick ? nick + " - ": ""), addr, "');return false;\">", $CLTMSG.CL0908, "</a>"].join("")
    }
})(); (function(ns) {
    ns.SimpleJSLoader = function(url, success) {
        var d = document,
        j = d.createElement("script"),
        h = d.getElementsByTagName("head")[0],
        s = false;
        j.type = "text/javascript";
        j.charset = "UTF-8";
        j.src = url;
        j.onload = j.onreadystatechange = function() {
            if (!s && (!this.readyState || this.readyState == "loaded" || this.readyState == "complete")) {
                s = true;
                j.onload = j.onreadystatechange = null;
                typeof success == "function" && success()
            }
        };
        try {
            h.appendChild(j)
        } catch(e) {}
    }
})(App);
$registJob("splitLoadMedia",
function() {
    var $GA = App.getElementsByAttribute,
    _bindApp = function() {
        var oInstance = {},
        hash = {},
        _data = [],
        _doms = [];
        oInstance.data = _data;
        oInstance.plugin = function(type, fMethod) {
            hash[type] = fMethod;
            return oInstance
        };
        oInstance.add = function(id, dom) {
            _data.push(id);
            _doms.push(dom)
        };
        oInstance.exec = function(oElement, sKey, oData) {
            var method; (method = hash[oData.type]) && method(oElement, sKey, oData)
        };
        oInstance.flush = function(json) {
            var i = 0,
            len = _doms.length;
            if (!len) {
                return
            }
            for (i; i < len; i++) {
                if (json[_data[i]]) {
                    try {
                        oInstance.exec(_doms[i], _data[i], json[_data[i]])
                    } catch(e) {}
                    _doms.splice(i, 1);
                    _data.splice(i, 1);
                    i--;
                    len--
                }
            }
        };
        return oInstance
    },
    shortId = function(sValue) {
        return ((sValue = sValue.match(/\/([^\/]+)\/?(<[^<]*)?$/i)) && sValue[1]) || ""
    };
    App.splitLoader.plugin({
        init: function() {
            var imgs = $GA(document.body, "img", "dynamic-src");
            return imgs
        },
        flush: function(doms) {
            if (doms.length) {
                var d, f = arguments.callee,
                d = d = doms.shift(),
                u,
                v;
                if (d && (u = d.getAttribute("dynamic-src"))) {
                    d.src = u;
                    if (d.getAttribute("vimg")) {
                        v = new Image();
                        v.setAttribute("dynamic-src", u.replace(/\/thumbnail\//, "/bmiddle/"));
                        doms.push(v)
                    }
                }
                setTimeout(function() {
                    f(doms)
                },
                0)
            }
        }
    },
    "flushImg").plugin((function() {
        var bind = _bindApp();
        return {
            init: function() {
                var a = $GA(document.body, "a", "mt");
                return a
            },
            extract: function(dom) {
                bind.add(shortId(dom.innerHTML), dom)
            },
            flush: (function() {
                bind.plugin("video", App.bindVideo).plugin("url", App.bindTitle).plugin("magic", App.bindFace);
                return function(d) {
                    var data = {
                        url: bind.data.join(",")
                    };
                    var api = "/mblog/sinaurl_info.php";
                    var fail = function() {};
                    var success = function(json) {
                        bind.flush(json)
                    };
                    App.doRequest(data, api, success, fail, "post")
                }
            })()
        }
    })(), "flushApp").plugin({
        init: function() {
            var a = $GA(document.body, "a", "sm");
            return a
        },
        extract: function(dom) {
            var su = (su = dom.innerHTML.match(/^[^<]*/)) && su[0];
            if (su) {
                App.bindMusic(dom, shortId(su), su)
            }
        }
    },
    "flushMusic").plugin((function() {
        var bind = _bindApp();
        return {
            init: function() {
                var s = $GA(document.body, "strong", "rid");
                return s
            },
            extract: function(dom) {
                bind.add(dom.getAttribute("rid"), dom)
            },
            flush: (function() {
                bind.plugin("count",
                function(dom, sKey, data) {
                    var count, att = dom.getAttribute("type");
                    if (att && (count = parseInt(data[att]))) {
                        dom.innerHTML = ["(", count, ")"].join("")
                    }
                });
                return function(dom) {
                    if (!dom.length || !(/^myprofile|mymblog|profile$/i.test(scope.$pageid))) {
                        return
                    }
                    var data = {
                        mids: bind.data.join(","),
                        oid: scope.$oid
                    };
                    var api = "/mblog/aj_comment.php";
                    var fail = function() {};
                    var success = function(json) {
                        bind.flush(json)
                    };
                    App.doRequest(data, api, success, fail, "post")
                }
            })()
        }
    })(), "flushCommentCount").plugin({
        init: function() {
            var d = $GA(document.body, "strong", "date");
            return d
        },
        extract: function(dom) {
            var num = dom.getAttribute("date") * 1;
            num && (num = App.FormatViewTime(num));
            num && (dom.innerHTML = num)
        }
    },
    "flushTime").plugin({
        init: function() {
            var d = $GA(document.body, "strong", "oid");
            return d
        },
        extract: function(dom) {
            var oid = dom.getAttribute("oid");
            oid && (oid == scope.$uid) && (dom.style.display = "")
        }
    },
    "flushState").plugin({
        init: function() {
            var l = $GA(document.body, "strong", "lang");
            return l
        },
        extract: function(dom) {
            var lang = dom.getAttribute("lang");
            lang && (lang = $CLTMSG[lang]) && (dom.innerHTML = lang)
        }
    },
    "flushLanguage").plugin((function() {
        var xys = [],
        doms = [],
        heads = [],
        ginfo = {},
        con = 0;
        App.bindGeo = function(json) {
            var key, info, xy;
            for (key in json) {
                if (info = ginfo[key]) {
                    xy = info.geo.split(",");
                    App.bindPopUpMiniMap(info.dom, xy[0], xy[1], json[key].type, info.head, json[key].addr, info.nick)
                }
            }
        };
        return {
            init: function() {
                var p = $GA(document.body, "p", "geo");
                return p
            },
            extract: function(dom) {
                var geo = dom.getAttribute("geo"),
                head = dom.getAttribute("head"),
                nick = dom.getAttribute("nick") || "";
                var id = ["g", con++].join("");
                ginfo[id] = {
                    dom: dom,
                    head: head,
                    geo: geo,
                    nick: nick
                };
                xys.push([geo, id].join(","))
            },
            flush: function(dom) {
                if (!xys.length) {
                    return
                }
                var api = ["http://api.map.sina.com.cn/i/xyInChina_mul.php?xy=", xys.join("|"), "&rnd=", new Date().getTime().toString(32), Math.floor(Math.random() * 1000).toString(32)].join("");
                xys = [];
                App.SimpleJSLoader(api)
            }
        }
    })(), "flushMap");
    App.bindMedia = function(oElement) {
        var m, a, i, c, t, d, l, g; (i = $GA(oElement, "img", "dynamic-src")) && i.length && App.flushImg.flush(i); (a = $GA(oElement, "a", "mt")) && a.length && App.flushApp.flush(a); (m = $GA(oElement, "a", "sm")) && m.length && App.flushMusic.flush(m); (c = $GA(oElement, "strong", "rid")) && c.length && App.flushCommentCount.flush(c); (t = $GA(oElement, "strong", "date")) && t.length && App.flushTime.flush(t); (d = $GA(oElement, "strong", "oid")) && d.length && App.flushState.flush(d); (l = $GA(oElement, "strong", "lang")) && l.length && App.flushLanguage.flush(l); (g = $GA(oElement, "p", "geo")) && g.length && App.flushMap.flush(g)
    }
});
scope.langList = function(el) {
    scope.switchLanguage(el.value)
};
scope.langList1 = function(el) {
    scope.switchLanguage(el.value)
};
scope.switchLanguage = function(lang) {
    var language = scope.$lang === "zh" ? "zh-cn": scope.$lang;
    if (language === lang) {
        return
    }
    App.confirm($CLTMSG.CD0150, {
        icon: 4,
        width: 360,
        ok: function() {
            Utils.Io.Ajax.request("/person/aj_select_lang.php", {
                onComplete: function(oResult) {
                    if (oResult.code === "A00006") {
                        window.location.reload(true)
                    }
                    if (oResult.code === "M00003") {
                        return App.ModLogin(null, $CLTMSG.CD0058)
                    }
                },
                onException: function(e) {},
                returnType: "json",
                POST: {
                    uid: scope.$uid,
                    lang: lang
                }
            })
        },
        cancel: function() {
            $E("lang_select").value = language
        }
    })
};
$registJob("start_suda",
function() {
    try {
        setTimeout(GB_SUDA._S_pSt, 2000)
    } catch(e) {}
});
var SSL = {
    Config: {},
    Space: function(str) {
        var a = str,
        o = null;
        a = a.split(".");
        o = SSL;
        for (i = 0, len = a.length; i < len; i++) {
            o[a[i]] = o[a[i]] || {};
            o = o[a[i]]
        }
        return o
    }
};
SSL.Space("Global");
SSL.Space("Core.Dom");
SSL.Space("Core.Event");
SSL.Space("App");
SSL.Global = {
    win: window || {},
    doc: document,
    nav: navigator,
    loc: location
};
SSL.Core.Dom = {
    get: function(id) {
        return document.getElementById(id)
    }
};
SSL.Core.Event = {
    on: function() {}
};
SSL.App = {
    _S_gConType: function() {
        var ct = "";
        try {
            SSL.Global.doc.body.addBehavior("#default#clientCaps");
            ct = SSL.Global.doc.body.connectionType
        } catch(e) {
            ct = "unkown"
        }
        return ct
    },
    _S_gKeyV: function(src, k, e, sp) {
        if (src == "") {
            return ""
        }
        if (sp == "") {
            sp = "="
        }
        k = k + sp;
        var ps = src.indexOf(k);
        if (ps < 0) {
            return ""
        }
        ps = ps + k.length;
        var pe = src.indexOf(e, ps);
        if (pe < ps) {
            pe = src.length
        }
        return src.substring(ps, pe)
    },
    _S_gUCk: function(ckName) {
        if ((undefined == ckName) || ("" == ckName)) {
            return ""
        }
        return SSL.App._S_gKeyV(SSL.Global.doc.cookie, ckName, ";", "")
    },
    _S_sUCk: function(ckName, ckValue, ckDays, ckDomain) {
        if (ckValue != null) {
            if ((undefined == ckDomain) || (null == ckDomain)) {
                ckDomain = "sina.com.cn"
            }
            if ((undefined == ckDays) || (null == ckDays) || ("" == ckDays)) {
                SSL.Global.doc.cookie = ckName + "=" + ckValue + ";domain=" + ckDomain + ";path=/"
            } else {
                var now = new Date();
                var time = now.getTime();
                time = time + 86400000 * ckDays;
                now.setTime(time);
                time = now.getTime();
                SSL.Global.doc.cookie = ckName + "=" + ckValue + ";domain=" + ckDomain + ";expires=" + now.toUTCString() + ";path=/"
            }
        }
    },
    _S_gJVer: function(_S_NAV_, _S_NAN_) {
        var p, appsign, appver, jsver = 1,
        isN6 = 0;
        if ("MSIE" == _S_NAN_) {
            appsign = "MSIE";
            p = _S_NAV_.indexOf(appsign);
            if (p >= 0) {
                appver = parseInt(_S_NAV_.substring(p + 5));
                if (3 <= appver) {
                    jsver = 1.1;
                    if (4 <= appver) {
                        jsver = 1.3
                    }
                }
            }
        } else {
            if (("Netscape" == _S_NAN_) || ("Opera" == _S_NAN_) || ("Mozilla" == _S_NAN_)) {
                jsver = 1.3;
                appsign = "Netscape6";
                p = _S_NAV_.indexOf(appsign);
                if (p >= 0) {
                    jsver = 1.5
                }
            }
        }
        return jsver
    },
    _S_gFVer: function(nav) {
        var ua = SSL.Global.nav.userAgent.toLowerCase();
        var flash_version = 0;
        if (SSL.Global.nav.plugins && SSL.Global.nav.plugins.length) {
            var p = SSL.Global.nav.plugins["Shockwave Flash"];
            if (typeof p == "object") {
                for (var i = 10; i >= 3; i--) {
                    if (p.description && p.description.indexOf(" " + i + ".") != -1) {
                        flash_version = i;
                        break
                    }
                }
            }
        } else {
            if (ua.indexOf("msie") != -1 && ua.indexOf("win") != -1 && parseInt(SSL.Global.nav.appVersion) >= 4 && ua.indexOf("16bit") == -1) {
                for (var i = 10; i >= 2; i--) {
                    try {
                        var object = eval("new ActiveXObject('ShockwaveFlash.ShockwaveFlash." + i + "');");
                        if (object) {
                            flash_version = i;
                            break
                        }
                    } catch(e) {}
                }
            } else {
                if (ua.indexOf("webtv/2.5") != -1) {
                    flash_version = 3
                } else {
                    if (ua.indexOf("webtv") != -1) {
                        flash_version = 2
                    }
                }
            }
        }
        return flash_version
    },
    _S_gMeta: function(MName, pidx) {
        var pMeta = SSL.Global.doc.getElementsByName(MName);
        var idx = 0;
        if (pidx > 0) {
            idx = pidx
        }
        return (pMeta.length > idx) ? pMeta[idx].content: ""
    },
    _S_gHost: function(sUrl) {
        var r = new RegExp("^http(?:s)?://([^/]+)", "im");
        if (sUrl.match(r)) {
            return sUrl.match(r)[1].toString()
        } else {
            return ""
        }
    },
    _S_gDomain: function(sHost) {
        var p = sHost.indexOf(".sina.");
        if (p > 0) {
            return sHost.substr(0, p)
        } else {
            return sHost
        }
    },
    _S_gTJMTMeta: function() {
        return SSL.App._S_gMeta("mediaid")
    },
    _S_gTJZTMeta: function() {
        var zt = SSL.App._S_gMeta("subjectid");
        zt.replace(",", ".");
        zt.replace(";", ",");
        return zt
    },
    _S_isFreshMeta: function() {
        var ph = SSL.Global.doc.documentElement.innerHTML.substring(0, 1024);
        var reg = new RegExp("<meta\\s*http-equiv\\s*=((\\s*refresh\\s*)|('refresh')|(\"refresh\"))s*contents*=", "ig");
        return reg.test(ph)
    },
    _S_isIFrameSelf: function(minH, minW) {
        if (SSL.Global.win.top == SSL.Global.win) {
            return false
        } else {
            try {
                if (SSL.Global.doc.body.clientHeight == 0) {
                    return false
                }
                if ((SSL.Global.doc.body.clientHeight >= minH) && (SSL.Global.doc.body.clientWidth >= minW)) {
                    return false
                } else {
                    return true
                }
            } catch(e) {
                return true
            }
        }
    },
    _S_isHome: function(curl) {
        var isH = "";
        try {
            SSL.Global.doc.body.addBehavior("#default#homePage");
            isH = SSL.Global.doc.body.isHomePage(curl) ? "Y": "N"
        } catch(e) {
            isH = "unkown"
        }
        return isH
    }
};
function SUDA(config, ext1, ext2) {
    var SG = SSL.Global,
    SSD = SSL.Core.Dom,
    SSE = SSL.Core.Event,
    SA = SSL.App;
    var _S_JV_ = "webbug_meta_ref_mod_noiframe_async_fc_:9.10c",
    _S_DPID_ = "-9999-0-0-1";
    var _S_NAN_ = SG.nav.appName.indexOf("Microsoft Internet Explorer") > -1 ? "MSIE": SG.nav.appName;
    var _S_NAV_ = SG.nav.appVersion;
    var _S_PURL_ = SG.loc.href.toLowerCase();
    var _S_PREF_ = SG.doc.referrer.toLowerCase();
    var _SP_MPID_ = "";
    var _S_PID_ = "",
    _S_UNA_ = "SUP",
    _S_MI_ = "",
    _S_SID_ = "Apache",
    _S_GID_ = "SINAGLOBAL",
    _S_LV_ = "ULV",
    _S_UO_ = "UOR",
    _S_UPA_ = "_s_upa",
    _S_IFW = 320,
    _S_IFH = 240,
    _S_GIDT = 0,
    _S_EXT1 = "",
    _S_EXT2 = "",
    _S_SMC = 0,
    _S_SMM = 10000,
    _S_ET = 0,
    _S_ACC_ = "_s_acc";
    var _S_HTTP = _S_PURL_.indexOf("https") > -1 ? "https://": "http://",
    _S_CP_FC = _S_HTTP  + "";
    var _S_T1 = 100,
    _S_T2 = 500;
    var _S_TEntry = "_s_tentry";
    return {
        _S_pSt: function(pid, ext1, ext2) {
            try {
                if ((SA._S_isFreshMeta()) || (SA._S_isIFrameSelf(_S_IFH, _S_IFW))) {
                    return
                }
                if (_S_ET > 0) {
                    return
                }++_S_ET;
                setTimeout(function() {
                  
                },
                _S_T1);
                setTimeout(function() {
                    
                },
                _S_T2)
            } catch(e) {}
        },
        _S_pStM: function(pid, ext1, ext2) {++_S_ET;
            handler._S_pBeacon(pid, ((undefined == ext1) ? handler._S_upExt1() : ext1), ext2)
        },
        _S_acTrack: function(eid, p) {
            try {
                if ((undefined != eid) && ("" != eid)) {
                    setTimeout(function() {
                        handler._S_acTrack_i(eid, p)
                    },
                    _S_T1)
                }
            } catch(e) {}
        },
        _S_uaTrack: function(acode, aext) {
            try {
                if (undefined == acode) {
                    acode = ""
                }
                if (undefined == aext) {
                    aext = ""
                }
                if (("" != acode) || ("" != aext)) {
                    setTimeout(function() {
                        handler._S_uaTrack_i(acode, aext)
                    },
                    _S_T1)
                }
            } catch(e) {}
        }
    }
}
var GB_SUDA;
if (GB_SUDA == null) {
    GB_SUDA = new SUDA({})
}
var _S_PID_ = "";
function _S_pSt(pid, ext1, ext2) {
    GB_SUDA._S_pSt(pid, ext1, ext2)
}
function _S_pStM(pid, ext1, ext2) {
    GB_SUDA._S_pStM(pid, ext1, ext2)
}
function _S_acTrack(eid) {
    GB_SUDA._S_acTrack(eid, 1)
}
function _S_uaTrack(acode, aext) {
    GB_SUDA._S_uaTrack(acode, aext)
}
$registJob("unlogin_cache",
function() {});
function main() {
    var jobs = new Jobs();
    jobs.add("splitLoadMedia");
    jobs.add("login3");
    jobs.add("set_password");
    jobs.add("init_input");
    jobs.add("highLightLi");
    jobs.add("marquee");
    jobs.add("topicmarquee");
    jobs.add("start_suda");
    jobs.add("unlogin_cache");
    jobs.start()
};
