function start_slideshow(images, max_width, max_height, start_frame, end_frame, delay, effect) {
  setTimeout(switch_slides(images, max_width, max_height, start_frame, start_frame+1, start_frame, end_frame, delay, effect), delay);
}

function switch_slides(images, max_width, max_height, global_frame, local_frame, start_frame, end_frame, delay, effect) {
  return (function() {
    eval("Effect." + effect + "('slide" + (global_frame%2) + "');");
    local_frame++; if (local_frame>end_frame) { local_frame = start_frame; }
    global_frame++;
    setTimeout("Effect.Appear('slide" + (global_frame%2) + "');", 1000);
    if ((global_frame%2)==0) { setTimeout(function() { $('slide1').innerHTML = "<table class=\"slide\"><tr><td><a href=\""+images[local_frame][1]+"\"><img class=\"slideshow\" src=\""+images[local_frame][0]+"\" /></a></td></tr></table><p><b>"+images[local_frame][3]+" <small>"+images[local_frame][4]+"</small></b> <i>"+images[local_frame][2]+"</i></p>"; }, 1000); }
    if ((global_frame%2)==1) { setTimeout(function() { $('slide0').innerHTML = "<table class=\"slide\"><tr><td><a href=\""+images[local_frame][1]+"\"><img class=\"slideshow\" src=\""+images[local_frame][0]+"\" /></a></td></tr></table><p><b>"+images[local_frame][3]+" <small>"+images[local_frame][4]+"</small></b> <i>"+images[local_frame][2]+"</i></p>"; }, 1000); }
    setTimeout(switch_slides(images, max_width, max_height, global_frame, local_frame, start_frame, end_frame, delay, effect), delay + 850);
  })
}