var pref="null", suff="null", xx = "null", yy = "null";
var mx = "null", my = "null", now="null",tid, sx, tid2;
if (navigator.appName == "Netscape")
{
//alert(navigator.appName)
pref="document.layers['";suff="']";xx=".left";yy=".top";
 mx="event.pageX";
 my="event.pageY";
 sx="innerWidth-16";}
else
{pref="document.all.item('";suff="').style";xx=".pixelLeft";yy=".pixelTop";
 mx="window.event.clientX";
 my="document.body.scrollTop+window.event.clientY";
 sx="document.body.clientWidth";
}
function hideall() {
 if (now!="null") {
  eval(pref+now+suff+xx+' = '+ 0);
  eval(pref+now+suff+'.visibility="hidden"');
  clearTimeout(tid);
  now="null";
  }}
function hide(who){
if (who!="null") {
 eval(pref+who+suff+xx+' = '+ 0);
 eval(pref+who+suff+'.visibility="hidden"');
 }}

function show(who,x,y,menu)
{
subMenuOver(menu);
hide(now);
hide(who);
now=who;
t=0;
if (tid!=null) {clearTimeout(tid); t=1;}
tid=setTimeout("hideall;",5000);
//sx="document.body.clientWidth";
//sx2=(eval(sx));
//if (eval(sx)<((780)) {sx2=780;}
//alert(eval(sx));
//eval(pref+who+suff+xx+' = (' + 'x');
//alert(document.all.item('lid0').offsetParent.offsetParent.id);
//alert(document.all.item('tdh0').parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.);
curr=document.all.item('td'+who);
yyy=0;
//yyt='';
while (curr.tagName!="BODY") {
 if (curr.tagName!="TD") yyy=yyy+curr.offsetTop;
 curr=curr.parentElement;
// yyt=yyt+' '+curr.tagName+'('+curr.offsetTop+')';
}
//alert (yyt);
if (x==0) {
 curr=document.all.item('tda'+who);
 xxx=curr.offsetWidth+25;
 while (curr.tagName!="BODY") {
  if (curr.tagName!="TD") xxx=xxx+curr.offsetLeft;
  curr=curr.parentElement;
 }
} else {
 xxx=x;
}

eval(pref+who+suff+xx+' = '+xxx);
eval(pref+who+suff+yy+' = '+yyy);
eval(pref+who+suff+'.visibility="visible"');
}
function hiding(menu) {
 subMenuOut(menu)
 if (tid!=null) {clearTimeout(tid);}
 tid=setTimeout("hideall();",500);
}
function ClearTopTime() { if (tid2!=null) {clearTimeout(tid2);}}
function nover(){
if(navigator.appName=="Netscape") clearTimeout(tid);
}
function nout(menu){
if(navigator.appName=="Netscape") hiding(menu);
}
function subMenuOver(menu){
 if (navigator.appName != "Netscape"){
  //eval("document.all['menu"+menu+"'].style.background = '#D2D7EA'");
  //eval(pref+"menu"+menu+suff+".background = '#D2D7EA'");
  }
}

function subMenuOut(menu){
 if (navigator.appName != "Netscape"){
  //eval("document.all['menu"+menu+"'].style.background = '#F1F1F1'");
  //eval(pref+"menu"+menu+suff+".background = '#F1F1F1'");
  }
}