//// Show/hide division code for Abbeydale site ////
//

var sCurrent = "";
var tmrDiv = 0;
var dlyDiv = 333;

function showDiv(sDivId, evt)
  {
  // shut down currently open div first...
  if (sCurrent != "")
    shutDiv(sCurrent);
  // find new div to open...
  var el = document.getElementById(sDivId);
  if (el && evt)
    {
    el.style.position = "absolute";
    el.style.left = evt.clientX + 10 + "px";
    el.style.top = evt.clientY + 10 + "px";
    el.style.display = "block";
    // mark this as currently open div...
    sCurrent = sDivId;
    }
  return false;
  }

function hideDiv(sDivId)
  {
  tmrDiv = setTimeout("shutDiv(\""+sDivId+"\")", dlyDiv);
  return false;
  }

function keepDiv(sDivId)
  {
  //alert("sDivId="+sDivId+", sCurrent="+sCurrent);
  if (sDivId == sCurrent)
    clearTimeout(tmrDiv);
  return false;
  }

function shutDiv(sDivId)
  {
  var el = document.getElementById(sDivId);
  if (el)
    {
    clearTimeout(tmrDiv);
    el.style.display = "none";
    sCurrent = "";
    }
  return false;
  }