function showBox(where,whatBox,eventObj,direction,Xoffset,Yoffset)
{
	//hideBoxes();
	eventObj.cancelBubble = true;
	var directionArray = direction.split('^');
	var xOrY = directionArray[0];
	var dir = directionArray[1];
	whatBox = 'box' + whatBox;
  var styleObject = getStyleObject(whatBox);
  if(styleObject) 
	{
		var cords = findPos(where);
		var xPos = (cords[0]);
		var yPos = cords[1];
		var objBox = document.getElementById(whatBox);
		if(typeof(window.innerWidth) == 'number')
		{
			var docWidth = window.innerWidth;
			var boxHeight = objBox.height;
			var boxWidth = objBox.width;
			var targetWidth = where.width;
			var targetHeight = where.height;
		}
		if(typeof(document.body.offsetWidth) == 'number')
		{
			var docWidth = document.body.offsetWidth - 10;
			var boxHeight = objBox.offsetHeight;
			var boxWidth = objBox.offsetWidth;
			var targetHeight = where.offsetHeight;
			var targetWidth = where.offsetWidth;
		}
		//PUSH THE BOX VERTICAL OR HORZ
		if(xOrY == 'x')
		{
			xPos += (dir == 1) ? targetWidth : -boxWidth;	//WHICH END OF TARGET GOES THE BOX
		}
		xPos += Xoffset;
		yPos += Yoffset;
		//MAKE SURE THE BOX DOESN'T FALL OUTSIDE VISIBLE AREA
		if ((xPos + boxWidth) > docWidth)
		{
			xPos = docWidth - boxWidth;
		}
		var ScrollTop = document.body.scrollTop;
		if (ScrollTop == 0)
		{
	    if (window.pageYOffset)
			{
				ScrollTop = window.pageYOffset;
			}
    	else
			{
        ScrollTop = (document.body.parentElement) ? document.body.parentElement.scrollTop : 0;
			}
		}
		if(yPos < ScrollTop){yPos = ScrollTop;}
		xPos += 'px';
		yPos += 'px';
		//alert(yPos);
		styleObject.left = xPos;
		styleObject.top = yPos;
		styleObject.visibility = 'visible';
		styleObject.zIndex = 10;
		//alert(styleObject.visibility);
		return true;
	} 
	else 
	{
		return false;
  }
}
function hideBoxes()
{
	for(i=1;i<boxCount+1;i++)
	{
		var whatBox = 'box' + i;
		changeObjectVisibility(whatBox,'hidden',1);
	}
}