tak uz mi to ide ale len ked je event onclick... onload ako keby sa popri tom beziacom znova spustalo dalsie.... problem je ze ja to potrebujem spustit hned po nacitani stranky a nie az po kliknuti
Kód:
<script type="text/javascript">
function slideshow(value)
{
var images = new Array("middle_image","middle_image_2","middle_image_3","middle_image_4","middle_image_5");
var elm = document.getElementById('imm');
var max = images.length - 1;
var num = value;
var pauza = 2000;
var delay = function() {new_image(elm,images[num],num)};
if (num == max)
{
num = 0;
}
else
{
num++;
}
casovac = setTimeout(delay,pauza);
}
function new_image(elm,src,num)
{
elm.src = "/images/" + src + ".jpg";
slideshow(num);
}
</script>
<div id="middle_image">
<div id="middle_image_top"></div>
<img src="/images/middle_image.jpg" id="imm" onclick="slideshow(0)" alt="obrazek X" />
EDIT: po premiestneni onload do body to uz ide... u image sa to spusti vzdy ked sa nahra novy obrazok...