﻿// JScript 文件

function OnLeftMenuClick(id)
{

    var tab = document.getElementById("lmTab_" + id);
    var td = document.getElementById("lmTd_" + id);
    var tr=document.getElementById("lmTr_" + id);
    
    if(!tab)
        return;
    if(tab.style.display == "none")
    {
        tab.style.display = "";
        td.className="td-collapse";
        tr.style.display="";
    }
    else
    {
        tab.style.display = "none";
         tr.style.display= "none";
        td.className="td-expand";
    }
    
}
function treemouseOver(temp){
    temp.className="item-move";
    }
function treemouseOut(temp){
    temp.className="item-normal";
    }

function menuFix() {
 var sfEls = document.getElementById("nav").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;
