<script type="text/javascript"><br />// <![CDATA[<br />var speed=33; // lower number for faster<br />var flakes=100; // number of flakes<br />var colour="#639"; // colour of flakes<br />var slush=20; // set to '0' for no slush or otherwise set to height at which slush melts<br />var flks=new Array();<br />var flkx=new Array();<br />var flky=new Array();<br />var fldy=new Array();<br />var slss=new Array();<br />var slsh=new Array();<br />var swide, shigh;<br />window.onload=function() { if (document.getElementById) {<br /> var b, s;<br /> b=document.createElement("div");<br /> s=b.style;<br /> s.position="absolute";<br /> b.setAttribute("id", "bod");<br /> document.body.appendChild(b);<br /> set_scroll();<br /> set_width();<br /> for (var i=0; i<flakes; i++) {<br /> flks[i]=createDiv(3, 3);<br /> flkx[i]=3*Math.floor(Math.random()*swide/3);<br /> flky[i]=Math.floor(Math.random()*shigh);<br /> fldy[i]=2+Math.floor(Math.random()*4);<br /> flks[i].style.left=flkx[i]+"px";<br /> flks[i].style.top=flky[i]+"px";<br /> b.appendChild(flks[i]);<br /> }<br /> setInterval("let_it_snow()", speed);<br />}}<br />function createDiv(height, width) {<br /> var div=document.createElement("div");<br /> div.style.position="absolute";<br /> div.style.height=height+"px";<br /> div.style.width=width+"px";<br /> div.style.overflow="hidden";<br /> div.style.backgroundColor=colour;<br /> return (div);<br />}<br />window.onresize=set_width;<br />function set_width() {<br /> if (document.documentElement && document.documentElement.clientWidth) {<br /> swide=document.documentElement.clientWidth;<br /> shigh=document.documentElement.clientHeight;<br /> }<br /> else if (typeof(self.innerHeight)=="number") {<br /> swide=self.innerWidth;<br /> shigh=self.innerHeight;<br /> }<br /> else if (document.body.clientWidth) {<br /> swide=document.body.clientWidth;<br /> shigh=document.body.clientHeight;<br /> }<br /> swide-=3;<br /> if (slush) {<br /> if (swide/3>slss.length) for (var i=slss.length; i<swide/3; i++) {<br /> slss[i]=createDiv(3, 3);<br /> slss[i].style.left=3*i+"px";<br /> document.getElementById("bod").appendChild(slss[i]);<br /> slsh[i]=3;<br /> }<br /> for (var i=0; i<swide/3; i++) slss[i].style.top=shigh-slsh[i]+"px";<br /> }<br />}<br />window.onscroll=set_scroll;<br />function set_scroll() {<br /> var sleft, sdown;<br /> if (typeof(self.pageYOffset)=="number") {<br /> sdown=self.pageYOffset;<br /> sleft=self.pageXOffset;<br /> }<br /> else if (document.body.scrollTop || document.body.scrollLeft) {<br /> sdown=document.body.scrollTop;<br /> sleft=document.body.scrollLeft;<br /> }<br /> else if (document.documentElement && (document.documentElement.scrollTop || document.documentElement.scrollLeft)) {<br /> sleft=document.documentElement.scrollLeft;<br /> sdown=document.documentElement.scrollTop;<br /> }<br /> else {<br /> sdown=0;<br /> sleft=0;<br /> }<br /> var s=document.getElementById("bod").style;<br /> s.top=sdown+"px";<br /> s.left=sleft+"px";<br />}<br />function let_it_snow(c) {<br /> var i, x, o=0;<br /> for (i=0; i<flakes; i++) {<br /> flky[i]+=fldy[i];<br /> x=flkx[i]/3;<br /> if (slush) o+=slsh[x];<br /> if (flky[i]>=shigh-(slush?slsh[x]:0)) {<br /> if (slush) {<br /> if (x<swide && slsh[x]>slsh[x+1]+3) x++;<br /> else if (x>0 && slsh[x]>slsh[x-1]+3) x--;<br /> slss[x].style.top=shigh-(slsh[x]+=3)+"px";<br /> slss[x].style.height=slsh[x]+"px";<br /> }<br /> flky[i]=0;<br /> fldy[i]=2+Math.floor(Math.random()*4);<br /> flkx[i]=3*Math.floor(Math.random()*swide/3);<br /> flks[i].style.left=flkx[i]+"px";<br /> }<br /> flks[i].style.top=flky[i]+"px";<br /> }<br /> if (o>flakes*slush) {<br /> for (i=0; i<swide/3; i++) if (slsh[i]>1) slsh[i]--;<br /> set_width();<br /> }<br />}<br />// ]]><br /></script><font face="arial, helvetica" size="-2"><a href="http://html-kodlari.tr.gg">Super Kodlar</a></font><br />