

function GetElement(id) { if (!document.getElementById) return(null); return(document.getElementById(id)); }
function SetVis(id,v) { var o=GetElement(id); if (o) { o.style.visibility=(v)?'visible':'hidden'; } }


var NavButtons=new Object(); var NavTimer=null; var curNav=null;
function GetNav(id) { var N=NavButtons[id]; if (N) return(N); var N=NavButtons[id]=new Object; N.id=id; N.td=GetElement('navlink_'+id); N.menu=GetElement('dmenu_'+id); return(N); }
function HoverNav(id,n) { var N=GetNav(id); N.hover=n; SetNav(N); clearTimeout(NavTimer); if (n) { if(curNav) { SwapNav(id); } else { NavTimer=setTimeout("SwapNav('"+id+"')",250); } } else { NavTimer=setTimeout('SwapNav()',1000); }  }
function SetNav(N) { var v=0; if ((N.hover)||(N.on)) v=1; N.td.className=(v)?'navlinkover':'navlink'; SetVis('dmenu_'+N.id,N.on); }
function SwapNav(id) { var N=GetNav(id); if (curNav) { curNav.on=0; SetNav(curNav); curNav=null; } if (id==null)return; if (!N.menu) return; curNav=N; N.on=1; SetNav(N); }
function HoverMenu(n) { clearTimeout(NavTimer); if (n==0) { NavTimer=setTimeout('SwapNav()',1000); } }
function HoverMenuLink(div,n) { if (!div) return; div.className=(n)?'dlinkover':'dlink'; /* status=(n)?div.firstChild.href:'';*/ }
function GoMenuLink(div) { top.location.href=div.firstChild.href; }


function rowHover(row,n) { if (row.xclass==null) row.xclass=row.className; row.className=row.xclass + ((n)?'over':''); }
