set a startup variable. unset it with the first call of the photo index page
[phpfspot.git] / phpfspot.js
index bde4c6aafc5540bc7fce5a410188e494513a6819..2d7e780c4cf7b4a63400d2dceb7c03a0a75191ae 100644 (file)
@@ -67,8 +67,9 @@ function showBubbleDetails(object, id, direction)
 // if photo index is currently shown, refresh it
 function refreshPhotoIndex()
 {
 // if photo index is currently shown, refresh it
 function refreshPhotoIndex()
 {
-   if(document.getElementById("matrix") != undefined) {
+   if(document.getElementById("matrix") != undefined || startup == 1) {
       showPhotoIndex();
       showPhotoIndex();
+      startup = 0;
    }
 }
 
    }
 }
 
@@ -111,3 +112,5 @@ function clearSearch()
 {
    document.getElementsByName('searchfor')[0].value = '';
 }
 {
    document.getElementsByName('searchfor')[0].value = '';
 }
+
+var startup = 1;