Schneeflocken

Hou Hou Hou,
ja, wir kommen ja wieder in die schöne Zeit, und da heißt es doch, auch seine Homepage mal auf diese Zeit einzustimmen.Habe einen kleinen Javascriptcode, indem Schneeflocken oder Schneemännder schneieen…
Hier der Code für die Mittlere Schneeflocke–>http://img391.imageshack.us/img391/9384/snow27qb.gif

<script language="JavaScript" type="text/javascript"> 
<!-- 
var numImages = 1; 
var numFlakes = 20; 
var ns  = (document.layers)?1:0; 
var ns6 = (document.getElementById&&!document.all)?1:0; 
var opera5 = (navigator.userAgent.indexOf("Opera") > -1 && document.getElementById) ? 1:0; 
var winWidth  = (ns||ns6||opera5)?window.innerWidth-70:window.document.body.clientWidth; 
var winHeight = (ns||ns6||opera5)?window.innerHeight:window.document.body.clientHeight; 
var flakeX = new Array(); 
var flakeY = new Array(); 
var flakeSpeed = new Array(); 
var flakeStep  = new Array(); 
var flakeStep2 = new Array(); 
for (i=0; i<numImages; i++) 
{ 
eval('imgFlake' + i + '=new Image();'); 
eval('imgFlake' + i + '.src="http://img391.imageshack.us/img391/9384/snow27qb.gif";'); 
} 
if (ns) 
{ 
for (i=0; i<numFlakes; i++) 
{ 
eval('var picSource=imgFlake' + Math.floor(Math.random()*numImages) + '.src;'); 
document.write('<LAYER name="layerFlake' + i + '" left="0" top="0"><IMG src="' + picSource + '"></LAYER>'); 
} 
} else { 
document.write('<DIV style="position:absolute;top:0px;left:0px"><DIV style="position:relative">'); 
for (i=0; i<numFlakes; i++) 
{ 
eval('var picSource=imgFlake' + Math.floor(Math.random()*numImages) + '.src;'); 
document.write('<IMG id="layerFlake' + i + '" src="' + picSource + '" style="position:absolute;top:0px;left:0px">'); 
} 
document.write('</DIV></DIV>'); 
} 
for (i=0; i<numFlakes; i++) 
{ 
flakeX[i] = Math.round(Math.random()*winWidth); 
flakeY[i] = Math.round(Math.random()*winHeight); 
flakeSpeed[i] = Math.random()*3+3; 
flakeStep[i]  = Math.random()*0.1+0.05; 
flakeStep2[i] = 0; 
} 
function fLetItSnow() 
{ 
var winWidth  = (ns||ns6||opera5)?window.innerWidth-70:window.document.body.clientWidth; 
var winHeight = (ns||ns6||opera5)?window.innerHeight:window.document.body.clientHeight; 
var wscrll    = (ns||ns6||opera5)?window.pageXOffset:document.body.scrollLeft; 
var hscrll    = (ns||ns6||opera5)?window.pageYOffset:document.body.scrollTop; 
for (i=0; i<numFlakes; i++){ 
speedX = flakeSpeed[i]*Math.cos(flakeStep2[i])/2; 
speedY = flakeSpeed[i]*Math.sin(90*Math.PI/180); 
flakeX[i] += speedX; 
flakeY[i] += speedY; 
if (flakeY[i]>winHeight) 
{ 
flakeX[i]=Math.round(Math.random()*winWidth); 
flakeY[i]=-100; 
flakeSpeed[i]=Math.random()*3+3; 
} 
if (ns) 
{ 
document.layers['layerFlake' + i].left = flakeX[i]; 
document.layers['layerFlake' + i].top  = flakeY[i] + hscrll; 
} else if (ns6||opera5) { 
document.getElementById("layerFlake" + i).style.left = Math.min(winWidth,flakeX[i]); 
document.getElementById("layerFlake" + i).style.top  = flakeY[i] + hscrll; 
} else { 
eval("document.all.layerFlake" + i).style.left = flakeX[i]; 
eval("document.all.layerFlake" + i).style.top  = flakeY[i] + hscrll; 
} 
flakeStep2[i]+=flakeStep[i]; 
} 
setTimeout('fLetItSnow()', 20); 
} 
// --> 
</script> 
<script language="JavaScript"> 
<!-- 
fLetItSnow(); 
//--> 
</script>

