var descrip;

function setdescrip() {
  descrip = document.getElementById("descrip"); 
}

function show_info(which) 
{ 
  var link = document.getElementById(which);
  descrip.innerHTML = info[which];
}
function clear_info() {
  descrip.innerHTML = "";
}

function getRealLeftPos(el) {
  iPos = 0
  while (el!=null) {
    iPos += el.offsetLeft
    el = el.offsetParent
  }
  return iPos
}

function getRealTopPos(el) {
  iPos = 0
  while (el!=null) {
    iPos += el.offsetTop
    el = el.offsetParent
  }
  return iPos
}

function showtip(current,which) {
  if (!info[which]) return;
  var tooltip = document.getElementById("tooltip");
  if (tooltip == null) return
  tooltip.style.left = getRealLeftPos(current) + current.offsetWidth + 10; 
  tooltip.style.top  = getRealTopPos(current) + 20; 
  tooltip.style.display="block"
  tooltip.innerHTML = info[which];
}

function hidetip() {
  var tooltip = document.getElementById("tooltip");
  if (tooltip == null) return
  tooltip.style.display="none"
}
