このページのSourceです。Copy&Pastして使ってください。
<script language="JavaScript">
<!--
// Function to 'activate' images.
function imgOn(imgName) {
if (document.images) {
document[imgName].src = eval(imgName + "on.src");
}
}
// Function to 'deactivate' images.
function imgOff(imgName) {
if (document.images) {
document[imgName].src = eval(imgName + "off.src");
}
}
// -->
</script>
<layer clip="0,0,2,2" bgcolor="#FF0000" visibility="SHOW" top="10" left="10" name="a">
</layer>
<layer clip="0,0,2,2" bgcolor="#FF8000" visibility="SHOW" top="10" left="10" name="b">
</layer>
<layer clip="0,0,2,2" bgcolor="#FFFF00" visibility="SHOW" top="10" left="10" name="c">
</layer>
<layer clip="0,0,2,2" bgcolor="#00FF00" visibility="SHOW" top="10" left="10" name="d">
</layer>
<layer clip="0,0,2,2" bgcolor="#0000FF" visibility="SHOW" top="10" left="10" name="e">
</layer>
<layer clip="0,0,2,2" bgcolor="#FF00FF" visibility="SHOW" top="10" left="10" name="f">
</layer>
<layer clip="0,0,2,2" bgcolor="#FFFFFF" visibility="SHOW" top="10" left="10" name="g">
</layer>
<script language="JavaScript1.2">
<!-- Begin
var ns=document.layers ? 1 : 0;
if (ns) {
window.captureEvents(Event.MOUSEMOVE);
var yBase = 200;
var xBase = 200;
var delay = 10;
var yAmpl = 10;
var yMax = 40;
var step = .2;
var ystep = .5;
var currStep = 0;
var tAmpl=1;
var Xpos = 50;
var Ypos = 50;
var j = 0;
function MoveHandler(evnt) {
Xpos = evnt.pageX;
Ypos = evnt.pageY;
}
window.onMouseMove = MoveHandler;
function animateLogo() {
yBase = window.innerHeight/4 ;
xBase = window.innerWidth/4;
for ( j = 0 ; j < 7 ; j++ ) {
document.layers[j].top = Ypos + Math.cos((20*Math.sin(currStep/20))+j*70)*yBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + j*25)/10);
document.layers[j].left =Xpos + Math.sin((20*Math.sin(currStep/20))+j*70)*xBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + j*25)/10);
}
currStep += step;
setTimeout("animateLogo()", delay);
}
animateLogo();
}
// End -->
</script>
<style type="text/css">
<!--
BODY {
FONT-FAMILY: Arial, Helvetica, sans-serif
;}
A:link {
TEXT-DECORATION: none
;}
A:visited {
TEXT-DECORATION: none
;}
A:active {
TEXT-DECORATION: none
;}
.kaleido {
FONT-FAMILY: "MS Pゴシック", "Osaka", "sans-serif"; FONT-SIZE: 9pt
;}
.kaleido2 {
FONT-FAMILY: "MS Pゴシック", "Osaka", "sans-serif"; FONT-SIZE: 10pt
;}
-->
</style>