﻿/*
母版页导航鼠标事件
*/

function $(ObjId){
    return document.getElementById (ObjId);
}

function isIE(){
   if(navigator.appName == "Microsoft Internet Explorer"){
       return true;
   }
   return false;
}

function JustOn(o){   
    o.className = "nav1";
    
    CurLmID = o.id;
    
    //先隐藏所有子栏目
    var ALLSubList = document.getElementsByName("MenuSub");
    
    if(isIE () && ALLSubList.length ==0){
        //IE下取不到同名列表
        for(var i=1;i<=9;i++){
            var tmpObj = document .getElementById ("MenuList_" + i + "_Sub");
            if(tmpObj !=null){tmpObj.style.display = "none";}
        }
    }
    
    for(var i=0;i<ALLSubList.length;i++){
        ALLSubList[i].style.display = "none";
    }
    //显示子栏目
    var SubLmObj = $(o.id + "_Sub");
    if(SubLmObj !=null){
        SubLmObj.style.display = "";
    }
}

function JustOut(o){  
    o.className = "nav3";
}


//<!--
//设为首页的代码
function SetMeHome(){
    if(window.confirm ("确定将本页面设为浏览器首页？")){
        var strHref=window.location.href;
        OpertarBar.style.behavior='url(#default#homepage)';
        OpertarBar.setHomePage(strHref);
    }
}
function add(){
    var sUrl = location.href;
    window.external.addFavorite(sUrl,'嘉兴华数');
}
//-->
