function showsub(id,h) {
  if (typeof(tim) != 'undefined') {
    if (tim) clearTimeout(tim);
  }
  if (typeof(ftim) != 'undefined') {
    if (ftim) clearTimeout(ftim);
  }
  fade(95);
  if (h) hideall();
  document.getElementById("mnu"+id).style.display = "block";
}
function hidesub(id) {
  document.getElementById("mnu"+id).style.display = "none";
}
function hideall() {
  for (i=1; i<8; i++) {
    hidesub(i);
  }
  fade(95);
}
function fade(v) {
  for (i=1; i<8; i++) {
    document.getElementById("mnu"+i).style.opacity = v/100;
    document.getElementById("mnu"+i).style.filter = "alpha(opacity=" + v + ")";
  }
  if (v==95) { return; }
  if (v>5) {
      ftim = setTimeout("fade(" + parseInt(v-5) + ");",50);
  }
  if (v==5) {
      ftim = setTimeout("hideall();",50);
  }
}
function startfade() {
  fade(90);
}
function countd() {
  tim = setTimeout("startfade();",500);
}