<script language="JavaScript1.2">
<!--

var trailLength = 8 // The length of trail (8 by default; put more for longer "tail")
var path = "cursor.gif" // URL of your image

var i //our index to loop through the layers
var d = 0 // separate counter to offset the placement of each layer
var topPix = ".pixelTop"
var leftPix = ".pixelLeft"
var images
var storage
function initTrail() {
images = new Array() // prepare the image array
for (i = 0; i < parseInt(trailLength); i++) {
images[i] = new Image()
images[i].src = path
}
storage = new Array() // prepare the storage for the coordinates
for (i = 0; i < images.length*3; i++) {
storage[i] = 0
}
for (i = 0; i < images.length; i++) { // make initial div for IE
document.write('<div id="obj' + i + '" style="position: absolute; z-Index: 100; height: 0; width: 0"><img src="' + images[i].src + '"></div>')
}
trail()
}
function trail() { // trailing function
for (i = 0; i < images.length; i++) { // for every div/layer
eval("document.all.obj" + i + ".style" + topPix + "=" + storage[d]) // the Y-coordinate
eval("document.all.obj" + i + ".style" + leftPix + "=" + storage[d+1]) // the X-coordinate
d = d+2
}
for (i = storage.length; i >= 2; i--) { // save the coordinate for the div/layer that's behind
storage[i] = storage[i-2]
}
d = 0 // reset for future use
var timer = setTimeout("trail()",10) // call recursively
}
function processEvent(e) { // catches and processes the mousemove event

storage[0] = window.event.y+document.body.scrollTop+10
storage[1] = window.event.x+document.body.scrollLeft+10

}

initTrail()
document.onmousemove = processEvent // start capturing

//-->
</script>