// 加入收藏 *符合多种浏览器* 
function addfavorite()
{
   if (document.all)
   {
      window.external.addFavorite('http://www.hanweis.com','维易Weeasy让您的IT管理更简易——上海翰纬信息科技有限公司');
   }
   else if (window.sidebar)
   {
      window.sidebar.addPanel('维易Weeasy让您的IT管理更简易——上海翰纬信息科技有限公司', 'http://www.hanweis.com', "");
   }
} 

// 设为首页 *符合多种浏览器* 
function SetHome(obj,vrl){
        try{
          obj.style.behavior='url(#default#homepage)';obj.setHomePage(vrl);
        }
        catch(e){
                if(window.netscape) {
                    try {
                       netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");  
                        }  
                    catch (e)  { 
                        alert("此操作被浏览器拒绝！\n请在浏览器地址栏输入“about:config”并回车\n然后将[signed.applets.codebase_principal_support]设置为'true'");  
                        }
                        var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
                        prefs.setCharPref('browser.startup.homepage',vrl);
                 }
        }
}

// 鼠标经过显示菜单
var menuids=["submenu"] //Enter id(s) of SuckerTree UL menus, separated by commas

function buildsubmenus(){
for (var i=0; i<menuids.length; i++){
  var ultags=document.getElementById(menuids[i]).getElementsByTagName("ul")
    for (var t=0; t<ultags.length; t++){
    ultags[t].parentNode.getElementsByTagName("a")[0].className="subfolderstyle"
    ultags[t].parentNode.onmouseover=function(){
    this.getElementsByTagName("ul")[0].style.display="block"
    }
    ultags[t].parentNode.onmouseout=function(){
    this.getElementsByTagName("ul")[0].style.display="none"
    }
    }
  }
}

if (window.addEventListener)
window.addEventListener("load", buildsubmenus, false)
else if (window.attachEvent)
window.attachEvent("onload", buildsubmenus)

