// Fall v2.0 By MaxxBlade - http://www.maxxblade.co.uk/fall
var fallObjects=new Array();
function newObject(url,height,width)
{ fallObjects[fallObjects.length]=new Array(url,height,width);
}
///////////// EDIT THIS SECTION //////////////
var numObjs=20, waft=50, fallSpeed=5, wind=0, rsmx=700, rsmy=140;
newObject("../snowflake.gif",14,12);
newObject("../snowflake2.gif",14,12);
newObject("../snowflake3.gif",14,12);
newObject("../snowflake4.gif",10,10);
newObject("../snowflake5.gif",10,10);
//////////////////////////////////////////////
function winSize() { xx = (document.body.clientWidth - rsmx)/2;
if(xx<0) xx=0;
winWidth = xx + rsmx;
winHeight=rsmy;
}
function winOfy() { winOffset=(moz)?window.pageYOffset:document.body.scrollTop;
}
function fallObject(num,vari,nu)
{ xx = (document.body.clientWidth - rsmx)/2;
if(xx<0) xx=0;
objects[num]=new Array(xx+parseInt(Math.random()*(rsmx-waft)),
-30,
(parseInt(Math.random()*waft))*((Math.random()>0.5)?1:-1),
0.02+Math.random()/20,0,1+parseInt(Math.random()*fallSpeed),vari,fallObjects[vari][1],fallObjects[vari][2]);
if(nu==1){document.write('
'); }
}
function fall()
{ xx = (document.body.clientWidth - rsmx)/2;
if(xx<0) xx=0;
xx = xx + rsmx;
for(i=0;i(winHeight-(objects[i][5]+objects[i][7])))||(objects[i][0]>(xx-(objects[i][2]+objects[i][8]))))
if((objects[i][1]>(winHeight-(objects[i][5]+objects[i][7]))))
{ fallObject(i,objects[i][6],0);
}
objects[i][0]+=wind;
objects[i][1]+=objects[i][5];
objects[i][4]+=objects[i][3];
with(fallingObject.style)
{ top=objects[i][1]+winOffset;
left=objects[i][0]+(objects[i][2]*Math.cos(objects[i][4]));
}
}
setTimeout("fall()",61);
}
//var objects=new Array(),winOffset=0,winHeight,winWidth,togvis,moz=(document.getElementById&&!document.all)?1:0;winSize();
var objects=new Array(),
winOffset=0,
winHeight,
xx,
togvis,
moz=(document.getElementById&&!document.all)?1:0;winSize();
xx = (document.body.clientWidth - rsmx)/2;
if(xx<0) xx=0;
xx = xx + rsmx;
for (i=0;i