function findPos(obj) {
  var curleft = 0;
  var curtop = 0;
  if (obj.offsetParent) {
    curleft = obj.offsetLeft
      curtop = obj.offsetTop
      while (obj = obj.offsetParent) {
	curleft += obj.offsetLeft
	curtop += obj.offsetTop
      }
  }
  return [curleft,curtop];
}

function showBox(txt, btn){
  pos = findPos(btn);
  document.getElementById('scoreInfoBox').innerHTML=txt + "<br/><b>(Click on this box to close)</b>";
  document.getElementById('scoreInfoBox').style.left=pos[0] + 'px';
  document.getElementById('scoreInfoBox').style.top=pos[1] + 'px';
  document.getElementById('scoreInfoBox').style.visibility= 'visible';
  document.getElementById('scoreInfoBox').style.display='';
}

function hideElement(el){
  el.style.display='none';
}