/* Dynamic Version: 1.0.0, Hash: aa077ee16fac9265be1afa126ee12f1e; 23.11.2017 04:35 */ var no = 40; var speed = 50; var schnee_grafiken=1; var dx, xp, yp; var am, stx, sty; var i, doc_width = 800, doc_height = 600; dx = new Array(); xp = new Array(); yp = new Array(); am = new Array(); stx = new Array(); sty = new Array(); element = new Array(); function snow() { for (i = 0; i < no; ++ i) { yp[i] += sty[i]; if (yp[i] > doc_height-10) { xp[i] = Math.random()*(doc_width-am[i]-50); yp[i] = -50; stx[i] = 0.02 + Math.random()/10; sty[i] = 0.7 + Math.random(); doc_width = document.body.clientWidth-50; doc_height = document.body.clientHeight-50; if (doc_height < 600) {doc_height=600;} if (doc_width < 800) {doc_width=800;} } dx[i] += stx[i]; element[i].style.top = yp[i]+am[i]*Math.abs(Math.sin(dx[i]))/3+"px"; element[i].style.left = xp[i] +am[i]*Math.cos(dx[i]) +"px"; } setTimeout("snow();", speed); } function setup_xtra() { doc_width = document.body.clientWidth-50; doc_height = document.body.clientHeight-50; for (i = 0; i < no; ++ i) { var div=document.createElement("div"); div.setAttribute("id","div_"+i); document.getElementById("body").appendChild(div); element[i]=div; var nr=Math.floor(Math.random()*schnee_grafiken)+1; div.innerHTML="\'\'"; dx[i] = 0; xp[i] = Math.random()*doc_width; yp[i] = Math.random()*doc_height; am[i] = Math.random()*20+5; stx[i] = 0.02 + Math.random()/10; sty[i] = 0.7 + Math.random(); element[i].style.position = "absolute"; element[i].style.zindex = "1"; } snow(); }