Try this:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title>Magic Wand - Update</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
body {
color:#fff;
background-color:#000;
}
</style>
</head>
<body>
<script type="text/javascript">
/*
Magic Wand cursor (By Kurt at kurt.grigg@virgin.net)
Modified and permission granted to Dynamic Drive to feature script in archive
For full source, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*** This notice must remain for legal use ***
Updated in Dynamic Drive Forums Dec 2007 by jscheuer1, remove early Netscape, add FF support
*/
if (document.all||document.getElementById){
with (document){
write('<div id="starsDiv" style="position:absolute;top:0px;left:0px">')
write('<div style="position:relative;width:1px;height:1px;background:#ffffff;font-size:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#fff000;font-size:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#ffa000;font-size:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#ff00ff;font-size:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#00ff00;font-size:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#0000ff;font-size:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#FF0000;font-size:1px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#ffffff;font-size:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#fff000;font-size:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#ffa000;font-size:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#ff00ff;font-size:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#00ff00;font-size:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#0000ff;font-size:2px;visibility:visible"></div>')
write('<div style="position:relative;width:3px;height:3px;background:#FF0000;font-size:3px;visibility:visible"></div>')
write('</div>')
}
}
var Clrs=new Array(6)
Clrs[0]='ff0000';
Clrs[1]='00ff00';
Clrs[2]='000aff';
Clrs[3]='ff00ff';
Clrs[4]='fff000';
Clrs[5]='fffff0';
var yBase = 200;
var xBase = 200;
var step;
var currStep = 0;
var Xpos = 1;
var Ypos = 1;
if (typeof window.event!='undefined')
{
function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body;
}
function MoveHandler(){
Xpos = iecompattest().scrollLeft+event.x;
Ypos = iecompattest().scrollTop+event.y;
}
document.onmousemove = MoveHandler;
}
else if (document.getElementById)
{
function xMoveHandler(evnt){
Xpos = evnt.pageX;
Ypos = evnt.pageY;
}
document.onmousemove = xMoveHandler;
}
function animateLogo() {
if (window.innerWidth&&document.getElementById)
{
yBase = window.innerHeight/4;
xBase = window.innerWidth/4;
for ( var d=document.getElementById('starsDiv').getElementsByTagName('div'), i = 0 ; i < d.length ; i++ )
{step=3;
d[i].style.top = Ypos + yBase*Math.cos((currStep + i*4)/12)*Math.cos(0.7+currStep/200)+'px';
d[i].style.left = Xpos + xBase*Math.sin((currStep + i*3)/10)*Math.sin(8.2+currStep/400)+'px';
for (var ai=0; ai < Clrs.length; ai++)
{
var c=Math.round(Math.random()*[ai]);
}
d[i].style.backgroundColor='#'+Clrs[c];
}
}
else if (document.all)
{
yBase = window.iecompattest().offsetHeight/4;
xBase = window.iecompattest().offsetWidth/4;
for ( var i = 0 ; i < starsDiv.all.length ; i++ )
{step=3;
starsDiv.all[i].style.top = Ypos + yBase*Math.cos((currStep + i*4)/12)*Math.cos(0.7+currStep/200);
starsDiv.all[i].style.left = Xpos + xBase*Math.sin((currStep + i*3)/10)*Math.sin(8.2+currStep/400);
for (var ai=0; ai < Clrs.length; ai++)
{
var c=Math.round(Math.random()*[ai]);
}
starsDiv.all[i].style.background=Clrs[c];
}
}
currStep+= step;
setTimeout("animateLogo()", 10);
}
if(document.all||document.getElementById)
animateLogo();
</script>
</body>
</html>
Bookmarks