issue60, current paging variable must be unset on photo index redraw
[phpfspot.git] / phpfspot.js
index dff8da9e68c4aa536061b272c9df3f3bfdf4cef6..588298ab3691f53755d013e34bdf31aadcfa73b5 100644 (file)
@@ -300,7 +300,29 @@ function preloadPhotos(lbImg) {
    }
 }
 
+function startSlideShow()
+{
+   HTML_AJAX.grab(encodeURI('rpc.php?action=reset_slideshow'));
+   nextSlide();
+   setInterval("nextSlide()", 3000);
+}
+
+function nextSlide()
+{
+   next_img = HTML_AJAX.grab(encodeURI('rpc.php?action=get_next_slideshow_img'));
+   document.getElementById('slide_img').src = next_img;
+}
+
+function autoBrowse()
+{
+   if(document.getElementById('next_link')) {
+      var next_link = document.getElementById('next_link').href;
+      window.location.href = next_link;
+      setTimeout("autoBrowse()", 5000);
+   }
+}  
+
 var startup = 1;
 var calendar_shown = 0;
 var calendar_mode = '';
-
+var autobrowse = 0;