var ZoomVisible = null;

function ShowBox(anID) {
  if (ZoomVisible) { HideBox() }
  var Ctrl = document.getElementById('Zoom' + anID);
  var Itm = document.getElementById('Item' + anID);
  var mX = Itm.offsetLeft, mY = Itm.offsetTop;
  var xOver = 0;
  if (Ctrl) {
    ZoomVisible = Ctrl;
    Ctrl.style.left = Itm.offsetLeft; // Ctrl.offsetLeft + window.event.x;
    Ctrl.style.top = Itm.offsetTop;  // Ctrl.offsetTop + window.event.y;
    xOver = parseInt(document.body.clientWidth) - (parseInt(Ctrl.style.left) + 300);
    //alert(xOver);
    if (xOver < 0) {
      Ctrl.style.left = parseInt(Ctrl.style.left) + xOver;
    }
    Ctrl.style.display = 'inline';
    window.scrollTo(mX,mY);
  }
}

function HideBox() {
  if (ZoomVisible != null) {
    ZoomVisible.style.display = 'none';
  }
}
      