	var IE = document.all?true:false;

	if (!IE) document.captureEvents(Event.MOUSEMOVE);

	document.onmousemove = getMouseXY;

	var mouseX = 0;
	var mouseY = 0;

	function getMouseXY(e)
	{
	  if (IE) { // grab the x-y pos.s if browser is IE
	    mouseX = event.clientX + document.body.scrollLeft;
	    mouseY = event.clientY + document.body.scrollTop;
	  } else {  // grab the x-y pos.s if browser is NS
	    mouseX = e.pageX;
	    mouseY = e.pageY;
	  }
	  // catch possible negative values in NS4
	  if (mouseX < 0){mouseX = 0;}
	  if (mouseY < 0){mouseY = 0;}

	  return true;
	}

	function getStyleObject(objectId)
	{
		if(document.getElementById && document.getElementById(objectId))
		{       // W3C DOM
		 return document.getElementById(objectId).style;
		}
		else if (document.all && document.all(objectId))
		{       // MSIE 4 DOM
		 return document.all(objectId).style;
		}
		else if (document.layers && document.layers[objectId])
		{       // NN 4 DOM.. note: this won't find nested layers
		 return document.layers[objectId];
		}
		else
		{
		 return false;
		}
	}

	function changeStockVisibility(objectId, newVisibility)
	{
		//var x_position = mouseX - 250;
		var x_position = mouseX + 50;

		changeObjectVisibility(objectId, newVisibility, x_position);
	}

	function changeObjectVisibility(objectId, newVisibility, x_position, y_position, z_position)
	{
		var styleObject = getStyleObject(objectId);

		if(styleObject)
		{
			styleObject.visibility = newVisibility;
			if (x_position != null)
			 styleObject.left = x_position;
			if (y_position != null)
			 styleObject.top = y_position;
			if (z_position != null)
			 styleObject.zIndex = z_position;
			return true;
		}
		else
		{
		  return false;
		}
	}
