Есть скрипт падения снега на рисунке ->
<script>
var no = 50; // snow number
var speed = 17; // smaller number moves the snow faster
var sp_rel = 1.4; //speed relevation
var snowflake1 = "/i/snow.gif";
var snowflake2 = "/i/snow.gif";
var i, doc_width, doc_height;
dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();
Array.prototype.exists = function(el)
{
for(var i=0;i<this.length;i++)
if(this[i]==el)
return true;
return false;
}
var rooms = ['1.100', '1.107', '1.111', '1.120'];
function SetVariable(c) {
dx[c] = 0; // set coordinate variables
am[c] = Math.random()*15; // set amplitude variables
xp[c] = Math.random()*(doc_width-35) + 0 + am[c]; // set position variables
yp[c] = 0;
stx[c] = 0.02 + Math.random()/10; // set step variables
sty[c] = 0.7 + Math.random(); // set step variables
}
function DrawWeather(room) {
doc_width = document.getElementById('img_ione').width;
doc_height = document.getElementById('img_ione').height;
var div = '';
for (i = 0; i < no; ++ i) {
SetVariable(i);
div += "<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: 30" + i +"; VISIBILITY: visible; TOP: " + 0 + "px; LEFT: " + 0 + "px;\"><img id=\"im"+ i +"\" src=\"" + (sty[i]<sp_rel ? snowflake2 : snowflake1 ) + "\" border=\"0\" alt=\"Снежинка\"></div>";
}
document.getElementById('snow').innerHTML = div;
return 1;
}
function WeatherBegin() { // IE main animation function
for (i = 0; i < no; ++ i) { // iterate for every dot
yp[i] += sty[i] < sp_rel ? sty[i]/2 : sty[i];
if (yp[i] > doc_height-40) {
SetVariable(i);
var im = document.getElementById('im'+i);
im.src = (sty[i] < sp_rel) ? snowflake2 : snowflake1;
}
dx[i] += stx[i];
document.getElementById('dot'+i).style.top = yp[i]+'px';
document.getElementById('dot'+i).style.left = xp[i] + am[i]*Math.sin(dx[i])+'px';
}
setTimeout('WeatherBegin()', speed);
}
</script>
и есть месо где он должен падать
<div style="position:relative;" id="ione"><img src="/i/city/winter/<?php echo "$fon" ?>.png" name="img_ione" width=500 height=280 border="0" id="img_ione"/>
Подскажите почему он не падает на рисурке? Где ошибка?