//gallery navigator
// displays page number PageNumber in main frame

function display(PageNumber) {
         var page = WebPage + PageNumber + ".html";
         window.document.location.href = page;
         CurrentPage = PageNumber;
}

// displays previous page (previous to the current page)

function goToPrevPage() {
         if ( CurrentPage != FirstPage)
                  CurrentPage--;
         display(CurrentPage);
}

// displays the next page (next to the current page)

function goToNextPage() {
         if ( CurrentPage != LastPage)
                  CurrentPage++;
         display(CurrentPage);
}

// displays the first page of your 'book'

function goToFirstPage()  {
      display(FirstPage);
}

// displays the last page of your 'book'

function goToLastPage()  {
      display(LastPage);
}
