
var i=1, first_snow=1, last_snow=0, timer=null, timer2, y, Snow=[ ];
var Snow_size=[14, 14, 24, 14, 14, 24, 14, 14, 24, 18, 18];
var Snow_color=["gray", "gray", "gray", "gray", "gray", "gray", "gray", "white", "gray", "white", "gray"];

function MoveSnow(){
this.y=this.y+20;
this.style.color=Snow_color[Math.round(Math.random()*10)];
if (this.y>(document.body.clientHeight+document.body.scrollTop-21)) {
	first_snow++;
	document.body.removeChild(this);
                                      }
this.style.top=this.y;
}

function Snow_Made(siz, Y, X){
    this.y=Y;
    this.x=X;
    this.style.position="absolute";
    this.style.fontSize=siz;
    this.style.fontFamily="Times New Roman, Tahoma, Verdana";
    this.style.color="gray";
    this.style.top=this.y;
    this.style.left=this.x;
    this.innerHTML="*";
document.body.appendChild(this);
              this.MoveSnow=MoveSnow;
}

function Snow_New(){
last_snow++;
var col, Y, X;
Y=0;
X=Math.round((document.body.clientWidth+document.body.scrollLeft+10)*Math.random()-30);
siz=Math.round(Math.random()*10);
Snow[last_snow]=document.createElement("DIV");
Snow[last_snow].Snow_Made=Snow_Made;
Snow[last_snow].Snow_Made(Snow_size[siz], Y, X);
}

function Snow_run(){
for (i=first_snow; i<=last_snow; i++) Snow[i].MoveSnow();
}

function Start_Stop(){
if (!timer){
	Snow_New();
	timer=setInterval(Snow_run,100);
	timer2=setInterval(Snow_New,50);
	} else {
	clearInterval(timer);
	clearInterval(timer2);
	timer=null;
	first_snow=1;
	last_snow=0;
	}
}
