﻿
//侧边栏广告
//var lastScrollY = 0;
//function heartBeat() {
//    var diffY;
//    if (document.documentElement && document.documentElement.scrollTop)
//        diffY = document.documentElement.scrollTop;
//    else if (document.body)
//        diffY = document.body.scrollTop
//    else
//    { /*Netscape stuff*/ }
//    //alert(diffY);
//    percent = .1 * (diffY - lastScrollY);
//    if (percent > 0) percent = Math.ceil(percent);
//    else percent = Math.floor(percent);
//    document.getElementById("zzjs_net_1").style.top = parseInt(document.getElementById("zzjs_net_1").style.top) + percent + "px";
//    document.getElementById("zzjs_net_2").style.top = parseInt(document.getElementById("zzjs_net_1").style.top) + percent + "px";
//    lastScrollY = lastScrollY + percent;
//    //alert(lastScrollY);
//}
//j1 = "<div id=\"zzjs_net_1\" style='left:2px;position:absolute;top:120px;'><img style='display:inline-block;float:right;cursor:pointer;margin:0 0 5px 0;' onclick='this.parentNode.style.display=\"none\"' src='image/close.gif' ><a href='other/business.aspx'><img style='display:inline-block;float:right;' border='0' src='image/ad_100x300.png' ></a></div>"
//j2 = "<div id=\"zzjs_net_2\" style='right:2px;position:absolute;top:120px;'><img style='display:inline-block;float:left;cursor:pointer;margin:0 0 5px 0;' onclick='this.parentNode.style.display=\"none\"' src='image/close.gif' ><a href='other/business.aspx'><img style='display:inline-block;float:left;' border='0' src='image/ad_100x300.png' ></a></div>"
//document.write(j1);
//document.write(j2);
//window.setInterval("heartBeat()", 1);



/*top导航条
function menuFix() {
    var sfEls = document.getElementById("menu").getElementsByTagName("li");
    for (var i = 0; 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"), "");
        }
    }
}
window.onload = menuFix();*/


/*left导航条
function navFix() {
    var sfEls = document.getElementById("mainNav").getElementsByTagName("li");
    for (var i = 0; i < sfEls.length; i++) {
        sfEls[i].onmouseover = function () {
            this.className += (this.className.length > 0 ? " " : "") + "sfhover";

        }

        sfEls[i].onmouseout = function () {
            this.className = this.className.replace(new RegExp("( ?|^)sfhover\\b"), "");
        }
    }
}
window.onload = navFix();*/



/***tab滑动门--Creo专用***/
function setTab(name, cursel, n) {
    for (i = 1; i <= n; i++) {
        var menu = document.getElementById(name + i);
        var con = document.getElementById("con_" + name + "_" + i);
        menu.className = i == cursel ? "hover" : "";
        con.style.display = i == cursel ? "block" : "none";
    }
}



/*******tab选项卡*******/
function showAr(id) {
    var b1 = document.getElementById("arDiv" + id);
    var b = document.getElementById("arDiv0");

    b1.style.display = "block";
    b.style.display = "none";
}

function hiddenAr(id) {
    var b1 = document.getElementById("arDiv" + id);
    var b = document.getElementById("arDiv0");

    b1.style.display = "none";
    b.style.display = "block";
}
















