
// Timing and positioning constants for tool tip display.

var toolTipWait = 250;    // Delay before showing tool tip.
var toolTipShow = 15000;    // Time to keep tool tip active.

function startToolTip(name) {

  var tip = getLayer(name);

  // Clear out any pending timer.

  if (tip.timerID)
    clearTimeout(tip.timerID);

  // Set timer to show tool tip.

  tip.timerID = setTimeout('showToolTip("' + name + '")', toolTipWait);
}

function showToolTip(name) {

  var tip = getLayer(name);
  
  // Clear out any pending timer.

  if (tip.timerID)
    clearTimeout(tip.timerID);

  // Position and show the tool tip.

  moveLayerTo(tip, 420, 145);
  showLayer(tip);
        
  // Set timer to hide the tool tip after a delay.

  tip.timerID = setTimeout('hideToolTip("' + name + '")', toolTipShow);
}

function hideToolTip(name) {

  var tip = getLayer(name);
  
  // Clear out any pending timer.

  if (tip.timerID)
    clearTimeout(tip.timerID);

  hideLayer(tip);
}


