﻿
//if (document.getElementById("myFocus")) {
//    myFocus.set({
//        id: 'myFocus', //焦点图盒子ID
//        pattern: 'mF_expo2010', //风格应用的名称
//        time: 3, //切换时间间隔(秒)，省略设置即不自动切换
//        trigger: 'click', //触发切换模式:'click'(点击)/'mouseover'(悬停)，默认'click'
//        width: 300, //设置宽度(主图区)
//        height: 225, //设置高度(主图区)
//        txtHeight: 'default'//文字层高度设置,'default'为默认高度，0为隐藏，默认'default'
//    });
//}

if (document.getElementById("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 = "晚上";
        document.getElementById("showtime").innerHTML = now.toLocaleDateString() + " 星期" + weekarr[now.getDay()] + " " + now.toLocaleTimeString() + " " + thn;
        setTimeout(nowtime, 1000);
    }
    nowtime();
}

//if (document.getElementById('linkXS') && document.getElementById('linkJS') && document.getElementById('showXS') && document.getElementById('showJS')) {
//    var linkArr = [document.getElementById('linkXS'), document.getElementById('linkJS')];
//    var showArr = [document.getElementById('showXS'), document.getElementById('showJS')];
//    var swtimer = null;
//    var swhover = false;
//    function spiShow(n) {
//        var a = -1;
//        if (swtimer != null) clearTimeout(swtimer);
//        if (swhover) return;
//        for (var i = 0; i < linkArr.length; i++) {
//            if (linkArr[i].className == 'hover') a = i;
//            linkArr[i].value = i;
//            linkArr[i].className = '';
//            showArr[i].style.display = 'none';
//            linkArr[i].onmouseover = function() { swhover = false; if (swtimer != null) clearTimeout(swtimer); for (var y = 0; y < linkArr.length; y++) { linkArr[y].className = ''; showArr[y].style.display = 'none'; } this.className = 'hover'; showArr[this.value].style.display = 'block'; };
//            linkArr[i].onmouseout = function() { swhover = true; spiShow(0); };
//            showArr[i].onmouseover = function() { swhover = false; if (swtimer != null) clearTimeout(swtimer); };
//            showArr[i].onmouseout = function() { swhover = true; spiShow(0); };
//        }
//        if ((a + n) == linkArr.length) a = -1;
//        linkArr[a + n].className = 'hover';
//        showArr[a + n].style.display = 'block';
//        swtimer = setTimeout(function() { spiShow(1); }, 3000);
//    }
//    spiShow(0);
//}
