var ACTIVE = 1;
var prop = 100000;  // 1 Schneeflocke pro ...  angefangener QuadratBildschirmpunkte 
var speed = 50; // "Schnei-Geschwindigkeit"; je kleiner die Zahl, um so schneller fallen die Flocken
var snowflake = "../images/snowflake.gif"; // Bild der Schneeflocke, beliebig

var i, doc_width = 800, doc_height = 600;
var no ; // Anzahl der Schneeflocken

doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;

no = Math.ceil(doc_width * doc_height / prop);  

var dx = new Array(no);
var xp = new Array(no);
var yp = new Array(no);
var am = new Array(no);
var stx = new Array(no);
var sty = new Array(no);

var jetzt = new Date();
var ziel = new Date("november 09, 2006 00:00:00");
 
if (ziel > jetzt)
	ACTIVE = 0;

if (ACTIVE==1)
{
for (i = 0; i < no;  ++ i) 
{
	dx[i] = 0;                             // Koordinaten-Variable setzen
	xp[i] = Math.random()*(doc_width-50);  // Position-Variable setzen
	yp[i] = Math.random()*doc_height;
	am[i] = Math.random()*20;              // Amplituden-Variable setzten
	stx[i] = 0.02 + Math.random()/10;      // Variable für Schrittweite setzen
	sty[i] = 0.7 + Math.random();          // Variable für Schrittweite setzen

// ----------------------------------------------------------------------

	document.write("<div id=\"dot"+ i +"\"");
	document.write(" style=\"position: absolute; ");
	document.write("z-index: "+ i +"; ");
	document.write("visibility: visible; ");
	document.write("top: 15px; left: 15px;\">");
	document.write("<img id=\"flake"+i+"\" src=\""+ snowflake + "\" border=\"0\"></div>");
	
//	alert(document.getElementById("flake0").src);
}
// ----------------------------------------------------------------------
function snow() 
{
	for (i = 0; i < no; ++ i) 
	{
		yp[i] +=sty[i];
		if (yp[i] > doc_height-30) 
		{
			xp[i] = Math.random()*(doc_width-am[i]-50);
			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.getElementById("dot"+i).style.top = yp[i];
		document.getElementById("dot"+i).style.left = xp[i] + am[i]*Math.sin(dx[i]);

	}
	setTimeout("snow()", speed);
	
}

snow();
}
