I have this function makes a slideshow with divs:
[code]<script language=”JavaScript” type=”text/javascript”>
start_slideshow(1, 4, 10000);
function start_slideshow(start_frame, end_frame, delay) {
a = setTimeout(switch_slides(start_frame,start_frame,end_frame, delay), delay);
}
function switch_slides(frame, start_frame, end_frame, delay) {
return (function() {
Effect.Fade(‘slideshow’ + frame);
if (frame == end_frame) { frame = start_frame; } else { frame = frame + 1; }
b = setTimeout(“Effect.Appear(‘slideshow” + frame + “‘);”, 850);
c = setTimeout(switch_slides(frame, start_frame, end_frame, delay), delay + 850);
})
}
}
I need to be able to click a link to stop the slideshow.
I tried calling this function with a link:
[code]function clearstop() {
window.clearTimeout(a);
window.clearTimeout(b);
window.clearTimeout(c);
But if the slideshow hasn’t moved to the second div, then b and c are not defined so I get an error.
Please help ?