function showObject(event, myObject) {
  infoobject = document.getElementById(myObject);
  if (window.event) {
    posx = document.body.scrollLeft+window.event.x+15;
    posy = document.body.scrollTop+window.event.y;
  }
  else {
    posx = document.body.scrollLeft+event.clientX+15;
    posy = document.body.scrollTop+event.clientY;
  }
  infoobject.style.position = "absolute";
  infoobject.style.left = posx+"px";
  infoobject.style.top = posy+"px";
  infoobject.style.visibility = "visible";
}

function hideObject(myObject) {
  infoobject = document.getElementById(myObject);
  infoobject.style.visibility = "hidden";
}

function initInfoObject(myInfocontainer, myInfoobject) {
  var infocontainer = document.getElementById(myInfocontainer);
  infocontainer.onmouseover = function () {
    document.onmousemove = function (event) {
      showObject(event, myInfoobject);
    }
  }
  infocontainer.onmouseout = function () {
    document.onmousemove = function () {
      hideObject(myInfoobject);
    }
  }
}

function initMenuObject(myInfocontainer, myInfoobject) {
  var infocontainer = document.getElementById(myInfocontainer);
  infocontainer.onclick = function (event) {
    showObject(event, myInfoobject);
  }
  var infoobject = document.getElementById(myInfoobject);
  infoobject.onclick = function () {
    hideObject(myInfoobject);
  }
}

