var uJifen, is2345 = false,
lc, isIE =
/*@cc_on!@*/
! 1,
isIE6 = isIE && /msie 6/.test(navigator.userAgent.toLowerCase());
try {
    if (top.location == self.location) {
        is2345 = true
    }
} catch(e) {}; (function() {
    var a = navigator.userAgent.toLowerCase(),
    placeholder = $('sh_hd');
    if (/ipad/i.test(a)) {
        document.title = '网址大全';
        placeholder.className = 'fred';
        placeholder.innerHTML = '<img src="/images/ipadhome.png" style="vertical-align:middle;margin-bottom:4px">访问iPad专版';
        placeholder.onclick = function() {
            location.href = 'http://www.2345m.com/?s1'
        };
        if (!$('J_ipad_d1')) {
            return
        }
        var b = $('J_ipad_d1');
        b.innerHTML = '浏览器HD';
        b.href = 'https://itunes.apple.com/us/app/2345liu-lan-qihd/id563833448?mt=8';
        return
    }
    if (/(iPhone|iPod|Android|BlackBerry|Symbian|Windows CE)/i.test(a)) {
        placeholder.className = 'fred';
        placeholder.innerHTML = '<img src="/images/phonehome.png" style="vertical-align:middle;margin-bottom:4px;">访问手机版';
        placeholder.onclick = function() {
            location.href = 'http://www.2345m.com/'
        }
    }
} ());
T.throttle = function(b, c) {
    var d = 0;
    return function() {
        var a = +new Date();
        if (a - d < c) {
            return
        }
        d = a;
        b.apply(this, arguments)
    }
};
T.addEvent = function(a, b, c) {
    if (a.attachEvent) {
        a.attachEvent && a.attachEvent('on' + b, c)
    } else {
        a.addEventListener(b, c, false)
    }
};
T.removeEvent = function(a, b, c) {
    if (a.detachEvent) {
        a.detachEvent && a.detachEvent('on' + b, c)
    } else {
        a.removeEventListener(b, c, false)
    }
};
T.datalazyload = {
    'offset': 100,
    'evalScripts': function(a) {
        var b = document.getElementsByTagName("head")[0],
        js = document.createElement("script");
        js.text = a;
        b.insertBefore(js, b.firstChild);
        b.removeChild(js)
    },
    'extractScripts': function(a) {
        var b = '<script[^>]*>([\\S\\s]*?)<\/script\\s*>',
        matchAll = new RegExp(b, 'img'),
        matchOne = new RegExp(b, 'im'),
        matchResults = a.match(matchAll) || [],
        ret = [];
        for (var i = 0,
        len = matchResults.length; i < len; i++) {
            var c = (matchResults[i].match(matchOne) || ['', ''])[1];
            if (c) {
                ret.push(c)
            }
        }
        return ret
    },
    'getY': function(a) {
        var b = a.offsetTop;
        while (a = a.offsetParent) {
            b += a.offsetTop
        }
        return b
    },
    'getWinHeight': function() {
        var a = document,
        html = a.documentElement,
        bd = a.body;
        return self.innerHeight || html && html.clientHeight || bd.clientHeight
    },
    'getScrollHeight': function() {
        if (is2345) {
            var a = document,
            html = a.documentElement,
            bd = a.body;
            return Math.max(window.pageYOffset || 0, html.scrollTop, bd.scrollTop)
        } else {
            return 2000
        }
    },
    'decodeHTML': function(a) {
        return a.replace(/&lt;/g, '<').replace(/&gt;/g, '>').replace(/&amp;/g, '&')
    },
    'insert': function(a) {
        var b = $c('DIV'),
        txt = this.decodeHTML(a.innerHTML),
        matchScripts = this.extractScripts(txt);
        b.innerHTML = txt.replace(/<script[^>]*>([\\S\\s]*?)<\/script\\s*>/img, '');
        a.parentNode.replaceChild(b, a);
        if (matchScripts) {
            for (var i = 0,
            len = matchScripts.length; i < len; i++) {
                this.evalScripts(matchScripts[i])
            }
        }
    },
    'trigger': function() {
        var i = 0,
        len = this.els.length;
        if (len <= 0) {
            T.removeEvent(window, 'scroll', this.handler);
            T.removeEvent(window, 'resize', this.handler);
            T.removeEvent(document.body, 'touchMove', this.handler);
            return
        }
        try {
            for (; i < len; i++) {
                if (this.getScrollHeight() + this.getWinHeight() + this.offset >= this.getY(this.els[i])) {
                    this.insert(this.els[i]);
                    this.els.splice(i, 1)
                }
            }
        } catch(e) {
            T.removeEvent(window, 'scroll', this.handler);
            T.removeEvent(window, 'resize', this.handler);
            T.removeEvent(document.body, 'touchMove', this.handler);
            this.init('datalazyload')
        }
    },
    'init': function(a) {
        var b = this;
        this.els = document.getElementsByClassName ? [].slice.call(document.getElementsByClassName(a), 0) : $cls(a);
        this.handler = function() {
            b.trigger.call(b)
        };
        this.handler();
        T.addEvent(window, 'scroll', this.handler);
        T.addEvent(window, 'resize', this.handler);
        T.addEvent(document.body, 'touchMove', this.handler)
    }
};
T.ready(function() {
    T.datalazyload.init('datalazyload')
});
function showWeather() {
    var a = g_cookie('wc'),
    url = 'http://tianqi.2345.com/t/detect2009v2.php';
    if ( + ('' + a) > 0) {
        url = 'http://www.2345.com/t/top_tq_js/' + a + '.js'
    }
    T.getScript(url)
}
showWeather();
function weaCallBack(b) {
    var b = b,
    _arg = arguments,
    _wc = _arg[1],
    _lc = _arg[2],
    _time = new Date().getHours(),
    _min = new Date().getMinutes();
    if (_arg.length > 1) {
        s_cookie("wc", _wc);
        s_cookie("lc", _lc)
    }
    s_cookie({
        store: "cookie"
    },
    "wc", b.id);
    s_cookie({
        store: "cookie"
    },
    "wc_n", escape(b.city));
    var c = '<span class="ct ct_middle" id="J_ct_wideScreen"><b id="J_ct_b"><a onclick="this.blur();clickCount("tianqi_city_w");" target="_blank" nowrap="true" href="http://tianqi.2345.com/#city_pinyin#/#id#.htm" title="点击查看#has15day#">#city#</a></b><a target="_self" href="javascript:void(0);" onclick="clickCount(\'tianqi_set\');dispalyDiv(\'top_weather\',\'city_wea_set\');" title="切换" id="J_city_switch" style="display:block;">[切换]</a> <a class="air_qlt" id="J_air_qlt" style="display:none" href="http://tianqi.2345.com/air-#id#.htm" title="点击查看空气质量详情"></a></span><dl onclick="clickCount(\'tianqi_weather_w\')"><dd><a href="http://tianqi.2345.com/#city_pinyin#/#id#.htm" title="点击查看#has15day#" ><span class="w#i1#_l"></span>#timeScale#<br>#t1#<ins id="J_todayWea">#d1#</ins></a><a href="javascript:void(0);"  id="J_day1" class="warning" style="display:none;"></a></dd><dd><a href="http://tianqi.2345.com/#city_pinyin#/#id#.htm" title="点击查看#has15day#"><span class="w#i2#_l"></span>明天<br>#t2#<ins>#d2#</ins></a></dd><dd><a href="http://tianqi.2345.com/#city_pinyin#/#id#.htm" title="点击查看#has15day#"><span class="w#i3#_l"></span>后天<br>#t3#<ins>#has15day#</ins></a></dd></dd><dd class="wea_more"><a onclick="clickCount(\'wea_more\');" title="点击查看#has15day#" href="http://tianqi.2345.com/#city_pinyin#/#id#.htm" id="wea_more" ></a></dd></dl>';
    b.id == 0 && (c = c.replace(/href="[^"]+"/gi,
    function() {
        return "href=\"\""
    }).replace(/target="_blank"/gi, "target=\"self\" onclick=\"return false\"").replace(/<span/gi, "<span style=\"display:none\"").replace("<h3>七日天气</h3>", "天气数据载入失败!"));
    $("top_weather").innerHTML = c.replace(/#([^#]+)#/gi,
    function() {
        var a = arguments;
        switch (a[1]) {
        case "id":
            return b.id;
        case "title":
            return b.title;
        case "city":
            return b.city;
        case "city_pinyin":
            return b.pinyin;
        case "t1":
            return b.day1[0];
        case "t2":
            return b.day2[0];
        case "t3":
            return b.day3[0];
        case "d1":
            return b.day1[2];
        case "d2":
            return b.day2[2];
        case "d3":

            return b.day3[2];
        case "week1":
            return b.day1[1];
        case "week2":
            return b.day2[1];
        case "week3":
            return b.day3[1];
        case "has15day":
            return b.has15day ? '15天天气': '七日天气';
        case "i1":
            return b.day1[4] + ((_time < b.rc[0] || (_time == b.rc[0] && _min < b.rc[1]) || (_time == b.rl[0] && _min > b.rl[1]) || _time > b.rl[0]) ? '_l wnt': '');
        case "i2":
            return b.day2[4];
        case "i3":
            return b.day3[4];
        case "timeScale":
            return (_time < b.rc[0] || (_time == b.rc[0] && _min < b.rc[1])) ? '凌晨': ((_time == b.rl[0] && _min > b.rl[1]) || _time > b.rl[0]) ? '今晚': '今天';
        default:
        }
    });
    if ($CONFIG['wideScreen']) {
        $('J_city_switch').style.display = 'inline'
    } else {
        $('J_ct_wideScreen').className = 'ct'
    }
    var d = g_cookie("wc");
    if (!d) {
        b.id > 0 && s_cookie("wc", b.id)
    }
}
function weaAlertCallBack(a) {
    var b = $('J_day1');
    if (! (b && a && a.title)) {
        return
    }
    b.innerHTML = a.title;
    b.href = 'http://tianqi.2345.com/t/shikuang/alert/' + a.url;
    b.title = "点击查看预警详情";
    $('J_todayWea').style.display = 'none';
    b.style.display = ''
}
function weaAirCallBack(a) {
    if (a && a.aqi) {
        var b = [['空气质量:<ins class="air_you"></ins>', 0], ['空气质量:<ins class="air_liang"></ins>', 50], ['空气污染:<ins class="air_qing"></ins>', 100], ['空气污染:<ins class="air_zhong1"></ins>', 150], ['空气污染:<ins class="air_zhong2"></ins>', 200], ['空气污染:<ins class="air_zhong3"></ins>', 300]],
        aqi = a.aqi,
        i = b.length,
        result;
        for (; i--;) {
            if (aqi > 　b[i][1]) {
                result = b[i][0];
                break
            }
        }
        $('J_air_qlt').innerHTML = result;
        $('J_air_qlt').style.display = '';
        $('J_city_switch').style.display = 'inline';
        $('J_day1').className = '';
        $('J_ct_wideScreen').className = 'ct'
    }
}
T.lunar = (function() {
    var b = 'ezc|esg|wog|gr9|15k0|16xc|1yl0|h40|ukw|gya|esg|wqe|wk0|15jk|2k45|zsw|16e8|yaq|tkg|1t2v|ei8|wj4|zp1|l00|lkw|2ces|8kg|tio|gdu|ei8|k12|1600|1aa8|lud|hxs|8kg|257n|t0g|2i8n|13rk|1600|2ld2|ztc|h40|2bas|7gw|t00|15ma|xg0|ztj|lgg|ztc|1v11|fc0|wr4|1sab|gcw|xig|1a34|l28|yhy|xu8|ew0|xr8|wog|g9s|1bvn|16xc|i1j|h40|tsg|fdh|es0|wk0|161g|15jk|1654|zsw|zvk|284m|tkg|ek0|xh0|wj4|z96|l00|lkw|yme|xuo|tio|et1|ei8|jw0|n1f|1aa8|l7c|gxs|xuo|tsl|t0g|13s0|16xg|1600|174g|n6a|h40|xx3|7gw|t00|141h|xg0|zog|10v8|y8g|gyh|exs|wq8|1unq|gc0|xf4|nys|l28|y8g|i1e|ew0|wyu|wkg|15k0|1aat|1640|hwg|nfn|tsg|ezb|es0|wk0|2jsm|15jk|163k|17ph|zvk|h5c|gxe|ek0|won|wj4|xn4|2dsl|lk0|yao'.split('|'),
    jqData = {
        '2013': {
            "2-4": "立春",
            "2-18": "雨水",
            "3-5": "惊蛰",
            "3-20": "春分",
            "4-4": "清明",
            "4-20": "谷雨",
            "5-5": "立夏",
            "5-21": "小满",
            "6-5": "芒种",
            "6-21": "夏至",
            "7-7": "小暑",
            "7-22": "大暑",
            "8-7": "立秋",
            "8-23": "处暑",
            "9-7": "白露",
            "9-23": "秋分",
            "10-8": "寒露",
            "10-23": "霜降",
            "11-7": "立冬",
            "11-22": "小雪",
            "12-7": "大雪",
            "12-21": "冬至",
            "1-5": "小寒",
            "1-20": "大寒"
        },
        '2014': {
            "2-4": "立春",
            "2-19": "雨水",
            "3-5": "惊蛰",
            "3-21": "春分",
            "4-5": "清明",
            "4-20": "谷雨",
            "5-5": "立夏",
            "5-21": "小满",
            "6-6": "芒种",
            "6-21": "夏至",
            "7-7": "小暑",
            "7-23": "大暑",
            "8-7": "立秋",
            "8-23": "处暑",
            "9-8": "白露",
            "9-23": "秋分",
            "10-8": "寒露",
            "10-23": "霜降",
            "11-7": "立冬",
            "11-22": "小雪",
            "12-7": "大雪",
            "12-22": "冬至",
            "1-5": "小寒",
            "1-20": "大寒"
        }
    },
    festivals = {
        "1-1": "元旦",
        "2-14": "情人节",
        "3-8": "妇女节",
        "3-12": "植树节",
        "4-1": "愚人节",
        "5-1": "劳动节",
        "5-4": "青年节",
        "5-12": "母亲节",
        "6-1": "儿童节",
        "6-16": "父亲节",
        "7-1": "中共诞辰",
        "8-1": "建军节",
        "9-10": "教师节",
        "10-1": "国庆节",
        "11-1": "万圣节",
        "11-8": "记者日",
        "12-24": "平安夜",
        "12-25": "圣诞节"
    },
    tradFestivals = {
        "1-1": "春节",
        "1-15": "元宵节",
        "5-5": "端午节",
        "7-7": "七夕",
        "7-15": "中元节",
        "8-15": "中秋节",
        "9-9": "重阳节",
        "12-8": "腊八节",
        "12-23": "小年",
        "12-29": "除夕"
    },
    c1 = ['', '一', '二', '三', '四', '五', '六', '七', '八', '九', '十'],
    c2 = ['初', '十', '廿', '卅', ''],
    _date = new Date(),
    M = _date.getMonth() + 1,
    D = _date.getDate(),
    Y = _date.getFullYear(),
    getFeast = function(t, m, d) {
        t = t || jqData['2013'];
        return t[m + '-' + d] || ''
    },
    getMonth = function(y) {
        return b[y - 1900] & 0xf
    },
    getDayCount = function(y) {
        for (var i = 0x8000,
        sum = 348; i > 0x8; i >>= 1) sum += (b[y - 1900] & i) ? 1 : 0;
        return sum + getDayCount2(y)
    },
    getDayCount2 = function(y) {
        return getMonth(y) ? ((b[y - 1900] & 0x10000) ? 30 : 29) : 0
    },
    getDayCount3 = function(y, m) {
        return b[y - 1900] & (0x10000 >> m) ? 30 : 29
    },
    get = function(y, m, d) {
        var f = getFeast(tradFestivals, m, d),
        m = ((m > 9 ? '十': '') + c1[m % 10]).replace('十二', '腊').replace(/^一/, '正') + '月',
        d = {
            '10': '初十',
            '20': '二十',
            '30': '三十'
        } [d] || (c2[Math.floor(d / 10)] + c1[d % 10]);
        return {
            cm: m,
            cd: d,
            f: f
        }
    };
    for (var i = b.length; i--;) {
        b[i] = parseInt(b[i], 36)
    }
    var m = M,
    temp = 0,
    gf = getFeast(festivals, M, D);
    var c = new Date(Y, M - 1, D),
    d = Math.ceil((c - new Date(1900, 0, 31)) / 86400000);
    for (m = 1900; m < 2050 && d > 0; m++) {
        temp = getDayCount(m);
        d -= temp
    };
    if (d < 0) {
        d += temp,
        m--
    };
    var e = m,
    leap = getMonth(m),
    isleap = false;
    for (m = 1; m < 13 && d > 0; m++) {
        if (leap > 0 && m == (leap + 1) && isleap == false) {--m;
            isleap = true;
            temp = getDayCount2(e)
        } else {
            temp = getDayCount3(e, m)
        };
        if (isleap == true && m == (leap + 1)) isleap = false;
        d -= temp
    };
    if (d == 0 && leap > 0 && m == leap + 1 && !isleap)--m;
    if (d < 0) {
        d += temp; --m
    };
    var y = Y - (M < m ? 1 : 0);
    var o = get(y, m, d + 1, isleap);
    if (m == 12 && getDayCount3(y, 12) == d + 1) o.f = '除夕';
    if (gf != '' && o.f == '') o.f = gf;
    if (isleap) o.cm = '闰' + o.cm;
    o['jq'] = getFeast(jqData[Y] || jqData['2012'], M, D);
    o['y'] = Y;
    o['m'] = M;
    o['d'] = D;
    o['w'] = '日一二三四五六'.charAt(c.getDay());
    o['toString'] = function() {
        var a = ['<a href="http://qq.ip138.com/day/">' + this.m + '月' + this.d + '日&nbsp;&nbsp;'];
        this.f ? a.push('<span class="fred">&nbsp;' + this.f) : this.jq ? a.push('<span class="fred">&nbsp;' + this.jq) : a.push('<span>周' + this.w);
        a.push('</span><br /></a><a href="http://qq.ip138.com/day/">');
        a.push(this.cm + this.cd);
        a.push('</a>&nbsp;&nbsp;&nbsp;<a  class="wnl" href="http://astro.sina.com.cn/">星座</a>');
        return a.join('')
    };
    return o
} ());
$('rili').innerHTML = T.lunar;
T.everyday = {
    'defaultVal': '每日一乐：笑话妙语大全',
    'flag': false,
    'pad': function(n) {
        return n < 10 ? '0' + n.toString(10) : n.toString(10)
    },
    'init': function() {
        var d = new Date(),
        d2s = d.getFullYear() + this.pad(d.getMonth() + 1) + this.pad(d.getDate()),
        url = 'http://www.2345.com/day_data/' + d2s + '.js';
        window.mystyle = {
            everyday: {
                data: {
                    'title': this.defaultVal
                }
            }
        };
        T.getScript(url, {
            callback: function() {
                $('mryl').innerHTML = mystyle.everyday.data.title;
                T.everyday.flag = true
            }
        });
        bindEvent(window, 'load',
        function() {
            T.everyday.flag || ($('mryl').innerHTML = '每日一乐：笑话妙语大全')
        })
    }
};
T.everyday.init();
T.email = {
    'emailName': $('J_emailName'),
    'emailPW': $('J_emailPW'),
    'emailLabel': $('J_emailLabel'),
    'hidden': $('gomail').domainss,
    'select': $('J_select'),
    'trigger': $t('P', $('J_select'))[0],
    'list': $t('UL', $('J_select'))[0],
    'onColor': 'black',
    'offColor': '#b4b4b4',
    'clearText': function(e) {
        var a = T.email,
        e = e || event;
        if (e.type === 'blur' && this.value.trim() === '') {
            this.value = this.defaultValue;
            this.style.color = a.offColor
        }
        if (e.type === 'focus') {
            this.style.color = a.onColor;
            if (this.defaultValue == this.value.trim()) {
                this.value = ''
            }
        }
    },
    'clearPassword': function(e) {
        var a = T.email,
        label = a.emailLabel,
        e = e || event,
        style = label.style;
        if (e.type === 'focus') {
            this.style.color = a.onColor;
            if (style.display !== 'none') {
                style.display = 'none'
            }
        }
        if (e.type === 'blur' && this.value.trim() === '') {
            style.display = ''
        }
    },
    'hide': function() {
        this.select.style.zIndex = 0;
        this.list.style.display = 'none'
    },
    'open': function(a, b) {
        this.trigger.innerHTML = '请选择邮箱';
        this.hide();
        this.hidden.value = this.hidden.title = '';
        if (b !== 'moreEmail') {
            if (!a.className) {
                a.className = 'fred'
            }
            var c = localStorage.getItem('emailOptionColor') || '';
            if (c.indexOf(b) === -1) {
                c = c + b + '|';
                localStorage.setItem('emailOptionColor', c)
            }
        }
        clickCount('mail' + b)
    },
    'noOpen': function(a) {
        this.trigger.innerHTML = a.innerHTML;
        this.hide();
        this.hidden.value = a.getAttribute('data-value').split('$')[0];
        this.hidden.title = a.getAttribute('data-value').split('$')[1]
    },
    'check': function() {
        function setVal(a, b) {
            var c = $("__" + a);
            if (!c) {
                c = $c("INPUT");
                c.type = "hidden";
                c.id = "__" + a;
                $("J_emailHidden").appendChild(c)
            }
            c.name = a;
            c.value = b
        }
        function cMail() {
            s_cookie('mail_index', $("gomail").domainss.title);
            localStorage.setItem('mUser', $('J_emailName').value);
            $('J_emailPW').value = ""
        }
        var d = $("gomail"),
        vDomain = d.domainss,
        vName = d.uName,
        vPw = d.uPw;
        if (vDomain.value.trim() === '') {
            alert("请选择您的邮箱...");
            return false
        }
        if (vName.value.trim() === '' || vName.value === '邮箱帐号') {
            alert("请填写您的用户名...");
            vName.focus();
            return false
        }
        if (vPw.value.trim() === '') {
            alert("请填写您的密码...");
            vPw.focus();
            return false
        }
        $('J_emailHidden').innerHTML = '';
        if ($CONFIG['wideScreen'] == '1') {
            clickCount("mail_w" + vDomain.value)
        } else {
            clickCount("mail" + vDomain.value)
        }
        if (vDomain.value != "baidu" && vDomain.value != "51" && vDomain.value != "xn" && vDomain.value != "sinaminiblog") {
            if (/^[_\.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]+\.)+[a-zA-Z]{2,4}$/.test(vName.value)) {
                var e = vName.value.substr(vName.value.lastIndexOf('@'));
                switch (e) {
                case "@163.com":
                    if (vDomain.value != "163") {
                        window.open("http://mail.163.com/");
                        return false
                    }
                    break;
                case "@126.com":
                    if (vDomain.value != "126") {
                        window.open("http://mail.126.com/");
                        return false
                    }
                    break;
                case "@sina.com":
                    if (vDomain.value != "sina") {
                        window.open("http://mail.sina.com.cn/");
                        return false
                    }
                    break;
                case "@sohu.com":
                    if (vDomain.value != "sohu") {
                        window.open("http://mail.sohu.com/");
                        return false
                    }
                    break;
                case "@yahoo.com.cn":
                    if (vDomain.value != "yahoo") {
                        window.open("http://mail.cn.yahoo.com/");
                        return false
                    }
                    break;
                case "@yahoo.cn":
                    if (vDomain.value != "yahoocn") {
                        window.open("http://mail.cn.yahoo.com/");
                        return false
                    }
                    break;
                case "@tom.com":
                    if (vDomain.value != "tom") {
                        window.open("http://mail.tom.com/");
                        return false
                    }
                    break;
                case "@21cn.com":
                    if (vDomain.value != "21cn") {
                        window.open("http://mail.21cn.com/");
                        return false
                    }
                    break;
                case "@yeah.net":
                    if (vDomain.value != "yeah") {
                        window.open("http://mail.yeah.net/");
                        return false
                    }
                    break;
                case "@139.com":
                    if (vDomain.value != "139") {
                        window.open("http://mail.10086.cn/");
                        return false
                    }
                    break
                }
            }
        }
        switch (vDomain.value) {
        case "163":
            d.action = "http://reg.163.com/CheckUser.jsp";
            setVal("url", "http://entry.mail.163.com/coremail/fcg/ntesdoor2?lightweight=1&verifycookie=1&language=-1&style=15");
            if (vName.value.slice(vName.value.lastIndexOf('@')) == '@163.com') {
                setVal("username", vName.value)
            } else {
                setVal("username", vName.value + "@163.com")
            }
            setVal("password", vPw.value);
            return cMail();
        case "126":
            d.action = "https://reg.163.com/logins.jsp?type=1&product=mail126&url=http://entry.mail.126.com/cgi/ntesdoor?lightweight%3D1%26verifycookie%3D1%26language%3D0%26style%3D-1";
            setVal("domain", "126.com");
            if (vName.value.slice(vName.value.lastIndexOf('@')) == '@126.com') {
                setVal("username", vName.value)
            } else {
                setVal("username", vName.value + "@126.com")
            }
            setVal("password", vPw.value);
            return cMail();
        case "sina":
            d.action = "https://login.sina.com.cn/sso/login.php";
            setVal("encoding", "UTF-8");
            setVal("entry", "freemail");
            setVal("gateway", "0");
            setVal("returntype", "META");
            setVal("url", "http://mail.sina.com.cn/");
            if (vName.value.slice(vName.value.lastIndexOf('@')) == '@sina.com') {
                setVal("username", vName.value)
            } else {
                setVal("username", vName.value + "@sina.com")
            }
            setVal("password", vPw.value);
            return cMail();
        case "sohu":
            d.action = "http://passport.sohu.com/login.jsp";
            if (vName.value.slice(vName.value.lastIndexOf('@')) == '@sohu.com') {
                setVal("loginid", vName.value)
            } else {
                setVal("loginid", vName.value + "@sohu.com")
            }
            setVal("appid", "1000");
            setVal("ct", "1173080990");
            setVal("fl", "1");
            setVal("ru", "http://login.mail.sohu.com/servlet/LoginServlet");
            setVal("sg", "5082635c77272088ae7241ccdf7cf062");
            setVal("vr", "1|1");
            setVal("passwd", vPw.value);
            return cMail();
        case "tom":
            d.action = "http://web.mail.tom.com/webmail/login/loginServicePost.action";
            if (vName.value.slice(vName.value.lastIndexOf('@')) == '@tom.com') {
                setVal("username", vName.value)
            } else {
                setVal("username", vName.value + "@tom.com")
            }
            setVal("password", vPw.value);
            return cMail();
        case "21cn":
            d.action = "http://passport.21cn.com/maillogin.jsp";
            setVal("LoginName", vName.value);
            setVal("passwd", vPw.value);
            setVal("domainname", "21cn.com");
            if (vName.value.slice(vName.value.lastIndexOf('@')) == '@21cn.com') {
                setVal("UserName", vName.value)
            } else {
                setVal("UserName", vName.value + "@21cn.com")
            }
            return cMail();
        case "yeah":
            d.action = "https://reg.163.com/logins.jsp?type=1&product=mailyeah&url=http://entry.mail.yeah.net/cgi/ntesdoor?lightweight%3D1%26verifycookie%3D1%26style%3D-1";
            setVal("domain", "yeah.net");
            if (vName.value.slice(vName.value.lastIndexOf('@')) == '@yeah.net') {
                setVal("username", vName.value)
            } else {
                setVal("username", vName.value + "@yeah.net")
            }
            setVal("password", vPw.value);
            return cMail();
        case "baidu":
            d.action = "https://passport.baidu.com/?login";
            setVal("username", vName.value);
            setVal("password", vPw.value);
            return cMail();
        case "51":
            d.action = "http://passport.51.com/login.5p";
            setVal("passport_51_user", vName.value);
            setVal("passport_51_password", vPw.value);
            setVal("gourl", "http://my.51.com");
            setVal("from_exit", 1);
            setVal("passport_auto_login", 0);
            setVal("passport_cookie_login", 0);
            return cMail();
        case "xn":
            d.action = "http://www.renren.com/PLogin.do";
            setVal("email", vName.value);
            setVal("password", vPw.value);
            setVal("domain", "renren.com");
            setVal("origURL", "http://www.renren.com/SysHome.do");
            return cMail();
        case "139":
            d.action = "https://mail.10086.cn/Login/Login.ashx?clientid=10210";
            if (vName.value.slice(vName.value.lastIndexOf('@')) == '@139.com') {
                setVal("username", vName.value.substr(0, (vName.value.length - 8)))
            } else {
                setVal("username", vName.value)
            }
            setVal("password", vPw.value);
            setVal("clientid", '2345');
            return cMail()
        }
    },
    'init': function() {
        var a = T.email,
        mUser, b, emailOptionColor = localStorage.getItem('emailOptionColor'),
        items = $t('LI', this.list),
        hrefs = $t('A', this.list),
        counter = 0,
        dataValue,
        timer = setInterval(function() {
            if (++counter > 10) {
                a.emailLabel.style.display = 'block';
                clearInterval(timer)
            }
            if (a.emailPW.value.trim() !== '') {
                a.emailLabel.style.display = 'none';
                clearInterval(timer)
            }
        },
        150);
        if (mUser = localStorage.getItem('mUser')) {
            this.emailName.value = mUser;
            this.emailName.style.color = this.onColor
        }
        try {
            var b = g_cookie('mail_index');
            if (b === '3' || b === '5' || b === '6') {
                s_cookie('mail_index', '')
            };
            var c = items[parseInt(b) - 1];
            this.trigger.innerHTML = c.innerHTML;
            this.hidden.value = c.getAttribute('data-value').split('$')[0];
            this.hidden.title = c.getAttribute('data-value').split('$')[1]
        } catch(e) {}
        if (emailOptionColor) {
            for (var i = 0,
            len = hrefs.length; i < len; i++) {
                dataValue = hrefs[i].getAttribute('data-value');
                if (dataValue && emailOptionColor.indexOf(dataValue) >= 0 && dataValue !== 'moreEmail') {
                    hrefs[i].className = 'fred'
                }
            }
        }
        if (isIE6) {
            for (var i = 0,
            len = items.length; i < len; i++) {
                if (items[i].className.indexOf('gray') === -1) {
                    items[i].onmouseover = function() {
                        this.className = 'hover'
                    };
                    items[i].onmouseout = function() {
                        this.className = ''
                    }
                }
            }
        }
        this.emailName.onfocus = this.emailName.onblur = this.clearText;
        this.emailPW.onfocus = this.emailPW.onblur = this.clearPassword;
        bindEvent(document, 'click',
        function() {
            a.hide()
        });
        this.select.onclick = function(e) {
            var e = e || event,
            target = e.target || e.srcElement;
            if (target.nodeName === 'A') {
                a.select.style.zIndex = 0;
                if (target.getAttribute('data-value')) {
                    a.open(target, target.getAttribute('data-value'));
                    return
                }
            }
            if (target.nodeName === 'LI' && target.firstChild.nodeName !== 'A' && target.className.indexOf('gray') === -1) {
                a.noOpen(target);
                return
            }
            if (target === a.trigger) {
                if (a.list.style.display === 'none') {
                    a.select.style.zIndex = 2001;
                    a.list.style.display = ''
                } else {
                    a.hide()
                }
            }
            e.stopPropagation ? e.stopPropagation() : (e.cancelBubble = true)
        }
    }
};
T.ready(function() {
    T.email.init()
});
var JSON;
if (!JSON) {
    JSON = {}
} (function() {
    'use strict';
    function f(n) {
        return n < 10 ? '0' + n: n
    }
    if (typeof Date.prototype.toJSON !== 'function') {
        Date.prototype.toJSON = function(a) {
            return isFinite(this.valueOf()) ? this.getUTCFullYear() + '-' + f(this.getUTCMonth() + 1) + '-' + f(this.getUTCDate()) + 'T' + f(this.getUTCHours()) + ':' + f(this.getUTCMinutes()) + ':' + f(this.getUTCSeconds()) + 'Z': null
        };
        String.prototype.toJSON = Number.prototype.toJSON = Boolean.prototype.toJSON = function(a) {
            return this.valueOf()
        }
    }
    var e = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
    escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
    gap, indent, meta = {
        '\b': '\\b',
        '\t': '\\t',
        '\n': '\\n',
        '\f': '\\f',
        '\r': '\\r',
        '"': '\\"',
        '\\': '\\\\'
    },
    rep;
    function quote(b) {
        escapable.lastIndex = 0;
        return escapable.test(b) ? '"' + b.replace(escapable,
        function(a) {
            var c = meta[a];
            return typeof c === 'string' ? c: '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice( - 4)
        }) + '"': '"' + b + '"'
    }
    function str(a, b) {
        var i, k, v, length, mind = gap,
        partial, value = b[a];
        if (value && typeof value === 'object' && typeof value.toJSON === 'function') {
            value = value.toJSON(a)
        }
        if (typeof rep === 'function') {
            value = rep.call(b, a, value)
        }
        switch (typeof value) {
        case 'string':
            return quote(value);
        case 'number':
            return isFinite(value) ? String(value) : 'null';
        case 'boolean':
        case 'null':
            return String(value);
        case 'object':
            if (!value) {
                return 'null'
            }
            gap += indent;
            partial = [];
            if (Object.prototype.toString.apply(value) === '[object Array]') {
                length = value.length;
                for (i = 0; i < length; i += 1) {
                    partial[i] = str(i, value) || 'null'
                }
                v = partial.length === 0 ? '[]': gap ? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']': '[' + partial.join(',') + ']';
                gap = mind;
                return v
            }
            if (rep && typeof rep === 'object') {
                length = rep.length;
                for (i = 0; i < length; i += 1) {
                    if (typeof rep[i] === 'string') {
                        k = rep[i];
                        v = str(k, value);
                        if (v) {
                            partial.push(quote(k) + (gap ? ': ': ':') + v)
                        }
                    }
                }
            } else {
                for (k in value) {
                    if (Object.prototype.hasOwnProperty.call(value, k)) {
                        v = str(k, value);
                        if (v) {
                            partial.push(quote(k) + (gap ? ': ': ':') + v)
                        }
                    }
                }
            }
            v = partial.length === 0 ? '{}': gap ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}': '{' + partial.join(',') + '}';
            gap = mind;
            return v
        }
    }
    if (typeof JSON.stringify !== 'function') {
        JSON.stringify = function(a, b, c) {
            var i;
            gap = '';
            indent = '';
            if (typeof c === 'number') {
                for (i = 0; i < c; i += 1) {
                    indent += ' '
                }
            } else if (typeof c === 'string') {
                indent = c
            }
            rep = b;
            if (b && typeof b !== 'function' && (typeof b !== 'object' || typeof b.length !== 'number')) {
                throw new Error('JSON.stringify');
            }
            return str('', {
                '': a
            })
        }
    }
    if (typeof JSON.parse !== 'function') {
        JSON.parse = function(c, d) {
            var j;
            function walk(a, b) {
                var k, v, value = a[b];
                if (value && typeof value === 'object') {
                    for (k in value) {
                        if (Object.prototype.hasOwnProperty.call(value, k)) {
                            v = walk(value, k);
                            if (v !== undefined) {
                                value[k] = v
                            } else {
                                delete value[k]
                            }
                        }
                    }
                }
                return d.call(a, b, value)
            }
            c = String(c);
            e.lastIndex = 0;
            if (e.test(c)) {
                c = c.replace(e,
                function(a) {
                    return '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice( - 4)
                })
            }
            if (/^[\],:{}\s]*$/.test(c.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']').replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
                j = eval('(' + c + ')');
                return typeof d === 'function' ? walk({
                    '': j
                },
                '') : j
            }
            throw new SyntaxError('JSON.parse');
        }
    }
} ());
T.Dropdown = function() {
    if (! (this instanceof T.Dropdown)) {
        return new T.Dropdown()
    }
    this.init.apply(this, arguments)
};
T.Dropdown.prototype = {
    'constructor': T.Dropdown,
    'chgVal': function(a, b) {
        this.trigger.innerHTML = a.innerHTML;
        this.hide(b);
        if (this.hidden) {
            this.hidden.value = a.getAttribute('data-value')
        }
    },
    'on': function(a) {
        var i = 0,
        len = this.items.length;
        for (; i < len; i++) {
            this.items[i].className = this.offCls
        }
        a.className = this.onCls
    },
    'hide': function(a) {
        if (!a) {
            this.select.style.display = "none";
            this.show = false
        }
        this.on(this.items[this.index])
    },
    'stop': function(e) {
        e = e || event;
        e.stopPropagation ? e.stopPropagation() : (e.cancelBubble = true);
        e.preventDefault ? e.preventDefault() : (e.returnValue = false)
    },
    'init': function(c) {
        if (! (c && c.trigger && c.select)) {
            return
        }
        this.trigger = c.trigger;
        this.select = c.select;
        this.items = this.select.getElementsByTagName(c.tagName || 'LI');
        this.onCls = c.onCls || 'hover';
        this.offCls = c.offCls || '';
        this.hidden = c.hidden;
        this.show = false;
        this.index = 0;
        var d = this,
        i = 0,
        len = this.items.length,
        el, getIndex = function(a) {
            var b = -1,
            i = 0;
            for (; i < len; i++) {
                if (a === d.items[i]) {
                    b = i;
                    break
                }
            }
            return b
        };
        for (i = 0; i < len; i++) {
            if (this.items[i].className.indexOf(this.onCls) !== -1) {
                this.index = i;
                break
            }
        }
        this.trigger.onclick = function(e) {
            var a = d.select.style;
            a.display = a.display == 'block' ? 'none': 'block';
            if (a.display !== 'none') {
                d.show = true
            }
            d.stop(e)
        };
        for (i = 0; i < len; i++) {
            this.items[i].onmouseover = (function(i) {
                return function() {
                    d.on(this)
                }
            } (i));
            this.items[i].onclick = function(e) {
                d.index = getIndex(this);
                d.chgVal(this);
                d.stop(e)
            }
        }
        bindEvent(document, 'click',
        function() {
            d.hide()
        });
        bindEvent(document, 'keydown',
        function(e) {
            if (!d.show) {
                return
            }
            var e = e || event,
            target = e.target || e.srcElement,
            key = e.which || e.keyCode;
            switch (key) {
            case 38:
                if (--d.index < 0) {
                    d.index = len - 1
                };
                el = d.items[d.index];
                d.chgVal(el, true);
                break;
            case 40:
                if (++d.index > len - 1) {
                    d.index = 0
                };
                el = d.items[d.index];
                d.on(el);
                d.chgVal(el, true);
                break;
            case 13:
            case 27:
                el = d.items[d.index];
                d.chgVal(el);
                break;
            default:
            }
            d.stop(e)
        })
    }
};
T.toolsBox = {
    'wrapper': $('J_toolsBox'),
    'tabCN': 'cur',
    'prevTab': $('tab1').parentNode,
    'prevCon': $('tab1_con'),
    'NAME': '__TOOLSBOX__',
    'pad': function(n) {
        return n < 10 ? '0' + n.toString(10) : n.toString(10)
    },
    'clearNaN': function() {
        this.value = this.value.replace(/\D/g, '')
    },
    'clearText': function(e) {
        var e = e || window.event,
        el, self = this;
        if (e.type === 'blur') {
            if (this.value.trim() === '') {
                this.value = this.defaultValue;
                this.style.color = '#b4b4b4'
            }
            if (el = $(this.id + T.toolsBox.NAME)) {
                el.style.display = 'none';
                el.onmousedown = null
            }
        }
        if (e.type === 'focus') {
            this.style.color = 'black';
            if (this.defaultValue == this.value.trim()) {
                this.value = ''
            }
            if (el = $(this.id + T.toolsBox.NAME)) {
                el.style.display = 'block';
                el.onmousedown = function(e) {
                    var e = e || window.event,
                    target = e.target || e.srcElement;
                    if (target.nodeName === 'P') {
                        e.preventDefault ? e.preventDefault() : (e.returnValue = false);
                        self.value = target.innerHTML;
                        el.style.display = 'none';
                        el.onmousedown = null;
                        self.blur()
                    }
                }
            }
        }
    },
    'sbmCheck': function(a) {
        var b = a.el,
        url = a.url,
        re = a.re,
        errorMsg = a.errorMsg,
        value = a.el.value;
        if (value.trim() === '' || value.trim() === b.defaultValue) {
            window.open(url);
            return false
        }
        if (re.test(value)) {
            b === $('mobilenum') ? this.saveCache(0, value) : this.saveCache(1, value);
            return true
        } else {
            alert(errorMsg);
            b.focus();
            b.select();
            return false
        }
    },
    'toggle': function(a) {
        if (this.prevCon) {
            this.prevTab.className = this.prevTab.className.replace(this.tabCN, '');
            this.prevCon.style.display = 'none'
        }
        this.prevTab = $(a).parentNode;
        this.prevCon = $(a + '_con');
        this.prevTab.className = this.prevTab.className.trim() + ' ' + this.tabCN;
        this.prevCon.style.display = ''
    },
    'indexOf': function(a, b) {
        var i = 0,
        len = a.length;
        for (; i < len; i++) {
            if (a[i] === b) {
                return i
            }
        }
        return - 1
    },
    'initCache': function() {
        this.cache = [[], []]
    },
    'saveCache': function(a, b) {
        var c = this.cache[a],
        b = b.trim();
        if (this.indexOf(c, b) != -1) {
            return
        }
        if (c.length >= 5) {
            c.pop()
        }
        c.unshift(b);
        localStorage.setItem(this.NAME, JSON.stringify(this.cache));
        this.fillSuggestions()
    },
    'fillSuggestions': function() {
        var d = this.cache,
        self = this,
        _func = function(a, b) {
            var c = d[a],
            _html = '',
            div = null,
            id = b.id + self.NAME,
            prev;
            if (!c.length) {
                return
            }
            div = document.createElement('DIV');
            if (prev = $(id)) {
                prev.parentNode.removeChild(prev);
                prev = null
            }
            div.id = id;
            for (var i = 0; i < c.length; i++) {
                _html += '<p onmouseover="this.className=\'hover\'" onmouseout="this.className=\'\'">' + c[i] + '</p>'
            }
            div.innerHTML = _html;
            div.className = 'mob_history';
            div.style.display = 'none';
            b.parentNode.insertBefore(div, b)
        };
        _func(0, $('mobilenum'));
        _func(1, $('qqnum'))
    },
    'init': function() {
        var d = new Date(),
        self = this,
        t = d.getFullYear() + "-" + this.pad(d.getMonth() + 1) + "-" + this.pad(d.getDate()),
        tab = $t('UL', this.wrapper)[0],
        self = this;
        try {
            this.cache = JSON.parse(localStorage.getItem(this.NAME))
        } catch(e) {
            localStorage.removeItem(this.NAME);
            this.initCache()
        }
        if (!this.cache) {
            this.initCache()
        }
        this.fillSuggestions();
        $("tab3_con").date.value = t;
        new T.Dropdown({
            trigger: $('J_mTrigger'),
            select: $('J_mSelect'),
            hidden: $('J_mHidden')
        });
        new T.Dropdown({
            trigger: $('J_qTrigger'),
            select: $('J_qSelect'),
            hidden: $('J_qHidden')
        });
        tab.onclick = function(e) {
            $('J_qSelect').style.display = $('J_mSelect').style.display = 'none';
            var e = e || event,
            target = e.target || e.srcElement,
            p;
            if (target.nodeName === 'A') {
                p = target.parentNode;
                if (p.className.indexOf(self.tabCN) !== -1) {
                    return
                }
                self.toggle(target.id);
                return false
            }
        };
        $("tab1_con").onsubmit = function() {
            clickCount('chongzhin1');
            return self.sbmCheck({
                'el': $('mobilenum'),
                'url': 'http://huodong.2345.com/huafei/index.htm',
                're': /^1[358][0-9]{9}$/,
                'errorMsg': '请输入正确的手机号码'
            })
        };
        $("tab2_con").onsubmit = function() {
            clickCount('qbi2');
            return self.sbmCheck({
                'el': $('qqnum'),
                'url': 'http://huodong.2345.com/qbi/index.htm',
                're': /^[1-9]\d{4,}$/,
                'errorMsg': '请输入正确的QQ号码'
            })
        };
        $('mobilenum').onkeyup = $('mobilenum').onafterpaste = $('qqnum').onkeyup = $('qqnum').onafterpaste = function() {
            self.clearNaN.call(this)
        };
        $('mobilenum').onblur = $('mobilenum').onfocus = $('qqnum').onblur = $('qqnum').onfocus = $('J_from').onblur = $('J_from').onfocus = $('J_to').onblur = $('J_to').onfocus = function(e) {
            self.clearText.call(this, e)
        }
    }
};
T.ready(function() {
    T.toolsBox.init()
});
T.ready(function() {
    if ( !! - [1, ] || window.XMLHttpRequest) {
        return
    }
    var b = $('J_kzjx'),
    CN = 'hov',
    findDL = function(a) {
        while (a && a.parentNode && a.parentNode !== b) {
            a = a.parentNode
        }
        if (a.nodeName === 'DL') {
            return a
        }
        return null
    };
    b.onmouseover = function() {
        var a = findDL(event.srcElement);
        if (!a) {
            return
        }
        if (! (new RegExp(CN).test(a.className))) {
            if (a.className = a.className.trim()) {
                a.className += ' '
            }
            a.className += CN
        }
    };
    b.onmouseout = function() {
        var a = findDL(event.srcElement);
        if (!a) {
            return
        }
        a.className = a.className.replace(CN, ' ')
    }
});
T.bottomSearchMod = {
    'timer': null,
    'data': [{
        'f': 'http://s.9991.com/ggSearch.htm',
        'w': 'q',
        'i': 'i/fsh_google.gif',
        'a': 'http://www.google.com.hk/',
        'h': {
            'client': 'aff-9991',
            'ie': 'GB2312',
            'oe': 'utf8',
            'hl': 'zh-CN',
            'newwindow': '1',
            'channel': 'footer'
        },
        'c': 'google'
    },
    {
        'f': 'http://www.sogou.com/sogou',
        'w': 'query',
        'i': 'i/fsh_sogou.gif',
        'a': 'http://www.sogou.com/index.php?pid=sogou-site-220c77af02f8ad85',
        'h': {
            '_ast': '1282184986',
            'w': '01019900',
            'p': '40040100',
            'pid': 'sogou-site-220c77af02f8ad85'
        },
        'c': 'sogou'
    },
    {
        'f': 'http://www.soso.com/q',
        'w': 'w',
        'i': 'i/fsh_soso.gif',
        'a': 'http://www.soso.com/',
        'c': 'soso'
    },
    {
        'f': 'http://www.youdao.com/search',
        'w': 'q',
        'i': 'i/fsh_youdao.gif',
        'a': 'http://www.youdao.com/',
        'h': {
            'ue': 'gbk'
        },
        'c': 'youdao_'
    },
    {
        'f': 'http://www.baidu.com/s',
        'w': 'word',
        'i': 'i/fsh_baidu.gif',
        'a': 'http://www.baidu.com/index.php?tn=divencheng_pg',
        'h': {
            'tn': 'divencheng_pg',
            'lm': '-1'
        },
        'c': 'baidu'
    },
    {
        'f': '',
        'w': '',
        'i': 'i/fsh_site.gif',
        'a': 'http://www.2345.com/search_2345.htm',
        'c': 'site'
    }],
    'createHidden': function(a) {
        var b = [];
        for (var n in a) {
            b.push('<input type="hidden" name=' + n + ' value="' + a[n] + '">')
        }
        return b.join('')
    },
    'change': function(i, a) {
        if (!this.data[i]) {
            i = 0
        }
        if (a) {
            document.fs.nsns[i].checked = true
        }
        var b = this.data[i];
        $('J_bottomImg').src = b['i'];
        $('J_bottomLink').href = b['a'];
        $('J_bottomSearch').name = b['w'];
        $('fs').action = b['f'];
        if (b['h']) {
            $("J_bottomHidden").innerHTML = this.createHidden(b['h'])
        } else {
            $("J_bottomHidden").innerHTML = ''
        }
        if (!a) {
            clickCount(b['c'] + '_bsearch')
        }
        localStorage.setItem('fshType', i)
    },
    'smbFixer': function() {
        allCount('footer_search_' + localStorage.getItem('fshType'));
        if (document.fs.nsns[5].checked) {
            window.open('search_2345.htm?i=' + encodeURIComponent($('J_bottomSearch').value) + '+site%3Awww.2345.com');
            return false
        }
    },
    'init': function() {
        var b = $('J_bottomSearch'),
        self = this,
        bottomSearchRadios = document.fs.nsns;
        b.onmouseover = function() {
            if (document.activeElement !== this) {
                self.timer && clearTimeout(self.timer);
                self.timer = setTimeout(function() {
                    b.style.border = "1px solid #ffaa00";
                    b.focus();
                    b.select()
                },
                200)
            }
        };
        b.onblur = function() {
            this.style.border = "1px solid #7b9abd"
        };
        for (var i = 0; i < bottomSearchRadios.length; i++) {
            bottomSearchRadios[i].onclick = (function(a) {
                return function() {
                    self.change(a)
                }
            } (i))
        }
    }
};
T.ready(function() {
    T.bottomSearchMod.init()
});
T.siteClicks = {
    'LOCNAME': 'siteClicks',
    'DELIMITER': '^^',
    'ONEDAY': 1000 * 60 * 60 * 24,
    'MAX': 6,
    'DAYS': 10,
    'wrapper': $('J_myfav_w'),
    'tipsTimer': null,
    'relStyle': $('J_rightSort'),
    'clsName': 'redbit',
    'timeout': 5000,
    'sites': [],
    'setTime': function() {
        return new Date().setHours(0, 0, 0, 0)
    },
    'stop': function(e) {
        e.stopPropagation ? e.stopPropagation() : (e.cancelBubble = true);
        e.preventDefault ? e.preventDefault() : (e.returnValue = false)
    },
    'getTarget': function(e) {
        var e = e || event,
        target = e.target || e.srcElement;
        return target
    },
    'arrGEN': function() {
        var a = [],
        i = 0;
        for (; i < this.DAYS; i++) {
            a.push(0)
        }
        return a
    },
    'sum': function(a) {
        var b = 0,
        i = 0,
        len = a.length;
        for (; i < len; i++) {
            b += parseInt(a[i])
        }
        return b
    },
    'indexOf': function(a, b) {
        var i = 0,
        len = a.length;
        for (; i < len; i++) {
            if (unescape(a[i]) === unescape(b) || (unescape(a[i])).indexOf(unescape(b + this.DELIMITER)) !== -1) {
                return i
            }
        }
        return - 1
    },
    'isLogin': function() {
        if (g_cookie('uid', cookieStore) > 0 && g_cookie('iden', cookieStore)) {
            return true
        }
        return false
    },
    'getName': function() {
        return this.isLogin() ? 'server_site_str': 'site_str'
    },
    'close': function() {
        var a = this;
        localStorage.setItem('siteon', '1');
        this.relStyle.className = 'rightSort';
        clickCount("index_cywz_close")
    },
    'delOne': function(b) {
        if (confirm("您确定删除该网址？")) {
            if (this.isLogin()) {
                T.getScript('http://my.2345.com/api/get_server_site_str.php?' + ( + new Date), {
                    callback: function() {
                        var a = T.siteClicks,
                        c;
                        a.strToArr();
                        c = a.indexOf(a.sites, b);
                        if (c !== -1) {
                            a.sites.splice(c, 1)
                        }
                        a.render(true);
                        if (c !== -1) {
                            a.save()
                        }
                    }
                })
            } else {
                var c = this.indexOf(this.sites, b);
                this.sites.splice(c, 1);
                this.render(true);
                this.save()
            }
            clickCount('visitdel')
        }
    },
    'appendOne': function(b) {
        if (this.isLogin()) {
            T.getScript('http://my.2345.com/api/get_server_site_str.php?' + ( + new Date), {
                callback: function() {
                    var a = T.siteClicks,
                    index;
                    a.strToArr();
                    index = a.indexOf(a.sites, b);
                    if (index === -1) {
                        a.sites.push(b)
                    }
                    a.render(true);
                    if (index === -1) {
                        a.save()
                    }
                }
            })
        } else {
            this.sites.push(b);
            this.render(true);
            this.save()
        }
    },
    'save': function() {
        if (this.sites.length) {
            localStorage.setItem(this.getName(), this.sites.join(',') + ',')
        } else {
            localStorage.removeItem(this.getName())
        }
        if (this.isLogin()) {
            this.saveToServer()
        }
    },
    'saveToServer': function() {
        s_cookie({
            store: 'cookie'
        },
        'server_site_str', localStorage.getItem('server_site_str'));
        T.getScript('http://my.2345.com/api/set_server_site_str.php?' + ( + new Date), {
            callback: function() {
                s_cookie({
                    store: 'cookie'
                },
                'server_site_str', '', -1)
            }
        })
    },
    'saveToUnlogined': function() {
        var a = localStorage.getItem('site_str'),
        server_site_str;
        if (!a || a === ',') {
            if (server_site_str = localStorage.getItem('server_site_str')) {
                localStorage.setItem('site_str', server_site_str)
            }
        }
    },
    'strToArr': function() {
        var a = localStorage.getItem(this.getName()),
        arr;
        if (!a || a === ',') {
            this.sites = [];
            return
        }
        if (a.indexOf('null') === 0) {
            a = a.replace(/^null/g, '')
        }
        arr = a.split(',');
        arr.pop();
        this.sites = arr
    },
    'showLeft': function() {
        var w = $CONFIG['wideScreen'] ? 1202 : 1002,
        c = 90,
        getViewWidth = function() {
            var a = document.documentElement;
            return self.innerWidth || a && a.clientWidth || document.body.clientWidth
        };
        return (getViewWidth() - w) / 2 > c ? true: false
    },
    'render': function(a) {
        if (this.sites.length === 0) {
            this.openMe();
            this.relStyle.className = 'rightSort';
            return
        }
        var b = [],
        i = 0,
        sites = this.sites,
        len = sites.length,
        item;
        b.push('<div class="icon_add"><span class="icoSub_myfav"  title="收起"></span></div>');
        if (this.isLogin()) {
            if (this.showLeft()) {
                b.push('<div  class="myfav_tit"><span class="tip_fav6_b" id="J_tip_fav6" style="display:' + (!localStorage.getItem('__siteClicksTip2__') ? 'block': 'none') + '"><p>云收藏</br>搬到这里啦！</p><a  href="javascript:;" target="_self" onclick="$(\'J_tip_fav6\').style.display=\'none\';localStorage.setItem(\'__siteClicksTip2__\',1)"  class="f_clo_b" title="关闭"></a></span></div>')
            } else {
                b.push('<div  class="myfav_tit"><span class="tip_fav6"  id="J_tip_fav6" style="display:' + (!localStorage.getItem('__siteClicksTip2__') ? 'block': 'none') + '">云收藏搬到这里啦！<a href="javascript:;" target="_self" onclick="$(\'J_tip_fav6\').style.display=\'none\';localStorage.setItem(\'__siteClicksTip2__\',1)" class="f_clo" title="关闭"></a></span></div>')
            }
        } else {
            if (this.showLeft()) {
                b.push('<div  class="myfav_tit"><span class="tip_fav6_b" id="J_tip_fav6" style="display:' + (!localStorage.getItem('__siteClicksTip2__') ? 'block': 'none') + '"><p>常用网址</br>搬到这里啦！</p><a  href="javascript:;" target="_self" onclick="$(\'J_tip_fav6\').style.display=\'none\';localStorage.setItem(\'__siteClicksTip2__\',1)"  class="f_clo_b" title="关闭"></a></span></div>')
            } else {
                b.push('<div  class="myfav_tit"><span class="tip_fav6" id="J_tip_fav6" style="display:' + (!localStorage.getItem('__siteClicksTip2__') ? 'block': 'none') + '">常用网址搬到这里啦！<a  href="javascript:;" target="_self" onclick="$(\'J_tip_fav6\').style.display=\'none\';localStorage.setItem(\'__siteClicksTip2__\',1)" class="f_clo" title="关闭"></a></span></div>')
            }
        }
        b.push('<ul class="mzdh_list fav_ul clearfix"  id="J_myfav">');
        for (; i < len; i++) {
            item = sites[i].split(this.DELIMITER);
            b.push("<li><a data-url=" + item[0] + " href=" + item[0] + " onclick=\"allCount('visits" + i + "',this)\">" + unescape(item[1]) + "</a></li>")
        }
        if (len !== 12 && len !== 6) {
            b.push('<li class="btn_add_0"><a href="javascript:;" data-value="J_yun_edit"><ins class="ico_add_16"  data-value="J_yun_edit"></ins>添加网址</a></li>')
        }
        b.push('</ul>');
        if (len === 12 || len === 6) {
            b.push('<div class="fav_edit" id="J_myfav_op"><a href="javascript:;" target="_self" title="编辑" class="ico_add_16" data-value="J_yun_edit"></a></div>')
        }
        this.wrapper.innerHTML = b.join('');
        this.relStyle.className = len <= 6 ? 'rightSort displayfav_column1 ': 'rightSort displayfav'
    },
    'callback': function(a) {
        var b = localStorage.getItem('site_str');
        if (a) {
            localStorage.setItem('server_site_str', a)
        } else {
            localStorage.removeItem('server_site_str');
            if (b && g_cookie('site_str_flag', cookieStore) !== '3') {
                localStorage.setItem('server_site_str', b);
                T.siteClicks.saveToServer()
            }
        }
    },
    'count': function(a, b, v) {
        var c = /.*2345.com.*/i,
        rTags = /<\/?[^>]+>/i,
        rJS = /^javascript.*/i,
        rHttps = /\bhttps?:\/\/.*/i;
        if (v === '2' || (c.test(a) && v !== '3') || b.trim() == '' || rTags.test(b) || rJS.test(a) || !rHttps.test(a)) {
            return
        }
        var d = this.cache,
        key = a + this.DELIMITER + escape(b);
        if (!d[key]) {
            d[key] = this.arrGEN()
        }
        d[key][this.DAYS - 1] = d[key][this.DAYS - 1] + 1;
        localStorage.setItem(this.LOCNAME, JSON.stringify(d));
        this.setLight();
        if (this.sites.length >= this.MAX || this.indexOf(this.sites, key) !== -1) {
            return
        }
        if (this.sum(d[key]) >= 2) {
            if (!localStorage.getItem('siteon')) {
                this.appendOne(key)
            }
        }
    },
    'openMe': function(a) {
        var b = this;
        this.wrapper.innerHTML = '<div class="icon_add" id="J_icon_add"><span class="icoAdd_myfav"  id="J_ico_myfav" title="添加网址" data-value="J_yun_edit"></span></div>';
        if (!a && !localStorage.getItem('__siteClicksTip__')) {
            var c = document.createElement('SPAN');
            c.innerHTML = this.isLogin() ? '点此开启云收藏': '点此开启常用网址';
            c.id = 'J_tip_yun_open';
            c.className = 'tip_yun_open';
            $('J_icon_add').appendChild(c);
            this.tipsTimer = setTimeout(function() {
                c.style.display = 'none';
                localStorage.setItem('__siteClicksTip__', '1')
            },
            this.timeout)
        }
    },
    'initRender': function(b) {
        if (localStorage.getItem('siteon')) {
            this.openMe();
            return
        }
        if (this.isLogin() && g_cookie('site_str_flag', cookieStore) !== '3') {
            T.getScript('http://my.2345.com/api/get_server_site_str.php', {
                callback: function() {
                    var a = T.siteClicks,
                    date = new Date();
                    a.strToArr();
                    a.render(b);
                    date.setTime(date.getTime() + 1000 * 60 * 60 * 4);
                    document.cookie = 'site_str_flag = 3;expires=' + date.toGMTString() + ';path=/;domain=2345m.com'
                }
            })
        } else {
            this.strToArr();
            this.render(b)
        }
    },
    'pushStack': function() {
        var a, cache = this.cache,
        remainder = Math.floor(( + new Date() - parseInt(cache['expires'])) / this.ONEDAY);
        if (remainder > 0) {
            if (remainder >= this.DAYS) {
                cache = {
                    'expires': this.setTime()
                }
            } else {
                for (a in cache) {
                    if (a === 'expires') {
                        cache[a] = this.setTime();
                        continue
                    }
                    cache[a] = cache[a].slice(remainder, this.DAYS).concat(this.arrGEN().slice(0, remainder))
                }
            }
        }
        if (remainder < 0) {
            cache['expires'] = this.setTime()
        }
        localStorage.setItem(this.LOCNAME, JSON.stringify(cache))
    },
    'setLight': function() {
        var d = this.cache,
        arr = [],
        self = this;
        for (name in d) {
            if (name === 'expires') {
                continue
            }
            if (this.sum(d[name]) >= 3) {
                arr.push(this.sum(d[name]) + this.DELIMITER + name)
            }
        }
        arr.sort(function(a, b) {
            var c = parseInt(a.split(self.DELIMITER)[0]),
            b0 = parseInt(b.split(self.DELIMITER)[0]);
            if (c > b0) {
                return - 1
            }
            if (c === b0) {
                return 0
            }
            if (c < b0) {
                return 1
            }
        });
        if (!arr.length) {
            return
        }
        var e = 0,
        warp = $('J_kzjx'),
        hrefs = warp.getElementsByTagName('A'),
        hrefsLen = hrefs.length;
        for (var i = 0; i < hrefsLen; i++) {
            hrefs[i].className = hrefs[i].className.replace(this.clsName, ' ')
        }
        for (var k = 0; k < arr.length; k++) {
            for (var j = 0; j < hrefsLen; j++) {
                if (e >= 3) {
                    return
                }
                if (unescape(arr[k].split(self.DELIMITER)[2]).trim() === hrefs[j].innerHTML.trim()) {
                    if (! (new RegExp(this.clsName).test(hrefs[j].className))) {
                        if (hrefs[j].className = hrefs[j].className.trim()) {
                            hrefs[j].className += ' '
                        }
                        hrefs[j].className += this.clsName
                    }
                    e++
                }
            }
        }
    },
    'init': function() {
        var b = this;
        try {
            this.cache = JSON.parse(localStorage.getItem(this.LOCNAME))
        } catch(e) {
            localStorage.removeItem(this.LOCNAME);
            this.cache = {
                'expires': this.setTime()
            }
        }
        if (!this.cache) {
            this.cache = {
                'expires': this.setTime()
            }
        }
        this.pushStack();
        this.setLight();
        bindEvent(document, 'click',
        function(e) {
            var a = b.getTarget(e);
            if (a.nodeName === 'A' && a.href.trim() !== '') {
                b.count(a.href, a.innerHTML, a.name)
            }
        });
        if (g_cookie('siteon')) {
            localStorage.setItem('siteon', '1')
        }
        this.wrapper.onclick = function(e) {
            var a = b.getTarget(e),
            e = e || event;
            if (a.nodeName === 'SPAN' && a.className === 'icoSub_myfav') {
                b.close();
                localStorage.setItem('__siteClicksTip__', '1');
                localStorage.setItem('__siteClicksTip2__', '1');
                b.openMe(true);
                b.stop(e);
                return
            } else if (a.getAttribute('data-value') === 'J_yun_edit') {
                if (a.id === 'J_ico_myfav') {
                    if (localStorage.getItem('siteon')) {
                        localStorage.removeItem('siteon');
                        mystyleInit.del_cookie('siteon')
                    }
                    b.initRender(true);
                    if (b.sites.length === 0) {
                        T.getScript('/Skins/mb/css/sites_popup_20130903.js', {
                            callback: function() {
                                T.siteEdit.openPop()
                            }
                        })
                    }
                } else {
                    T.getScript('/Skins/mb/css/sites_popup_20130903.js', {
                        callback: function() {
                            T.siteEdit.openPop()
                        }
                    })
                }
                b.stop(e);
                localStorage.setItem('__siteClicksTip__', '1');
                localStorage.setItem('__siteClicksTip2__', '1');
                if ($('J_tip_yun_open')) {
                    $('J_tip_yun_open').style.display = 'none'
                }
                if ($('J_tip_fav6')) {
                    $('J_tip_fav6').style.display = 'none'
                }
                clickCount('index_cywz_edit');
                return false
            }
        }
    }
};
T.siteClicks.init();
function setScreen() {
    var a = arguments;
    if (a[0] || a[0] == 0) {
        s_cookie({
            store: "cookie"
        },
        "sts", +a[0]);
        s_cookie("sts", +a[0])
    } else {
        if (g_cookie("sts", cookieStore) == "0") {
            s_cookie({
                store: "cookie"
            },
            "sts", "1");
            s_cookie("sts", "1")
        } else {
            s_cookie({
                store: "cookie"
            },
            "sts", "0");
            s_cookie("sts", "0")
        }
    }
    location.reload()
}
T.localSites = {
    'callback': function(a) {
        if (!a || !a.items || !a.info) {
            return
        };
        var b = $('J_loacl'),
        arr = [],
        items = a.items,
        info = a.info,
        i = 0;
        arr.push('<dt><strong><a href="' + info.url + '"  tj="5" onclick="allCount(\'local_0\')">' + info.name + '</a></strong></dt>');
        arr.push('<dd><ul  id="local">');
        for (; i < items.length; i++) {
            arr.push('<li><a href="' + items[i].url + '" onclick="allCount(\'local_' + (i + 1) + '\')">' + items[i].name + '</a></li>')
        }
        arr.push('</ul><a class="more" href="' + info.url + '" tj="6" onclick="allCount(\'local_8\')">更多&raquo;</a></dd>');
        b.innerHTML = arr.join('');
        if (g_cookie('lc', cookieStore) === '58238') {
            var c = $('bddh');
            c.href = 'http://city.2345.com/nanjing/?k';
            c.innerHTML = '南京新闻热线·南京导航';
            c.style.display = ''
        }
        T.siteClicks.setLight()
    },
    'init': function() {
        var a = g_cookie('lc') || 'local',
        url = 'http://www.2345.com/right/site/local/' + a + '.js';
        T.getScript(url);
        localStorage.removeItem('localNav')
    }
};
var loadXml = T.localSites.init;
function createXm() {
    var a = $c('input');
    a.setAttribute('id', 'sitianqi');
    a.setAttribute('type', 'hidden');
    document.getElementsByTagName('body')[0].appendChild(a)
}
function UrlEncode_self(c) {
    c = c.replace(/./g,
    function(a) {
        if (isIE) {
            window.EnCodeStr = "";
            window.sHex = a;
            window.execScript('window.EnCodeStr=Hex(Asc(window.sHex))', "vbscript");
            return window.EnCodeStr.replace(/../g, "%$&")
        } else {
            var b = '',
            _cc = a.charCodeAt(0);
            if (_cc <= 128) {
                a = _cc;
                b += '%'
            }
            return b + a.toString(16)
        }
    });
    return c
}
function clickCount(a) {
    var b = arguments,
    web = "ajax",
    url, img;
    if (b.length > 1) web = b[1];
    url = 'http://union2.50bang.org/web/' + web + '?uId2=SPTNPQRLSX&r=' + encodeURIComponent(document.location.href) + '&fBL=' + screen.width + '*' + screen.height + '&lO=' + (web === 'ajax56' ? UrlEncode_self(a) : encodeURIComponent(a));
    img = new Image();
    img.onload = img.onerror = img.onabort = function() {
        img.onload = img.onerror = img.onabort = null;
        img = null
    };
    img.src = url;
    return true
}
function allCount(a, b) {
    if (b && b.parentNode.parentNode.id == 'local') {
        var c = g_cookie("lc"),
        c = !c || c == "" ? 1 : c;
        a = a + "?lctj=" + c
    }
    if (b && b.getAttribute("tj")) {
        a = a + "?tj=" + b.getAttribute("tj")
    }
    var d = 'http://union2.50bang.org/web/ajax2?uId2=SPTNPQRLSX&r=' + encodeURIComponent(document.location.href) + '&fBL=' + screen.width + '*' + screen.height + '&lO=' + encodeURIComponent(a);
    if (a.substring(0, 6) == 'visits') {
        d += encodeURIComponent(b.href)
    }
    var e = new Image();
    e.onload = e.onerror = e.onabort = function() {
        e.onload = e.onerror = e.onabort = null;
        e = null
    };
    e.src = d;
    if ($CONFIG['wideScreen']) {
        var f = 'http://union2.50bang.org/web/ajax65?uId2=SPTNPQRLSX&r=' + encodeURIComponent(document.location.href) + '&fBL=' + screen.width + '*' + screen.height + '&lO=' + encodeURIComponent(a);
        if (a.substring(0, 6) == 'visits') {
            f += encodeURIComponent(b.href)
        }
        var g = new Image();
        g.onload = g.onerror = g.onabort = function() {
            g.onload = g.onerror = g.onabort = null;
            g = null
        };
        g.src = f
    }
    return true
}
bindEvent(document, 'click',
function(e) {
    var e = e || event,
    target = e.target || e.srcElement;
    if (target.nodeName != 'A' && (target = target.parentNode).nodeName != 'A') {
        return
    }
    if (target.href != '') {
        allCount(target.href, target)
    }
});
function sug(a) {
    try {
        $("bdSug_search1").style.display = "none";
        $("bdSug_search2").style.display = "none"
    } catch(e) {}
    _active = $("search" + a) ? $("search" + a) : $("search1");
    if (_active.getAttribute("autocomplete") != "off") {
        return false
    }
    var b = {
        "XOffset": 0,
        "YOffset": 0,
        "sugSubmit": true,
        "openAd": true
    };
    BaiduSuggestion.bind(_active, b)
}
function init() {
    try {
        is2345 || (top.getLogo && top.getWebsiteUrl && setLogo(top.getLogo(), top.getWebsiteUrl()))
    } catch(e) {}
    $("search1").onfocus = function() {
        sug(1)
    };
    $("search2").onfocus = function() {
        sug(2)
    };
    var a = document.activeElement;
    if (!_active) {
        if (a.id != "search2" || a.tagName == "BODY") {
            _active = $("search1")
        }
    }
    _active = _active || a;
    setTimeout(function() {
        _active.focus();
        _active.onfocus();
        _active.value += "";
        setTimeout(function() {
            $("search1").onfocus = function() {
                this.select();
                sug(1)
            };
            $("search2").onfocus = function() {
                this.select();
                sug(2)
            }
        })
    },
    0);
    T.bottomSearchMod.change(localStorage.getItem('fshType'), true);
    var b = g_cookie("wc_sf");
    var c = g_cookie("lc");
    if (b) {
        s_cookie({
            store: "cookie"
        },
        "wc_sf", b)
    }
    if (c) {
        s_cookie({
            store: "cookie"
        },
        "lc", c)
    }
    var d = g_cookie("gy", cookieStore);
    var f = new RegExp("setM,");
    var g = f.test(d);
    var h = 1;
    var i = g_cookie("mystyle_display");
    if (!g && h && !i) {
        $("mystyletip").style.display = "block";
        setTimeout(function() {
            $("mystyletip").style.display = "none"
        },
        8000);
        if (d == null) d = '';
        s_cookie({
            store: "cookie"
        },
        "gy", d + 'setM,')
    }
}
bindEvent(window, "load", init);
function setLogo(a, b) {
    var c = $("websiteLogo");
    if (c !== null) {
        var d = c.parentNode,
        style = d.style;
        if (isIE6 && /\.png/.test(a)) {
            style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + a + "',sizingMethod='crop');"
        } else {
            style.filter = "";
            style.background = "url(" + a + ") no-repeat"
        }
        d.onclick = function() {
            T.setHomePage(d, b)
        }
    }
}
chkLogin();
window.onerror = function() {
    return true
};
window.onbeforeunload = function() {
    try {
        document.documentElement.scrollTop = 0;
        document.body.scrollTop = 0
    } catch(e) {}
    $('search1').value = $('search2').value = ''
};
function dispalyDiv(a, b) {
    if ($("city_set_ifr").src == "about:blank") {
        $("city_set_ifr").src = "http://tianqi.2345.com/city_wea_set2345_0814.htm"
    }
    $(a).style.display = "none";
    $(b).style.display = "block"
}
if (typeof(HTMLElement) != "undefined") {
    HTMLElement.prototype.contains = function(a) {
        while (a != null && typeof(a.tagName) != "undefind") {
            if (a == this) {
                return true
            }
            a = a.parentNode
        }
        return false
    }
}
function hide_userct_box(a, b) {
    if (a) {
        var c = navigator.userAgent;
        if (b == 'userct1') {
            var d = $('userct1')
        } else if (b == 'userct2') {
            var d = $('userct2')
        } else if (b == 'userct3') {
            var d = $('userct3')
        }
        if (c.indexOf("MSIE") > 0) {
            if (d.contains(event.toElement)) {
                return
            }
        } else {
            if (d.contains(a.relatedTarget)) {　　
                return
            }
        }
    }
    hide_userct(b)
}
function show_userct(a) {
    if ($(a + '_a').className == 'drop') {
        $(a + '_a').className = 'drop drop_h';
        $(a + '_down').style.display = 'block';
        if (isIE6) {
            if ($(a + '_iframe')) {
                $(a + '_iframe').style.display = ''
            } else {
                var b = {
                    'userct1': 'width:55px; height:54px; position:absolute; top:27px; right:0; _right:-1px;',
                    'userct2': 'width: 93px; height:114px; position: absolute; top: 27px; right: 0px; _right:-1px;',
                    'userct3': 'width:93px; height:170px; position:absolute; top:27px; right:0; _right:-1px;'
                },
                _iframe = $c('iframe');
                _iframe.id = a + '_iframe';
                _iframe.frameborder = 0;
                _iframe.style.cssText = b[a];
                $(a).appendChild(_iframe)
            }
        }
    }
}
function hide_userct(a) {
    $(a + '_a').className = 'drop';
    $(a + '_down').style.display = 'none';
    if ($(a + '_iframe')) {
        $(a + '_iframe').style.display = 'none'
    }
}
function login2345cn(a) {
    var b = $c('iframe');
    b.width = b.height = b.frameborder = 0;
    b.src = 'http://bbs.2345.cn/api/passport.php?action=login&direct=0&cookieTime=604800&user_info=' + a;
    document.body.appendChild(b)
}
function chkLogin() {
    T.siteClicks.initRender();
    if (g_cookie("uid", cookieStore) > 0 && g_cookie("iden", cookieStore)) {
        var a = g_cookie("name_ie", cookieStore),
        data = a.split('%');
        if (data.length > 1) {
            a = '';
            for (i = 0; i < data.length; i++) {
                if (data[i] > 0) {
                    a += String.fromCharCode(data[i])
                }
            }
        } else {
            a = data
        }
        uName_n = subs(a, 10);
        $('userct2').style.display = 'none';
        $('userct3_a').innerHTML = uName_n;
        $('userct3_a').title = a;
        T.getScript('http://jifen.2345.com/jifen/ajax_jifen.php', {
            callback: function() {
                $('uJifen').innerHTML = '<b>积分:</b><em class="fred"><a href="http://jifen.2345.com/?f=index" style="margin:0;">' + (uJifen != 'error' ? (uJifen.substring(0, 7) == uJifen ? uJifen: (uJifen.substring(0, 4) + '...')) : '超时！') + '</a></em>'
            }
        });
        $('userct3').style.display = 'block'
    } else {
        $('userct3').style.display = 'none';
        $('userct2').style.display = 'block'
    }
}
T.logout = function(a) {
    if (a) {
        mystyleInit.set('skin', '0');
        mystyleInit.set('theme', '-1')
    }
    if (!localStorage.getItem('siteon')) {
        T.siteClicks.saveToUnlogined()
    }
};
T.browser = function(b) {
    var c = b.document,
    ua = navigator.userAgent.toLowerCase(),
    getEnv = function(a) {
        return (a = ua.match(RegExp(a + '\\b[ \\/]?([\\w\\.]*)', 'i'))) ? a.slice(1) : ['', '']
    },
    addSearchProviderEnabled = function() {
        return !! (window.external && typeof window.external.AddSearchProvider != 'undefined' && typeof window.external.IsSearchProviderInstalled != 'undefined')
    },
    detect360chrome = function() {
        return 'track' in document.createElement('track')　 && 'scoped' in document.createElement('style')
    },
    is360se = false,
    is2345 = function() {
        var a = false;
        try {
            if (b.external.RCCoralGetItem() === false) {
                a = true
            }
        } catch(e) {
            a = false
        }
        return a
    } (),
    getMaxthonVer;
    try {
        if (/(\d+\.\d)/.test(b.external.max_version)) {
            getMaxthonVer = parseFloat(RegExp.$1)
        }
    } catch(e) {}
    if (!is2345 && !addSearchProviderEnabled()) {
        try {
            if (String(window.external)) {
                is360se = true
            }
        } catch(e) {}
    }
    var d = getEnv('(msie|safari|firefox|chrome|opera)'),
    getShell;
    d[0] === 'msie' ? is2345 ? getShell = ['2345Explorer', ''] : is360se ? getShell = ['360se', ''] : getMaxthonVer ? getShell = ['maxthon', getMaxthonVer] : getShell == ',' && (getShell = getEnv('(tencenttraveler)')) : d[0] === 'safari' && (d[1] = getEnv('version') + '.' + d[1]);
    getShell = getEnv('(maxthon|360se|360chrome|theworld|se|greenbrowser|qqbrowser|lbbrowser|2345Explorer)');
    if (d[0] === 'chrome') {
        if (detect360chrome()) {
            getShell = 'v8Locale' in window ? ['360se', ''] : ['360chrome', '']
        }
    }
    if (!getShell[0] && ("" + window.external) == "undefined") {
        getShell = ['msie', '']
    }
    if (is2345) {
        getShell = ['2345Explorer', '']
    }
    return {
        isShell: !!getShell[0],
        shell: getShell,
        types: d,
        chrome: d[0] === 'chrome' && d[1],
        firefox: d[0] === 'firefox' && d[1],
        ie: d[0] === 'msie' && d[1],
        opera: d[0] === 'opera' && d[1],
        safari: d[0] === 'safari' && d[1],
        maxthon: getShell[0] === 'maxthon' && getShell[1],
        isTT: getShell[0] === 'tencenttraveler' && getShell[1]
    }
} (window);
T.setHomePage = function(b, c, d, e) {
    var f = T.browser,
    tgSetHomeUrl = top.location,
    tgReg = new RegExp('http://www.2345m.com/\\?k'),
    map = {
        '360se': '#',
        'se': '#',
        'chrome': '#',
        '2345Explorer': '#',
        'theworld': '#',
        'firefox': '#',
        'maxthon': '#',
        '360chrome': '#',
        'lbbrowser': '#',
        'qqbrowser': '#',
        'tencenttraveler': '#',
        'opera': '#',
        'safari': '#',
        'msie': '#'
    },
    go = function(a) {
        a = a || 'msie';
        window.open(map[a] + (e ? '#map_defined': ''))
    },
    getViewHeigth = function() {
        var a = document,
        html = a.documentElement,
        bd = a.body;
        return self.innerHeight || html && html.clientHeight || bd.clientHeight
    },
    hasSetHomePage = function(a) {
        if (a.isHomePage('http://www.2345m.com/?to=2345') || a.isHomePage('http://www.2345m.com/?t=2345') || a.isHomePage('http://www.2345m.com/') || a.isHomePage('http://www.2345m.com') || a.isHomePage('http://www.2345m.com/?to=ie6') || a.isHomePage('http://www.2345m.com/?t1=2345')) {
            return true
        }
        return false
    };
    if (!f.isShell) {
        if (f.ie && !d) {
            if (is2345 && tgReg.test(tgSetHomeUrl)) {
                c = tgSetHomeUrl
            }
            if (!$('J___sethomepage__')) {
                mystyleInit.loadCss('/Skins/mb/css/sethomepage.css', 'sethomepage');
                var g = document.createElement('DIV');
                g.id = 'J___sethomepage__';
                g.innerHTML = '<div class="pub_mask" id="J_pub_mask" style="display:none;"></div><div class="sethome sethome_s1" style="left:50%;display:none;" id="J_sethome_s1">点击将此网页用作唯一主页</div><div class="sethome sethome_s2" style="left:50%;display:none;"  id="J_sethome_s2">点击“是”</div><div class="sethome sethome_s2ie6" style="left:50%;display:none;"  id="J_sethome_s2ie6">点击“是”</div><div class="sethome sethome_s3" style="left:50%;margin-left:-186px;display:none;" id="J_sethome_s3"><div class="tit">主人，还没有将本站设为主页哦！</div><p>您可能正遭受恶意软件的强行篡改</p><p>建议您安装好用的浏览器，捍卫您的主页</p><a class="btn" href="http://www.google.cn/intl/zh-CN/chrome/" onclick = "clickCount(\'down2345Explorer\');">下载智能浏览器</a><p class="tips">智能拦截骚扰广告</p><span class="close" onClick="$(\'J_pub_mask\').style.display = $(\'J_sethome_s3\').style.display =\'none\';"></span></div>';
                document.body.appendChild(g)
            };
            var i = $('J_pub_mask'),
            J_sethome_s3 = $('J_sethome_s3'),
            h = getViewHeigth(),
            homePageFlag = false;
            b.style.behavior = 'url(#default#homepage)';
            if (hasSetHomePage(b)) {
                homePageFlag = true
            };
            b.setHomePage(c);
            if (!hasSetHomePage(b)) {
                scrollTo(0, 0);
                if (isIE6) {
                    i.style.height = (document.documentElement || document.body).scrollHeight
                }
                i.style.display = '';
                J_sethome_s3.style.top = (h - 238) / 2 + 'px';
                J_sethome_s3.style.display = ''
            } else {
                if ($('J_tipSet_ie6')) {
                    $('J_tipSet_ie6').style.display = 'none'
                }
                if (!homePageFlag) {
                    clickCount('hasSetHomePage')
                }
            }
        } else {
            go(f.types[0])
        }
    } else {
        go(f.shell[0])
    }
};
var mystyleInit = {
    myStyle_open: false,
    styleDiv: null,
    ifstyle: null,
    timer: null,
    counter: 0,
    step: 4,
    startVal: 0,
    endVal: 261,
    xDomain: true,
    loaded: false,
    randSkinCounter: 0,
    randSkinEl: $('J_randSkin'),
    move: function(t, b, c, d) {
        if ((t /= d / 2) < 1) return - c / 2 * (Math.sqrt(1 - t * t) - 1) + b;
        return c / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1) + b
    },
    init: function() {
        this.styleDiv = document.getElementById('showstyle');
        this.setZT();
        try {
            if (top.location == self.location || top.location && (top.location.href.indexOf(main) != -1)) {
                this.xDomain = false
            }
        } catch(e) {}
    },
    setZT: function() {
        var a = g_cookie('mystyle_display');
        if (a == 'zhuti') {
            var b = g_cookie('theme')
        } else if (a == 'theme') {
            var c = g_cookie('theme'),
            map = {
                '310': '42',
                '295': '43',
                '292': '44',
                '343': '45',
                '342': '46',
                '341': '47',
                '340': '48',
                '313': '49',
                '315': '50',
                '323': '51',
                '324': '52',
                '307': '53',
                '283': '54',
                '278': '55',
                '277': '56',
                '234': '57',
                '217': '58',
                '209': '59',
                '207': '60',
                '204': '61',
                '165': '62',
                '162': '63',
                '156': '64',
                '148': '65',
                '147': '66',
                '140': '67',
                '130': '68',
                '128': '69',
                '123': '70',
                '109': '71',
                '52': '72',
                '45': '73',
                '44': '74',
                '43': '75',
                '30': '76',
                '22': '77',
                '14': '78',
                '107': '79'
            };
            if (c) {
                b = map[c];
                if (b) {
                    this.set('mystyle_display', 'zhuti');
                    this.set('theme', b)
                }
            }
        }
        if (b && b != '-1' && b != '0' && b != 'null') {
            var d = '/zhuti' + $CONFIG['zhutiVer'] + '/' + b + '/';
            d += (this.get_cookie('sts') == 1) ? 'zhuti_w.css': 'zhuti_n.css';
            if (d != null) {
                this.loadCss(d, 'zhuti_css')
            }
        } else {
            var e = g_cookie('skin'),
            skin_path;
            if (e && e != '0' && e != 'NaN' && e != 'null') {
                skin_path = '/Skins/mb/css/n' + $CONFIG['skinVer'] + 'sd_' + e + ".css";
                this.loadCss(skin_path, 'skin_css')
            }
        }
    },
    loadCss: function(a, b) {
        var c = document.getElementById(b);
        var d = document.getElementsByTagName('head').item(0);
        if (c != null) {
            c.href = a
        } else {
            css = document.createElement('link');
            css.href = a;
            css.rel = 'stylesheet';
            css.type = 'text/css';
            css.id = b;
            d.appendChild(css)
        }
    },
    removeCss: function(a) {
        var b = document.getElementById(a);
        if (b) {
            b.parentNode.removeChild(b)
        }
    },
    show: function() {
        $('mystyle_wait').style.display = 'none';
        if (!this.loaded) {
            this.createIFR();
            return false
        } else {
            this.reload(true);
            clickCount('mystyle_skin');
            return false
        }
    },
    createIFR: function(a, i) {
        var b = document.createElement('IFRAME'),
        self = this,
        timer,
        wrapper = $('mystyle_wait');
        b.marginWidth = b.frameBorder = '0';
        b.width = '100%';
        b.height = '261';
        b.scrolling = 'No';
        b.allowTransparency = 'true';
        b.id = b.name = 'ifStyle';
        b.src = 'mystyle/myStyle_' + $CONFIG['mystyleVer'] + '.htm?v=' + ( + new Date);
        if (b.attachEvent) {
            b.attachEvent('onload',
            function() {
                self.loaded = true;
                wrapper.style.display = 'none';
                mystyleInit.show()
            })
        } else {
            b.onload = function() {
                self.loaded = true;
                wrapper.style.display = 'none';
                mystyleInit.show()
            }
        }
        this.styleDiv.getElementsByTagName('DIV')[0].appendChild(b);
        this.ifstyle = b;
        timer = setTimeout(function() {
            if (!self.loaded) {
                wrapper.innerHTML = '<table><tbody><tr><td><img src="images/mystyle_wait.gif" width="16" height="16"></td><td>正在加载“设置”菜单，请稍侯...如果无法打开，请Ctrl+F5刷新重试！</td></tr></tbody></table>';
                wrapper.style.display = '';
                clearTimeout(timer)
            }
        },
        500)
    },
    reload: function(a) {
        if (!a) {
            this.removeCss('skin_css');
            this.setZT();
            try {
                var b = g_cookie('theme'),
                zhuti = ifStyle.window.mystyle.zhuti;
                if (b && b != '-1' && b != '0' && b != 'null') {
                    zhuti.forwardToNowTypePage(g_cookie('theme'), true)
                } else {
                    zhuti.forwardToNowTypePage( - 1, true);
                    zhuti.setSkin(g_cookie('skin') || 0)
                }
                ifStyle.window.chkLogin()
            } catch(e) {}
            return
        }
        var c = this.styleDiv.style;
        clearTimeout(this.timer);
        if (this.myStyle_open === false) {
            if (c.display === 'none') {
                c.display = ''
            }
            if (this.counter < this.step) {
                this.counter++;
                this.styleDiv.style.height = this.move(this.counter, this.startVal, this.endVal, this.step) + 'px';
                this.timer = setTimeout(function() {
                    mystyleInit.reload(true)
                },
                16)
            } else {
                this.counter = 0;
                this.myStyle_open = true;
                $('J_setSkin').innerHTML = '收起';
                try {
                    var d = ifStyle.window.mystyle;
                    d.zhuti.forwardToNowTypePage(d.zhuti.now_selected_zhuti)
                } catch(e) {}
            }
        } else {
            if (this.counter < this.step) {
                this.counter++;
                this.styleDiv.style.height = this.endVal - this.move(this.counter, this.startVal, this.endVal, this.step) + 'px';
                this.timer = setTimeout(function() {
                    mystyleInit.reload(true)
                },
                16)
            } else {
                c.display = 'none';
                this.counter = 0;
                this.myStyle_open = false;
                this.initTab = null;
                $('J_setSkin').innerHTML = '换肤';
                try {
                    var d = ifStyle.window.mystyle;
                    d.zhuti.save(true)
                } catch(e) {}
            }
        }
    },
    randSkin: function() {
        var a = $CONFIG['randZhuti'][this.randSkinCounter];
        if (a === g_cookie('theme')) {
            this.randSkinCounter >= $CONFIG['randZhuti'].length - 1 ? this.randSkinCounter = 0 : this.randSkinCounter++;
            this.randSkin();
            return
        }
        this.set('mystyle_display', 'zhuti');
        this.set('theme', a);
        this.setZT();
        try {
            var b = ifStyle.window.mystyle;
            b.zhuti.forwardToNowTypePage(a, true)
        } catch(e) {}
        this.randSkinCounter >= $CONFIG['randZhuti'].length - 1 ? this.randSkinCounter = 0 : this.randSkinCounter++
    },
    set: function(a, b) {
        s_cookie(a, b);
        s_cookie({
            store: "cookie"
        },
        a, b)
    },
    get: function(a, b) {
        return g_cookie(a)
    },
    set_cookie: function(a, b) {
        s_cookie({
            store: "cookie"
        },
        a, b)
    },
    get_cookie: function(a) {
        return g_cookie(a, cookieStore)
    },
    del_cookie: function(a) {
        if (!cookieStore) cookieStore.init();
        cookieStore.del(a)
    },
    initPage: function() {
        try {
            ifStyle.window.mystyle.zhuti.init(true)
        } catch(e) {}
    }
};
mystyleInit.init();