
function handleOut(elname) {
    // hides all popups, parameter is the div name
    // function called on onmouseout of hyperlink parameter

    d = document.getElementById(elname);
    d.style.left = "-2650px";

}

function SetLyr(obj1, lyr) {
    obj = document.getElementById(obj1);
    var newX = findPosX(obj);
    var newY = findPosY(obj);

    var x = document.getElementById(lyr);

    var finy = 0;
    var finx = 0;
    finx = newX;
    finy = newY + 45;



    //set final position
    x.style.top = finy + 'px';
    x.style.left = finx + 'px';



}

function findPosX(obj)
  { //recursively searches through dom to get x postion
    var curleft = 0;
    if(obj.offsetParent)
        while(1) 
        {
          curleft += obj.offsetLeft;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.x)
        curleft += obj.x;
    return curleft;
  }

  function findPosY(obj)
  {//recursively searches through dom to get y postion
    var curtop = 0;
    if(obj.offsetParent)
        while(1)
        {
          curtop += obj.offsetTop;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.y)
        curtop += obj.y;
    return curtop;
  }
  function ImgRestore(whichnav)
  {
  
      if (whichnav !== gOriginalnav)
      {
        el = document.getElementById(whichnav);
        el.parentNode.className = "";
      }
      
  }
