
popX = 20;
popY = 70;
function setVisible(obj) {
  obj2 = document.getElementById('creategrouplink');
  //obj2.left;
  //obj2.top;
  //alert(obj2.offsetLeft + ' ' + obj2.offsetTop);
  var xyPos = findPos(obj2);
  
  obj = document.getElementById(obj);
  popX = xyPos[0]+80;
  popY = xyPos[1]-80;
  obj.style.visibility = (obj.style.visibility == 'visible') ? 'hidden' : 'visible';
}
function findPos(obj) {
	var curleft = curtop = 0;
	if (obj.offsetParent) {
	  do {
	    curleft += obj.offsetLeft;
	    curtop += obj.offsetTop;
	  } while (obj = obj.offsetParent);
	}
	return [curleft,curtop];
}
function placeIt(obj) {
  obj = document.getElementById(obj);
  if (document.documentElement) {
    theLeft = document.documentElement.scrollLeft;
    theTop = document.documentElement.scrollTop;
  }
  else if (document.body) {
    theLeft = document.body.scrollLeft;
    theTop = document.body.scrollTop;
  }
  theLeft += popX;
  theTop += popY;
  obj.style.left = theLeft + 'px';
  obj.style.top = theTop + 'px';
  // couldn't get the following line to work
  // must be placed outside this function
  //window.onscroll = setTimeout("placeIt('creategrouplink')", 500);
}
