
var no = 9;
var speed = 20;
var snowflake = "img/backgrounds/snow.gif";
var keith = 1;
var sammmy = 2;

//var ns4up = (document.layers) ? 1 : 0;
//var ie4up = (document.all) ? 1 : 0;
var dx, xp, yp;
var am, stx, sty;
var i, doc_width, doc_height;

doc_width = screen.width;
doc_height = screen.height;

dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();

count=5;
ind_count=0;

for (i = 0; i < no; ++ i) 
	{  
	dx[i] = 0;
	xp[i] = Math.random()*(120);
	yp[i] = Math.random()*doc_height;
	am[i] = Math.random()*20;
	stx[i] = 0.02 + Math.random()/10;
	sty[i] = 0.7 + Math.random();

	document.write("<div id=\"dot"+ i +"\" style=\"POSITION: ");
	document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ");
	document.write("visible; TOP: 15px; LEFT: 15px;\"><img src=\"");
	document.write(snowflake + "\" border=\"0\"></div>");
	document.write("<div id=\"dot_2"+ i +"\" style=\"POSITION: ");
	document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ");
	document.write("visible; TOP: 15px; right: 45px;\"><img src=\"");
	document.write(snowflake + "\" border=\"0\"></div>");
	}

flag_bot_all=false;

function snowIE() 
	{
	var ind=0;
	for (i = 0; i < no; ++ i) 
		{
		yp[i] += sty[i];
		flag_bot_all=false;
		if (yp[i] > doc_height-50) 
			{
			if (i==(no-1)){flag_bot_all=true;}; 
			xp[i] = Math.random()*(100);
			yp[i] = 0;
			stx[i] = 0.02 + Math.random()/10;
			sty[i] = 0.7 + Math.random();
			doc_width = document.body.clientWidth;
			doc_height = document.body.clientHeight;
			}
		dx[i] += stx[i];
		document.all["dot"+i].style.pixelTop = yp[i];
		document.all["dot"+i].style.pixelLeft = xp[i] + am[i]*Math.sin(dx[i]);
	    document.all["dot_2"+i].style.pixelTop = yp[i];
		document.all["dot_2"+i].style.pixelRight = xp[i] + am[i]*Math.sin(dx[i])+40;
		 }
	setTimeout("snowIE()", speed);
	}


snowIE();