<!--
// Original script by Altan, copyright 1999 Altan d.o.o.
// Modified by Paul Anderson, copyright 2001 CNET Builder.com
 
var snowflake1 = "snow18.gif";
var snowflake2 = "snow12.gif";
var no = 15; // number of snowflakes on the screen
var speed = 27; // smaller numbers make the snow fall faster
var dx, xp, yp;    // coordinate and position variables
var am, stx, sty;  // amplitude and step variables
var obj, i, doc_width = 750, doc_height = 130;

function winSize() {
doc_width = window.innerWidth?window.innerWidth:document.body.clientWidth;
doc_height = window.innerHeight?window.innerHeight:document.body.clientHeight;
}

dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();
winSize();
document.write("<STYLE type=\"text/css\">.flake {position:absolute;top:-200;}</STYLE>");
for (i = 0; i < no; i++) {  
dx[i] = 0;                        // set coordinate variables
xp[i] = Math.random()*(doc_width-30) +10;  // set position variables
yp[i] = Math.random()*doc_height;
am[i] = Math.random()*20;         // set amplitude variables
stx[i] = 0.02 + Math.random()/10; // set step variables
sty[i] = 0.7 + Math.random();     // set step variables
if ((Math.random()*10) > 5) {
document.write("<div id=\"dot"+ i +"\" class=\"flake\"><img src=\"");
document.write(snowflake1 + "\" border=\"0\"></div>");
} else {
document.write("<div id=\"dot"+ i +"\" class=\"flake\"><img src=\"");
document.write(snowflake2 + "\" border=\"0\"></div>");

}
}

function snowMove(id,left,top) {
obj = document.getElementById?document.getElementById(id).style:
document.all?document.all[id].style:
document.layers?document.layers[id]:null;
if (obj) {
obj.left=left;
obj.top=top;
}
}

function snow() {
winSize();
doc_scroll = (window.pageYOffset!=null)?window.pageYOffset:document.body.scrollTop;
for (i = 0; i < no; ++ i) {  // iterate for every dot
yp[i] += sty[i];
if (yp[i] > doc_height+doc_scroll-50) {
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = doc_scroll;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
}
dx[i] += stx[i];
snowMove("dot"+i,xp[i]+am[i]*Math.sin(dx[i]),yp[i]);
}
setTimeout("snow()", speed);
}

window.onload=snow;

// Disclaimer:  
// Copyright notice - No infringement of any text or graphic copyright is intended. If you own the copyright to any original 
// image or document used for the creation of the graphics or information on this site, please contact the Webmaster 
// with all pertinent info so that proper credit can be given. If you wish to have it removed from the site, 
// it will be replaced ASAP.
// If you wrote one of the codes on these pages, please write and you will receive proper credit - or the code will 
// be removed, if you so desire.

// -->


