/* */
timerID=null;
isLoaded=false;
layermenudirection=null;

function showMenu() {
  if (navigator.appVersion.substring(0,1)<4 || !isLoaded) return;
  if(timerID) {
    clearTimeout(timerID);
    timerID=null;
  }
  if (navigator.appName == 'Netscape') {
    if (document.layers['layerMenu']) {
      if (layermenudirection == 'horizontal') {
        document.layers['layerMenu'].x=2;
      } else {
        document.layers['layerMenu'].x=document.layers['quickfinder'].pageX+2;
      }
      document.layers['layerMenu'].y=document.layers['quickfinder'].pageY+70;
      document.layers['layerMenu'].visibility="visible";
    }
  } else {
    if (document.all['layerMenu']) {
      if (layermenudirection == 'horizontal') {
        document.all['layerMenu'].style.left=2;
      } else {
        document.all['layerMenu'].style.left=document.all['quickfinder'].parentElement.offsetLeft+4;
      }
      document.all['layerMenu'].style.top=document.all['quickfinder'].parentElement.offsetTop+document.all['quickfinder'].offsetHeight;
      document.all['layerMenu'].style.visibility="visible";
    }
  }
}

function hideMenu() {
  if (navigator.appName == 'Netscape') {
   if (document.layers['layerMenu']) {
    document.layers['layerMenu'].visibility="hidden";
   }
  } else {
   if (document.all['layerMenu']) {
    document.all['layerMenu'].style.visibility="hidden";
   }
  }
}
		
function fadeOut() {
  if (navigator.appVersion.substring(0,1)<4) return;
  if(timerID) {
    clearTimeout(timerID);
    timerID=null;
  }
  timerID=setTimeout("hideMenu()",500);
}


/* Function that swaps images. */

function di20(id, newSrc) {
    var theImage = FWFindImage(document, id, 0);
    if (theImage) {
        theImage.src = newSrc;
    }
}

/* Functions that track and set toggle group button states. */

function FWFindImage(doc, name, j) {
    var theImage = false;
    if (doc.images) {
        theImage = doc.images[name];
    }
    if (theImage) {
        return theImage;
    }
    if (doc.layers) {
        for (j = 0; j < doc.layers.length; j++) {
            theImage = FWFindImage(doc.layers[j].document, name, 0);
            if (theImage) {
                return (theImage);
            }
        }
    }
    return (false);
}