Kleine Schneeflocke–>(Leider sieht man sie, auf weißem Hintergrund nicht)

<script language="JavaScript" type="text/javascript"> 
<!-- 
var numImages = 1; 
var numFlakes = 20; 
var ns  = (document.layers)?1:0; 
var ns6 = (document.getElementById&&!document.all)?1:0; 
var opera5 = (navigator.userAgent.indexOf("Opera") > -1 && document.getElementById) ? 1:0; 
var winWidth  = (ns||ns6||opera5)?window.innerWidth-70:window.document.body.clientWidth; 
var winHeight = (ns||ns6||opera5)?window.innerHeight:window.document.body.clientHeight; 
var flakeX = new Array(); 
var flakeY = new Array(); 
var flakeSpeed = new Array(); 
var flakeStep  = new Array(); 
var flakeStep2 = new Array(); 
for (i=0; i<numImages; i++) 
{ 
eval('imgFlake' + i + '=new Image();'); 
eval('imgFlake' + i + '.src="http://img391.imageshack.us/img391/8435/snow2qu.gif";'); 
} 
if (ns) 
{ 
for (i=0; i<numFlakes; i++) 
{ 
eval('var picSource=imgFlake' + Math.floor(Math.random()*numImages) + '.src;'); 
document.write('<LAYER name="layerFlake' + i + '" left="0" top="0"><IMG src="' + picSource + '"></LAYER>'); 
} 
} else { 
document.write('<DIV style="position:absolute;top:0px;left:0px"><DIV style="position:relative">'); 
for (i=0; i<numFlakes; i++) 
{ 
eval('var picSource=imgFlake' + Math.floor(Math.random()*numImages) + '.src;'); 
document.write('<IMG id="layerFlake' + i + '" src="' + picSource + '" style="position:absolute;top:0px;left:0px">'); 
} 
document.write('</DIV></DIV>'); 
} 
for (i=0; i<numFlakes; i++) 
{ 
flakeX[i] = Math.round(Math.random()*winWidth); 
flakeY[i] = Math.round(Math.random()*winHeight); 
flakeSpeed[i] = Math.random()*3+3; 
flakeStep[i]  = Math.random()*0.1+0.05; 
flakeStep2[i] = 0; 
} 
function fLetItSnow() 
{ 
var winWidth  = (ns||ns6||opera5)?window.innerWidth-70:window.document.body.clientWidth; 
var winHeight = (ns||ns6||opera5)?window.innerHeight:window.document.body.clientHeight; 
var wscrll    = (ns||ns6||opera5)?window.pageXOffset:document.body.scrollLeft; 
var hscrll    = (ns||ns6||opera5)?window.pageYOffset:document.body.scrollTop; 
for (i=0; i<numFlakes; i++){ 
speedX = flakeSpeed[i]*Math.cos(flakeStep2[i])/2; 
speedY = flakeSpeed[i]*Math.sin(90*Math.PI/180); 
flakeX[i] += speedX; 
flakeY[i] += speedY; 
if (flakeY[i]>winHeight) 
{ 
flakeX[i]=Math.round(Math.random()*winWidth); 
flakeY[i]=-100; 
flakeSpeed[i]=Math.random()*3+3; 
} 
if (ns) 
{ 
document.layers['layerFlake' + i].left = flakeX[i]; 
document.layers['layerFlake' + i].top  = flakeY[i] + hscrll; 
} else if (ns6||opera5) { 
document.getElementById("layerFlake" + i).style.left = Math.min(winWidth,flakeX[i]); 
document.getElementById("layerFlake" + i).style.top  = flakeY[i] + hscrll; 
} else { 
eval("document.all.layerFlake" + i).style.left = flakeX[i]; 
eval("document.all.layerFlake" + i).style.top  = flakeY[i] + hscrll; 
} 
flakeStep2[i]+=flakeStep[i]; 
} 
setTimeout('fLetItSnow()', 20); 
} 
// --> 
</script> 
<script language="JavaScript"> 
<!-- 
fLetItSnow(); 
//--> 
</script>

Und der Schneemann–>http://img485.imageshack.us/img485/6913/snowman9av.gif

[code]

[/code][SIZE=3]Es funktioniert nur mit dem Internet Explorer, Mozilla Firefox und Opera!
Das Script ist nicht von mir selbst!
[/SIZE]