Amount=7;

flags=true;
pixs=0;

dt=new Date();
Month=dt.getMonth();
Day=dt.getDate();
if (Month == 8 & Day < 6){
seeson="foll";
pixs=90;
}else if (Month == 11 & (Day < 6 || Day > 29)){
seeson="snow";
pixs=50;
}else if (Month == 0 & Day < 3){
seeson="snow";
pixs=50;
}else if (Month == 2 & Day < 6){
seeson="flow";
}else if (Month == 5 & Day < 6){
seeson="line";
}else{
seeson="";
flags=false;
}

if (flags){
Image0=new Image();
Image0.src="/all/"+seeson+"/flake1.gif";
Image1=new Image();
Image1.src="/all/"+seeson+"/flake2.gif";
Image2=new Image();
Image2.src="/all/"+seeson+"/flake3.gif";
Image3=new Image();
Image3.src="/all/"+seeson+"/flake4.gif";
Image4=new Image();
Image4.src="/all/"+seeson+"/flake5.gif";

grphcs=new Array(5)
grphcs[0]="flake1.gif"
grphcs[1]="flake2.gif"
grphcs[2]="flake3.gif"
grphcs[3]="flake4.gif"
grphcs[4]="flake5.gif"

Ypos=new Array();
Xpos=new Array();
Speed=new Array();
Step=new Array();
Cstep=new Array();
for (i = 0; i < Amount; i++){
var P=Math.floor(Math.random()*grphcs.length);
rndPic=grphcs[P];
document.write("<div id='sn"+i+"' style='position:absolute;z-index:150;'><img src='/all/"+seeson+"/"+rndPic+"'></div>");
}
WinHeight=document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientHeight:document.body.clientHeight;
WinWidth=document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientWidth:document.body.clientWidth;
for (i=0; i < Amount; i++){
 Ypos[i] = Math.round(Math.random()*WinHeight);
 Xpos[i] = Math.round(Math.random()*WinWidth);
 Speed[i]= Math.random()*3+2;
 Cstep[i]=0;
 Step[i]=Math.random()*0.1+0.05;
}
}


function fall(){
if (flags){
var WinHeight=document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientHeight:document.body.clientHeight-50;
var WinWidth=document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientWidth:document.body.clientWidth-200;
var hscrll=document.documentElement.scrollTop;
var wscrll=document.documentElement.scrollLeft;
for (i=0; i < Amount; i++){
	sy = Speed[i]*Math.sin(90*Math.PI/180);
	sx = Speed[i]*Math.cos(Cstep[i]);
	Ypos[i]+=sy;
	Xpos[i]+=sx;
	if (Ypos[i]+pixs > WinHeight){
		Ypos[i]=-60;
		Xpos[i]=Math.round(Math.random()*WinWidth);
		Speed[i]=Math.random()*5+2;
	}
	if (Xpos[i]+pixs > WinWidth){Xpos[i]=WinWidth-pixs;}
	document.getElementById('sn'+i).style.left=parseInt(Xpos[i])+"px";
	document.getElementById('sn'+i).style.top=parseInt(Ypos[i]+hscrll)+"px";
	Cstep[i]+=Step[i];
}
setTimeout('fall()',10);}
}

