function getcoords()
{
	
	blockWidth = document.getElementById('container').offsetWidth;
	blockHeight = document.getElementById('container').offsetHeight;
	blockDiv = document.getElementById('block');
	/* set the block's left */
	blockDiv.style.display="block";
}

function findPosX(obj)
  {
    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)
  {
    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 showPopup(tmpVal,strVal,divVal)
{
	/* get the objects X position */
	tmpX = document.getElementById(tmpVal);
	x = findPosX(tmpX);
	/* get the objects Y position */
	tmpY = document.getElementById(tmpVal);
	y = findPosY(tmpY);
	addLen = ((strVal.length / 2)*10)-10;
	/* display the pop-up */
	popup = document.getElementById(divVal);
	popup.style.display="block";
	/* set the pop-up's left */
	popup.style.left = (x + addLen) + 'px';
	/* set the pop-up's top */
	popup.style.top = (y + 10) + 'px';
}

function hidePopup(divVal)
{
  document.getElementById(divVal).style.display="none";
  blockDiv = document.getElementById('block');
	/* set the block's left */
	blockDiv.style.display="none";
}