﻿if (typeof $ != 'function') { window.$ = function(id) { return 'string' == typeof id ? document.getElementById(id) : id; }; }
eval(function(p, a, c, k, e, d) { e = function(c) { return (c < a ? '' : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36)) }; if (!''.replace(/^/, String)) { while (c--) d[e(c)] = k[c] || e(c); k = [function(e) { return d[e] } ]; e = function() { return '\\w+' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p } ('8 Z={k:c(7,a,6){8 g="Y";2(6==h||6==""||6=="X"){g="W";6=a;a=h}8 1;2(V.s){1=r s()}p{8 i=["d.9.5.0","d.9.4.0","d.9.3.0","d.9","U.9"];T(8 n=0;n<i.S;n++){q{1=r R(i[n]);Q}j(e){}}}2(1.b==h){1.b=0;1.P("O",c(){1.b=4;2(N 1.f=="c"){1.f()}},M)}L(1){q{2(7.K("?")>0){7+="&o="+m.l()}p{7+="?o="+m.l()}1.J(g,7,I);1.H("G-F","E/x-D-C-B");1.f=c(){2(1.b==4){2(1.A==z){6(1.y)}}};1.k(a)}j(e){w("1 v u t!")}}}};', 62, 62, '|xmlhttp|if||||func|url|var|XMLHTTP|param|readyState|function|MSXML2||onreadystatechange|method|null|MSXML|catch|send|random|Math||ajaxrandnum|else|try|new|XMLHttpRequest|failed|creation|object|alert||responseText|200|status|urlencoded|form|www|application|Type|Content|setRequestHeader|true|open|indexOf|with|false|typeof|load|addEventListener|break|ActiveXObject|length|for|Microsoft|window|GET|undefined|POST|ajax'.split('|'), 0, {}));
var loadfile = function(filesrc, filetype, callback, encoding) { var fileref = null; function load(bool, res) { encoding = encoding || 'utf-8'; if (filetype == 'js') { fileref = document.createElement('script'); fileref.setAttribute('type', 'text/javascript'); fileref.setAttribute('charset', encoding); fileref.setAttribute('src', filesrc); } if (filetype == 'css') { fileref = document.createElement('link'); fileref.setAttribute('rel', 'stylesheet'); fileref.setAttribute('type', 'text/css'); fileref.setAttribute('href', filesrc); } if (fileref == null) { if (bool) { callback(false); } } else { document.getElementsByTagName('head')[0].appendChild(fileref); if (bool) { callback(true); } } } if (typeof (callback) == 'function') { ajax.send(filesrc, function(res) { load(true, res); }); } else { load(false, ''); } };
onload = function() {
   
    if ($("navlist")) {
        (function() {
         alert($("navlist"));
            var sfEls = $("navlist").getElementsByTagName("li");
           
            alert($("navlist").getElementsByTagName("li"));
            for (var i = 1; i < sfEls.length; i++) {
                sfEls[i].onmouseover = function() { this.className += (this.className.length > 0 ? " " : "") + "sfhover"; };
                sfEls[i].onMouseDown = function() { this.className += (this.className.length > 0 ? " " : "") + "sfhover"; };
                sfEls[i].onMouseUp = function() { this.className += (this.className.length > 0 ? " " : "") + "sfhover"; };
                sfEls[i].onmouseout = function() { this.className = this.className.replace(new RegExp("( ?|^)sfhover\\b"), ""); };
            }
        })();    
    }
    if ($("showtime")) {
        var weekarr = new Array("日", "一", "二", "三", "四", "五", "六");
        function nowtime() {
            var now = new Date();
            var thn = "";
            if (now.getHours() >= 0 && now.getHours() < 6)
                thn = "凌晨";
            else if (now.getHours() >= 6 && now.getHours() < 12)
                thn = "上午";
            else if (now.getHours() >= 12 && now.getHours() < 18)
                thn = "下午";
            else
                thn = "晚上";
            $("showtime").innerHTML = "欢迎来访本站！ 当前时间：" + now.toLocaleDateString() + " 星期" + weekarr[now.getDay()] + " " + now.toLocaleTimeString() + " " + thn;
            setTimeout(nowtime, 1000);
        }
        nowtime();
    }
    if ($("wpboxtabs")) {
        var tabhover = false;
        function tabEvent(n) {
            if (tabhover) return;
            var w = 0;
            var tab = $("wpboxtabs").getElementsByTagName("a");
            var uls = $("wpboxtabs").parentNode.getElementsByTagName("ul");
            if (tab.length != uls.length || tab.length == 0) return;
            for (var i = 0; i < tab.length; i++) {
                if (tab[i].className == "hover") w = i;
                tab[i].value = i;
                tab[i].className = "";
                tab[i].onmouseover = function() { tabhover = true; for (var x = 0; x < tab.length; x++) { uls[x].style.display = "none"; tab[x].className = ""; } this.className = "hover"; uls[this.value].style.display = "block"; };
                tab[i].onmouseout = function() { tabhover = false; };
                uls[i].onmouseover = function() { tabhover = true; };
                uls[i].onmouseout = function() { tabhover = false; };
                uls[i].style.display = "none";
            }
            if (w + n == tab.length) { w = -1; }
            if (tab.length > 0) { tab[w + n].className = "hover"; uls[w + n].style.display = "block"; }
        }
        tabEvent(0);
        setInterval(function() { tabEvent(1); }, 5000);
    }
};

