function findPosX(obj)
{
	var curleft = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	}
	else if (obj.x)
		curleft += obj.x;
	return curleft;
}

function findPosY(obj)
{
	var curtop = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}
	else if (obj.y)
		curtop += obj.y;
	return curtop;
}
function show() { document.getElementById('study_components').style.display = "block"; }
function hide() { document.getElementById('study_components').style.display = "none" }
function toggle_hide(e){
	lnk = document.getElementById('study_link');
	var posx = findPosX(lnk);
	var posy = findPosY(lnk) + 20;

  var listElementStyle=document.getElementById('study_components').style;
  if (listElementStyle.display=="none"){
	   listElementStyle.display="block";
  }
  else {
		 listElementStyle.display="none";
  }
	listElementStyle.position = "absolute";
	listElementStyle.top = posy + 'px';
	listElementStyle.left = posx + 13 + 'px';	
	if (navigator.userAgent.toLowerCase().indexOf("msie") == -1) {
		 listElementStyle.left = posx - 1 + "px";
	}
}

