issue56, check if next-link-anchor is still here in case user decided to click around...
[phpfspot.git] / phpfspot.js
index 06f20e0314d763ec6211a3ea79a9a4bec6caa65e..588298ab3691f53755d013e34bdf31aadcfa73b5 100644 (file)
@@ -315,9 +315,11 @@ function nextSlide()
 
 function autoBrowse()
 {
-   var next_link = document.getElementById('next_link').href;
-   window.location.href = next_link;
-   setTimeout("autoBrowse()", 5000);
+   if(document.getElementById('next_link')) {
+      var next_link = document.getElementById('next_link').href;
+      window.location.href = next_link;
+      setTimeout("autoBrowse()", 5000);
+   }
 }  
 
 var startup = 1;