var no = 20; //      Anzahl der Bilder, bei mehr oder weniger anpassen !!!!!!!!!!!!!!!!!!!!!!!!!!!! 

var xp, yp;

var i, doc_width = 1024, doc_height = 768; // Grsse des Bildschirms 

var st, w; 

var ns4up = (document.layers) ? 1 : 0; // Browseridentifizierung 

var ie4up = (document.all) ? 1 : 0; 

if (ns4up) { 

doc_width = self.innerWidth; 
doc_height = self.innerHeight; 

} else if (ie4up) { 

doc_width = document.body.clientWidth; 

doc_height = document.body.clientHeight; 

} 

xp = new Array(); 
yp = new Array(); 
st = new Array(); 
pic = new Array(); 

pic[0]="./snow.gif"  // Fr mehr oder weniger Schneeflocken einfach Zeilen hinzufgen bzw. lschen !!
pic[1]="./snow.gif"
pic[2]="./snow.gif"
pic[3]="./snow.gif"
pic[4]="./snow.gif"
pic[5]="./snow.gif"
pic[6]="./snow.gif"
pic[7]="./snow.gif"
pic[8]="./snow.gif"
pic[9]="./snow.gif"
pic[10]="./snow.gif"
pic[11]="./snow.gif"
pic[12]="./snow.gif"
pic[13]="./snow.gif"
pic[14]="./snow.gif"
pic[15]="./snow.gif"
pic[16]="./snow.gif"
pic[17]="./snow.gif"
pic[18]="./snow.gif"
pic[19]="./snow.gif"
pic[20]="./snow.gif"
pic[21]="./snow.gif"

st[0]=1 
st[1]=1.1 
st[2]=1.2 
st[3]=2 
st[4]=2.1 
st[5]=2.2 
st[6]=3 
st[7]=3.1 
st[8]=3.2 
st[9]=4 
st[10]=4.1 
st[11]=4.2 
st[12]=5 
st[13]=5.1 
st[14]=5.2 
st[15]=5.2 
st[16]=5.2 
st[17]=5.2 
st[18]=5.2 
st[19]=5.2 
st[20]=5.2 

w = 3.14 / 360 * 2; //winkelfunktion 

for (i = 0; i < no; ++ i) { 
xp[i]=Math.random()*(doc_width-35); 
yp[i]=Math.random()*(doc_height-20); 

if (ns4up) { // Bereiche anlegen 
document.write("<layer name=\"dot"+ i +"\" left=\"15\" "); 

document.write("top=\"15\" visibility=\"show\"><img src=\""); 

document.write(pic[i] + "\" border=\"0\"></layer>"); 

} else 

if (ie4up) { 

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(pic[i] + "\" border=\"0\"></div>"); 
} 

} 

function snowNS() { // Animationsfunktion fuer Netscape 

for (i = 0; i < no; ++ i) { // Ein Schleifendurchlauf fuer jedes Objekt 

yp[i] = yp[i] + st[i]; 
xp[i] = xp[i] + Math.sin(yp[i]*w+st[i])*2; 
if (yp[i] > doc_height) { 
xp[i]=Math.random()*(doc_width-35); 
yp[i]=0; 
} 

document.layers["dot"+i].top = yp[i]; 
document.layers["dot"+i].left = xp[i]; 

} 

setTimeout("snowNS()", 20); 

} 

function snowIE() { // Animationsfunktion fuer Internet Explorer 

for (i = 0; i < no; ++ i) { // Ein Schleifendurchlauf fuer jedes Objekt 
yp[i] = yp[i] + st[i]; 
xp[i] = xp[i] + Math.sin(yp[i]*w+st[i])*2; 
if (yp[i] > doc_height) { 
xp[i]=Math.random()*(doc_width-35); 
yp[i]=0; 
} 

document.all["dot"+i].style.pixelTop = yp[i]+document.body.scrollTop; 
document.all["dot"+i].style.pixelLeft = xp[i]+document.body.scrollLeft; 


} 

setTimeout("snowIE()", 50); 

} 

if (ns4up) {snowNS();} 

else if (ie4up) {snowIE();} 

