<HEAD> </HEAD> のタグ
<script Language="JavaScript"> <!-- function wiper() { stcnt++; if (stcnt>3) { stcnt = 0; msg += str.substring(mcnt,mcnt+1); mcnt++; if (mcnt >= str.length) { mcnt=0; msg=""; } } csr = " "; if (stcnt & 1) csr ="_"; window.status = msg+csr; timeID = window.setTimeout("wiper()",100); } DefMesseag = ""; x = new Array(); y = new Array(); wait = new Array(); dx = new Array(); dy = new Array(); baseY = 60; offsset = new Array(); limitLeft = 150; limitRight = 600; moveNum = 10; timerID = 0; time = 100; oria = 0; Linkcolor = 'lightpink' function getNWIDTH(){ var pageW=null; if(document.layers) pageW = window.innerWidth; if(document.all) pageW = document.body.clientWidth; return pageW; } function getNHEIGHT(){ var pageH=null; if(document.layers) pageH = window.innerHeight; if(document.all) pageH = document.body.clientHeight; return pageH; } function getPos() { baseY = getNHEIGHT(); limitRight = getNWIDTH()+20 ; for(i=0; i<moveNum; i++) { layerName = "ABCDEFGHIJKLMNOPQ".charAt(i); if(document.layers) { y[i] = document[layerName].top; x[i] = document[layerName].left; } if(document.all){ y[i] = document.all(layerName).style.posTop; x[i] = document.all(layerName).style.posLeft; } wait[i] = i*3; // 待ち時間 dx[i] = -8; // X座標方向の移動量初期値 dy[i] = 0; // Y座標方向の移動量初期値 offsset[i] = Math.random()*3; } } function jumpTitle() { for (i=0; i<moveNum; i++) { oria = Math.floor(Math.random() * 20); if (wait[i] > 0) { wait[i]--; }else{ layerName = "ABCDEFGHIJ".charAt(i); y[i] = y[i] + dy[i]; if (y[i] >= baseY) { wait[i] = i*3; //dx[i] = -8; dy[i] = 0; y[i] = -30; //dy[i] = -dy[i]; }else{ dy[i] = dy[i] + offsset[i]; } x[i] = x[i] + dx[i]; if ( x[i] <= limitLeft) { x[i] = limitLeft; dx[i] = -dx[i]; } if ( x[i] >= limitRight) { x[i] = limitRight; dx[i] = -dx[i]; } if ( 10 == oria ) { dx[i] = -dx[i]; } if(document.layers) document.layers[layerName].moveTo(x[i], y[i] ); if(document.all) document.all(layerName).style.posLeft = x[i]; if(document.all) document.all(layerName).style.posTop = y[i]; } } clearTimeout(timerID); timerID = setTimeout("jumpTitle()",time); } function SETDISP(o,poq,pox,poy) { if(document.layers) document.layers['S'].moveTo(pox, poy ); if(document.all){ document.Fmess.fmess.value=poq; Linkcolor =o.style.color; o.style.color="#FFE1FA"; //'lightpink'; document.all('S').style.posLeft = pox; document.all('S').style.posTop =poy; } } function DELDISP(o) { if(document.layers) document.layers["S"].moveTo(-45, -45 ); if(document.all){ document.Fmess.fmess.value=DefMesseag; o.style.color=Linkcolor; document.all("S").style.posLeft = -45; document.all("S").style.posTop =-45; } } // --> </script>
<BODY> </BODY> のタグ
<BODY background="space.gif" onload="getPos();jumpTitle();"> <DIV id="A" style="position:absolute;top:-30;left:310"><img src="star.gif"></DIV> <DIV id="B" style="position:absolute;top:-30;left:60"><img src="star2.gif"></DIV> <DIV id="C" style="position:absolute;top:-30;left:12"><img src="star.gif"></DIV> <DIV id="D" style="position:absolute;top:-30;left:1"><img src="star.gif"></DIV> <DIV id="E" style="position:absolute;top:-30;left:51"><img src="star2.gif"></DIV> <DIV id="F" style="position:absolute;top:-30;left:3"><img src="star.gif"></DIV> <DIV id="G" style="position:absolute;top:-30;left:72"><img src="star.gif"></DIV> <DIV id="H" style="position:absolute;top:-30;left:43"><img src="star2.gif"></DIV> <DIV id="I" style="position:absolute;top:-30;left:331"><img src="star.gif"></DIV> <DIV id="J" style="position:absolute;top:-30;left:235"><img src="star.gif"></DIV> <DIV id="K" style="position:absolute;top:-30;left:1"><img src="star.gif"></DIV> <DIV id="L" style="position:absolute;top:-30;left:51"><img src="star2.gif"></DIV> <DIV id="M" style="position:absolute;top:-30;left:3"><img src="star.gif"></DIV> <DIV id="N" style="position:absolute;top:-30;left:72"><img src="star.gif"></DIV> <DIV id="O" style="position:absolute;top:-30;left:43"><img src="star2.gif"></DIV> <DIV id="P" style="position:absolute;top:-30;left:331"><img src="star.gif"></DIV> <DIV id="Q" style="position:absolute;top:-30;left:235"><img src="star.gif"></DIV> </BODY>