// 切换界面
function doClick_down(o) {
    var id;
    var j;
    var e;
    for (var i = 1; i <= 3; i++) {
        //取得导航栏里id里的值，如id = "d_1"
        id = "a" + i;
        //取得导航栏里id的属性，如"id" = d_1
        j = document.getElementById(id);
        //取得内容栏里的id的值，如id = "c_1"
        e = document.getElementById("c_" + i);
        if (id == o.id) {
            j.className = "a102";
            e.style.display = "block";
        }
        else {
            j.className = "a101";
            e.style.display = "none";
        }
    }
}
function zzgg01() {
    var zzgg = document.getElementById("a1");
    var gxzw = document.getElementById("a2");
    var rmzw = document.getElementById("a3");
    var gg01 = document.getElementById("c_1");
    var gg02 = document.getElementById("c_2");
    var gg03 = document.getElementById("c_3");

    zzgg.style.color = "#0868C8";
    gxzw.style.color = "#777777";
    rmzw.style.color = "#777777";
    zzgg.style.background = "none";
    gxzw.style.background = "url(images/gonggao_h1.jpg) repeat-x";
    rmzw.style.background = "url(images/gonggao_h1.jpg) repeat-x";
    gg01.style.display = "block";
    gg02.style.display = "none";
    gg03.style.display = "none";
}
function gxzw01() {
    var zzgg = document.getElementById("a1");
    var gxzw = document.getElementById("a2");
    var rmzw = document.getElementById("a3");
    var gg01 = document.getElementById("c_1");
    var gg02 = document.getElementById("c_2");
    var gg03 = document.getElementById("c_3");

    zzgg.style.color = "#777777";
    gxzw.style.color = "#0868C8";
    rmzw.style.color = "#777777";
    zzgg.style.background = "url(images/gonggao_h1.jpg) repeat-x";
    gxzw.style.background = "none";
    rmzw.style.background = "url(images/gonggao_h1.jpg) repeat-x";
    gg01.style.display = "none";
    gg02.style.display = "block";
    gg03.style.display = "none";
}
function rmzw01() {
    var zzgg = document.getElementById("a1");
    var gxzw = document.getElementById("a2");
    var rmzw = document.getElementById("a3");
    var gg01 = document.getElementById("c_1");
    var gg02 = document.getElementById("c_2");
    var gg03 = document.getElementById("c_3");

    zzgg.style.color = "#777777";
    gxzw.style.color = "#777777";
    rmzw.style.color = "#0868C8";
    zzgg.style.background = "url(images/gonggao_h1.jpg) repeat-x";
    gxzw.style.background = "url(images/gonggao_h1.jpg) repeat-x";
    rmzw.style.background = "none";
    gg01.style.display = "none";
    gg02.style.display = "none";
    gg03.style.display = "block";
}

function CreateAjax() {
    var AJAXML = false;
    try {
        AJAXML = new XMLHttpRequest();
    }
    catch (e) {
        try {
            AJAXML = new ActiveXObject("Msxml2.XMLHTTP");
        }
        catch (e) {
            try {
                AJAXML = new ActiveXObject("Microsoft.XMLHTTP");
            }
            catch (e) {
                AJAXML = false;
            }
        }
    }
    return AJAXML;
}

// 首页滚动公告
function startmarquee(height, speed, timeout) {
    var stopscroll = false;

    var demo = document.getElementById("demo");
    with (demo) {
        style.height = height;
        style.overflow = 'hidden';
        noWrap = true;
    }
    demo.onmouseover = new Function('stopscroll = true');
    demo.onmouseout = new Function('stopscroll = false');

    var preTop = 0;
    var currentTop = 0;
    var stoptime = 0;
    var demo2 = document.getElementById("demo1");
    demo.appendChild(demo2.cloneNode(true));

    init_srolltext();

    function init_srolltext() {
        demo.scrollTop = 0;
        setInterval(mouse, speed);
    }

    function mouse() {
        if (stopscroll == true) return;
        currentTop += 1;
        // 停止状态
        if (currentTop == height + 1) {
            stoptime += 1;
            currentTop -= 1;
            if (stoptime == timeout) {
                currentTop = 0;
                stoptime = 0;
            }
            // 滚动状态 
        } else {
            preTop = demo.scrollTop;
            demo.scrollTop += 1;
            if (preTop == demo.scrollTop) {
                demo.scrollTop = 0;
                demo.scrollTop += 1;
            }
        }
    }
}
// 显示/隐藏后台管理操作层
function YnEnterDiv(name) {
    var div = document.getElementById(name);
    //div.style.left = event.clientX - 20;
    //div.style.top = event.clientY + 10;
    if (div.style.display == 'block') {
        div.style.display = 'none';
    } else {
        div.style.display = 'block';
        setTimeout("closeYnEnterDiv('" + name + "')", 4000);
    }
}
function closeYnEnterDiv(name) {
    var div = document.getElementById(name);
    div.style.display = 'none';
}

// 知企图片弹出背景div效果
function showJobMenu(e) {
    //	alert(0);
    jQuery(e).parent().find('.menuskin').show();
}
function hideJobMenu(e) {
    jQuery(e).parent().find('.menuskin').hide();
}
function showMenu(e) {
    //	alert(0);
    jQuery(e).show();
}
function hideMenu(e) {
    jQuery(e).hide();
}
