Kezdőknek könyebben
Értelemszerűen a fehér hóesés sötét hátterű oldalra alánlott
<!--{cke_protected}%3Cscript%20type%3D%22text%2Fjavascript%22%20%20language%3D%22javascript%22%3E%0A%20%3Cscript%20type%3D%22text%2Fjavascript%22%3E%0A%0A%2F******************************************%0A*%20Snow%20Effect%20Script-%20By%20Altan%20d.o.o.%20(http%3A%2F%2Fwww.altan.hr%2Fsnow%2Findex.html)%0A*%20Visit%20Dynamic%20Drive%20DHTML%20code%20library%20(http%3A%2F%2Fwww.dynamicdrive.com%2F)%20for%20full%20source%20code%0A*%20Last%20updated%20Nov%209th%2C%2005'%20by%20DD.%20This%20notice%20must%20stay%20intact%20for%20use%0A******************************************%2F%0A%20%20%0A%20%20%2F%2FConfigure%20below%20to%20change%20URL%20path%20to%20the%20snow%20image%0A%20%20var%20snowsrc%3D%22http%3A%2F%2Fdiszitok.lapunk.hu%2Ftarhely%2Fdiszitok%2Fkepek%2Fsnow6.gif%22%0A%20%20%2F%2F%20Configure%20below%20to%20change%20number%20of%20snow%20to%20render%0A%20%20var%20no%20%3D%2015%3B%0A%20%20%2F%2F%20Configure%20whether%20snow%20should%20disappear%20after%20x%20seconds%20(0%3Dnever)%3A%0A%20%20var%20hidesnowtime%20%3D%200%3B%0A%20%20%2F%2F%20Configure%20how%20much%20snow%20should%20drop%20down%20before%20fading%20(%22windowheight%22%20or%20%22pageheight%22)%0A%20%20var%20snowdistance%20%3D%20%22pageheight%22%3B%0A%0A%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FStop%20Config%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%0A%0A%20%20var%20ie4up%20%3D%20(document.all)%20%3F%201%20%3A%200%3B%0A%20%20var%20ns6up%20%3D%20(document.getElementById%26%26!document.all)%20%3F%201%20%3A%200%3B%0A%0A%09function%20iecompattest()%7B%0A%09return%20(document.compatMode%20%26%26%20document.compatMode!%3D%22BackCompat%22)%3F%20document.documentElement%20%3A%20document.body%0A%09%7D%0A%0A%20%20var%20dx%2C%20xp%2C%20yp%3B%20%20%20%20%2F%2F%20coordinate%20and%20position%20variables%0A%20%20var%20am%2C%20stx%2C%20sty%3B%20%20%2F%2F%20amplitude%20and%20step%20variables%0A%20%20var%20i%2C%20doc_width%20%3D%20800%2C%20doc_height%20%3D%20600%3B%20%0A%20%20%0A%20%20if%20(ns6up)%20%7B%0A%20%20%20%20doc_width%20%3D%20self.innerWidth%3B%0A%20%20%20%20doc_height%20%3D%20self.innerHeight%3B%0A%20%20%7D%20else%20if%20(ie4up)%20%7B%0A%20%20%20%20doc_width%20%3D%20iecompattest().clientWidth%3B%0A%20%20%20%20doc_height%20%3D%20iecompattest().clientHeight%3B%0A%20%20%7D%0A%0A%20%20dx%20%3D%20new%20Array()%3B%0A%20%20xp%20%3D%20new%20Array()%3B%0A%20%20yp%20%3D%20new%20Array()%3B%0A%20%20am%20%3D%20new%20Array()%3B%0A%20%20stx%20%3D%20new%20Array()%3B%0A%20%20sty%20%3D%20new%20Array()%3B%0A%20%20snowsrc%3D(snowsrc.indexOf(%22dynamicdrive.com%22)!%3D-1)%3F%20%22snow.gif%22%20%3A%20snowsrc%0A%20%20for%20(i%20%3D%200%3B%20i%20%3C%20no%3B%20%2B%2B%20i)%20%7B%20%20%0A%20%20%20%20dx%5Bi%5D%20%3D%200%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20set%20coordinate%20variables%0A%20%20%20%20xp%5Bi%5D%20%3D%20Math.random()*(doc_width-50)%3B%20%20%2F%2F%20set%20position%20variables%0A%20%20%20%20yp%5Bi%5D%20%3D%20Math.random()*doc_height%3B%0A%20%20%20%20am%5Bi%5D%20%3D%20Math.random()*20%3B%20%20%20%20%20%20%20%20%20%2F%2F%20set%20amplitude%20variables%0A%20%20%20%20stx%5Bi%5D%20%3D%200.02%20%2B%20Math.random()%2F10%3B%20%2F%2F%20set%20step%20variables%0A%20%20%20%20sty%5Bi%5D%20%3D%200.7%20%2B%20Math.random()%3B%20%20%20%20%20%2F%2F%20set%20step%20variables%0A%09%09if%20(ie4up%7C%7Cns6up)%20%7B%0A%20%20%20%20%20%20if%20(i%20%3D%3D%200)%20%7B%0A%20%20%20%20%20%20%20%20document.write(%22%3Cdiv%20id%3D%5C%22dot%22%2B%20i%20%2B%22%5C%22%20style%3D%5C%22POSITION%3A%20absolute%3B%20Z-INDEX%3A%20%22%2B%20i%20%2B%22%3B%20VISIBILITY%3A%20visible%3B%20TOP%3A%2015px%3B%20LEFT%3A%2015px%3B%5C%22%3E%3Ca%20href%3D%5C%22http%3A%2F%2Fdynamicdrive.com%5C%22%3E%3Cimg%20src%3D'%22%2Bsnowsrc%2B%22'%20border%3D%5C%220%5C%22%3E%3C%5C%2Fa%3E%3C%5C%2Fdiv%3E%22)%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20document.write(%22%3Cdiv%20id%3D%5C%22dot%22%2B%20i%20%2B%22%5C%22%20style%3D%5C%22POSITION%3A%20absolute%3B%20Z-INDEX%3A%20%22%2B%20i%20%2B%22%3B%20VISIBILITY%3A%20visible%3B%20TOP%3A%2015px%3B%20LEFT%3A%2015px%3B%5C%22%3E%3Cimg%20src%3D'%22%2Bsnowsrc%2B%22'%20border%3D%5C%220%5C%22%3E%3C%5C%2Fdiv%3E%22)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%0A%0A%20%20function%20snowIE_NS6()%20%7B%20%20%2F%2F%20IE%20and%20NS6%20main%20animation%20function%0A%20%20%20%20doc_width%20%3D%20ns6up%3Fwindow.innerWidth-10%20%3A%20iecompattest().clientWidth-10%3B%0A%09%09doc_height%3D(window.innerHeight%20%26%26%20snowdistance%3D%3D%22windowheight%22)%3F%20window.innerHeight%20%3A%20(ie4up%20%26%26%20snowdistance%3D%3D%22windowheight%22)%3F%20%20iecompattest().clientHeight%20%3A%20(ie4up%20%26%26%20!window.opera%20%26%26%20snowdistance%3D%3D%22pageheight%22)%3F%20iecompattest().scrollHeight%20%3A%20iecompattest().offsetHeight%3B%0A%20%20%20%20for%20(i%20%3D%200%3B%20i%20%3C%20no%3B%20%2B%2B%20i)%20%7B%20%20%2F%2F%20iterate%20for%20every%20dot%0A%20%20%20%20%20%20yp%5Bi%5D%20%2B%3D%20sty%5Bi%5D%3B%0A%20%20%20%20%20%20if%20(yp%5Bi%5D%20%3E%20doc_height-50)%20%7B%0A%20%20%20%20%20%20%20%20xp%5Bi%5D%20%3D%20Math.random()*(doc_width-am%5Bi%5D-30)%3B%0A%20%20%20%20%20%20%20%20yp%5Bi%5D%20%3D%200%3B%0A%20%20%20%20%20%20%20%20stx%5Bi%5D%20%3D%200.02%20%2B%20Math.random()%2F10%3B%0A%20%20%20%20%20%20%20%20sty%5Bi%5D%20%3D%200.7%20%2B%20Math.random()%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20dx%5Bi%5D%20%2B%3D%20stx%5Bi%5D%3B%0A%20%20%20%20%20%20document.getElementById(%22dot%22%2Bi).style.top%3Dyp%5Bi%5D%2B%22px%22%3B%0A%20%20%20%20%20%20document.getElementById(%22dot%22%2Bi).style.left%3Dxp%5Bi%5D%20%2B%20am%5Bi%5D*Math.sin(dx%5Bi%5D)%2B%22px%22%3B%20%20%0A%20%20%20%20%7D%0A%20%20%20%20snowtimer%3DsetTimeout(%22snowIE_NS6()%22%2C%2010)%3B%0A%20%20%7D%0A%0A%09function%20hidesnow()%7B%0A%09%09if%20(window.snowtimer)%20clearTimeout(snowtimer)%0A%09%09for%20(i%3D0%3B%20i%3Cno%3B%20i%2B%2B)%20document.getElementById(%22dot%22%2Bi).style.visibility%3D%22hidden%22%0A%09%7D%0A%09%09%0A%0Aif%20(ie4up%7C%7Cns6up)%7B%0A%20%20%20%20snowIE_NS6()%3B%0A%09%09if%20(hidesnowtime%3E0)%0A%09%09setTimeout(%22hidesnow()%22%2C%20hidesnowtime*1000)%0A%09%09%7D%0A%0A%3C%2Fscript%3E-->
Kezdőlap | Nyomtatás | Oldaltérkép | RSS