
function updatePosition(e) 
{
	cursor = window.event;if (!cursor) cursor = e;
	_mx = cursor.clientX;
	_my = cursor.clientY;
}

document.onmousemove = updatePosition;

function defPosition() 
{ 
      var x = y = 0; 
      if (document.attachEvent != null) { // Internet Explorer & Opera 
            x = _mx + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft); 
            y = _my + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop); 
      } else if (!document.attachEvent && document.addEventListener) { // Gecko 
            x = _mx + window.scrollX; 
            y = _my + window.scrollY; 
      } else { 
            // Do nothing 
      } 
      return {x:x, y:y}; 
}

var LastVisual;

function visual(URL)
{
	document.getElementById("catvisual").style.left=defPosition().x+16+"px";
	document.getElementById("catvisual").style.top=defPosition().y-document.getElementById("catvisual").offsetHeight+16+"px";
	document.getElementById("catvisual").style.display="block";

	if(LastVisual!=(URL))
	{
		document.getElementById("catvisual").src=URL;
		LastVisual=URL;
	}
}



function stopvisual()
{document.getElementById("catvisual").style.display="none";}



