boxCount = 6;
document.onmouseover = hideAllBoxes;

function raiseDesc(whatBox, eventObj, descObj, xdir, ydir) 
{
	hideAllBoxes();
	eventObj.cancelBubble = true;
	var boxId = 'desc' + whatBox;
	moveObject(boxId,eventObj,descObj,xdir,ydir);
	if(changeObjectVisibility(boxId, 'visible', 100))
	{
		return true;
  } 
	else 
	{
		return false;
  }
}

function moveObject(obj,e,buttonObj,xdir,ydir) 
{
	var tempX = findPosX(buttonObj);
	var tempY = findPosY(buttonObj);
	var boxHeight = 0;
	var boxWidth = 0;
	var objBoxStyle = getStyleObject(obj);
	if (objBoxStyle == null) return;

	if(typeof(window.innerWidth) == 'number')
	{
		var objBox = document.getElementById(obj);
		boxHeight = objBox.height;
		boxWidth = objBox.width;
	}
	if(typeof(document.body.offsetWidth) == 'number')
	{
		var objBox = document.getElementById(obj);
		boxHeight = objBox.scrollHeight;
		boxWidth = objBox.scrollWidth;
	}	
	
	boxHeight = (boxHeight) * ydir;
	boxWidth = boxWidth * xdir;

	if (tempX < 0){tempX = 0}
	if (tempY < 0){tempY = 0}

	objBoxStyle.top = (tempY + (boxHeight + 10)) + 'px';
	objBoxStyle.left = (tempX + boxWidth) + 'px';
}

function hideAllBoxes() 
{
	for(counter = 1; counter < boxCount+1; counter++) 
	{
		changeObjectVisibility('desc' + counter, 'hidden', 0);
	}
}

function findPosX(obj)
  {
    var curleft = 0;
    if(obj.offsetParent)
		{
        while(obj = obj.offsetParent) 
        {
          curleft += obj.offsetLeft;
        }
		}
    else if(obj.x)
		{
        curleft += obj.x;
		}
    return curleft;
  }

function findPosY(obj)
  {
    var curtop = 0;
    if(obj.offsetParent)
		{
        while(obj = obj.offsetParent)
        {
          curtop += obj.offsetTop;
        }
		}
    else if(obj.y)
		{
        curtop += obj.y;
		}
    return curtop;
  }