A tvuj opraveny kod k otestovani, cely, vypada jak? Nejake kousicky polofunkcniho cehosi tady nikdo resit nebude. A slozite kody take ne. Takze jednoduchy funkcni kod je?
<style>
.slideshow {border:2px solid #090; width:450px;}
.slideshow div {display:none; border:2px solid #090; width:450px;}
.slideshow div.show {display:block;}
</style>
<div class="slideshow">
<!-- první obrázek -->
<div class="show"><a href="/"><img src="0.jpg" class="show" title="0" /></a></div>
<div><a href="/"><img src="1.jpg" title="1" /></a></div>
<div><a href="/"><img src="2.jpg" title="2" /></a></div>
</div>
<script>
var timer, sl, xxx; // tohle jsem presunul mimo funkci a pridal sl a xxx
xxx = function(el, time) {
var active = 0;
// var img = el.querySelectorAll("img");
var img = el.querySelectorAll("div");
var imgCount = img.length;
function change() {
img[active].className = "";
if (active == (imgCount - 1)) {
active = 0;
}
else {
active = active + 1;
}
img[active].className = "show";
}
el.onmouseover = function() {
clearInterval(timer);
img[active].className = "show stoped rucicka";
};
el.onmouseout = function() {
timer = setInterval(change, time);
};
el.onclick = change;
timer = setInterval(change, time); // presunul jsem timer na konec
}
sl = document.querySelector("div.slideshow");
xxx(sl, 300);
</script>