var maxflakes = 20;
var ctr = 1500;
var dist = new Array;
for(var i=0; i<maxflakes; i++){
dist[i] = Math.random()*15+10;
document.writeln('<span id="snow' + i + '" style="color: white; position: absolute; top: 0px; left: 0px; font-family: Verdana; font-weight: bold; font-size:' + parseInt(dist[i]) + 'px">*</span>');
};
function snowfall(){
for(var i=0; i<maxflakes; i++){
ctr+=.01;
document.getElementById("snow" + i).style.top = (ctr*dist[i])%720;
document.getElementById("snow" + i).style.left = i/maxflakes*980+10 + Math.sin(ctr*dist[i]*.01)*dist[i];
}
};
setInterval(snowfall, 50)
