
// ガイアックスの女王様のパクリ技だじょ〜
// 著作権？　omegu@click ダジョ　この技使った人はリンクしてね〜
var msg = new Array() ;
size = document.form1.size.value;
count = document.form1.count.value;
color0 = document.form1.color0.value;
color1 = document.form1.color1.value;
color2 = document.form1.color2.value;
color3 = document.form1.color3.value;
speed = document.form1.speed.value;
var SW;
var SH;
var Time_Moji;
var DX=new Array();
var DTX=new Array();
var DTY=new Array();
var AM=new Array();
var STX=new Array();
var STY=new Array();
var j=0;
function spanini(){
j=0;
for (i=0;i<document.form1.length;i++){
    if (document.form1.elements[i].type=="text")
       {msg[j]=document.form1.elements[i].value;j++;}

} 

if ((size<=3)||(size>=30)){size=14;}
if ((count<=1)||(count>=50)){count=10;}
if ((speed<=1)||(speed>100000)){speed=30;}
if (color0==""){color0=ffff00;}
if (color1==""){color1=ff0000;}
if (color2==""){color2=000000;}
if (color3==""){color3=ffffff;}
document.write("<STYLE>");
document.write("span.spanclass {color:#000000;");
document.write("font-size:"+size+" pt; font-weight:bold;}");
document.write("</STYLE>");

j=0;
for(i=0;i<count;i++) {document.write(
	'<SPAN id=hoshi class="spanclass" style=position:absolute;z-index:'+(i%2?4:6)+
	';visibility:visible;top:15px;left:15px;>'+msg[j]+'</SPAN>');
        j++; if(j>=msg.length) j=0;}

	SW=document.body.clientWidth;
	SH=document.body.clientHeight;

	for(i=0;i<hoshi.length;i++){
		DX[i]=0;
		DTX[i]=Math.random()*SW-50;
		DTY[i]=Math.random()*SH+30;
		AM[i]=Math.random()*30;
		STX[i]=0.02+Math.random()/10;
		STY[i]=1.6+Math.random();
	}

}
var i = 0;
function moveMoji() {


	for(var i=0;i<hoshi.length;i++){
 		with(hoshi[i]){
			DTY[i]+=STY[i];
			if (DTY[i]>SH-60){
				DTX[i]=Math.random()*SW;
				if(DTX[i]<10) DTX[i]-=50;
				if(DTX[i]>SW-10) DTX[i]=SW-10;
				DTY[i]=10;
				STX[i]=0.02+Math.random()/10;
				STY[i]=0.7+Math.random();
			}
			DX[i]+=STX[i];
                        var blink = Math.floor(Math.random()*10);
                    if (blink==0){style.color= color1;} 
                    else if (blink==1){style.color= color2;} 
                    else if (blink==2){style.color= color3;} 
                    else {style.color= color0;} 
                	style.posTop=document.body.scrollTop+DTY[i];
			style.posLeft=DTX[i]+AM[i]*Math.sin(DX[i]);
		}
	}



}
function start01(){
spanini();
Time_Moji=setInterval('moveMoji();',speed);

}
start01() ;
