here is the script:
<html>
<head>
<script type="text/javascript">
var isOn=false;
var mouseX = 0; //Mouse coords.
var mouseY = 0;
var deviationX=0; //the div's deviation (you can put here the dimensions of the div with "-" because the O(0,0) is the right top corner
var deviationY=0;
function StartTheFollow()
{
isOn=true;
}
function StopTheFollow()
{
isOn=false;
document.getElementById('LittleBox').style.left=-1000;
document.getElementById('LittleBox').style.top=-1000;
}
(document.layers)?window.captureEvents(Event.MOUSEMOVE):0;
(document.layers)?window.onMouseMove=getMousePosition:document.onmousemove=getMousePosition;
function getMousePosition(e) {
mouseY=(document.all)?window.event.y:e.clientY;
mouseX=(document.all)?window.event.x:e.clientX;
if(isOn==true)document.getElementById('LittleBox').style.top=mouseY+deviationY;
if(isOn==true)document.getElementById('LittleBox').style.left=mouseX+deviationX;
}
function HideDiv()
{
document.getElementById('LittleBox').style.left=-1000;
document.getElementById('LittleBox').style.top=-1000;
}
</script>
</head>
<body onLoad='HideDiv();'>
<div id='LittleBox' style='position:absolute'>You can indroduce here what you want, from images to tables, to text. Enjoy !</div>
<a onMouseOver='StartTheFollow();' onMouseOut='StopTheFollow();'>This is a Futtingkiller Copyright :)</a>
</body>
</html>
it works now in IE, Mozilla, Opera
Edited by Futingkiller, 10 May 2006 - 11:41 AM.