/*
   Deel 3 - Fotos reisverslag USA 2004, Wouter en Carin
     - Cedar Breaks, Zion NP, Red Canyon, Bryce Canyon NP
*/

/* *************************************************************
** JSALBUM.JS
** ==========
** This library contains global variables and functions to power
** the JS PhotoAlbum, as presented in 12/99's ScriptHead column.
** Use it in good health! Please maintain this header, and let
** me know what you've done with the code: rachmiel@hotmail.com 
**
** Author      Ver  Date     Comments
** ======      ===  ====     ========
** Rick Scott  1.0  12/1/99  First release
**
** Copyright 1999, Rick Scott, all rights reserved.
**
** USAGE
** =====
** To make the PhotoAlbum easy to customize, *all* of the code 
** you must change to create your own PhotoAlbum is in *this* 
** file (jsalbum.js). You'll find instructions below.
**
** Unless you are fluent in coding JS, don't mess around with 
** the other Album files:
**   jsalbum.html - frameset doc for entire PhotoAlbum
**   non-js.html - displays warning msg for JS-incapable users
**   lpage.html - frameset doc for left PhotoAlbum page
**   rpage.html - frameset doc for right PhotoAlbum page
**   thumb.html - displays/processes PhotoAlbum thumbnails
**   thumbctr.html - thumbnail control panel
**   photo.html - displays/processes full PhotoAlbum photos
**   photoctr.html - photo control panel
************************************************************* */


/* ********************************************************** */
/* GLOBAL VARIABLES                                           */
/* ================                                           */
/* The follow global variables are loaded into the Album's    */
/* topmost frameset document (jsalbum.html) to enable the     */
/* Album to "save state" (remember variable values).          */
/* ********************************************************** */

// don't change these!
var origPhotoObjectsArray = new Array();  // array of orig Photo objects
var currPhotoObjectsArray = new Array();  // array of current Photo objects
var currPhotoObjectsArrayIndex = 0;       // index into currPhotoObjectsArray
var currPhotoObjectsArrayLength = 0;      // length of currPhotoObjectsArray

// these you can change
var thumbctrFrameVisible = true;  // show/hide (true/false) thumbnail controls
var photoctrFrameVisible = true;  // show/hide (true/false) photo controls
var looping = true;               // enable/disable (true/false) < > looping

// don't change these!
var currKeyword = "All";   // currently selected keyword for thumbnail display
var currKeywordIndex = 0;  // index into keywordsArray

// Replace these keywordsArray strings with your keywords;
// they will show up as options in your Show: select-box.
// If you're not going to use keywords, create empty array:
//   var keywordsArray = new Array();
// (see KEYWORDS, below, for more on keyword usage)
var keywordsArray = new Array(
   "Cedar Breaks",
   "Zion NP",
	 "Red Canyon",
	 "Bryce Canyon NP");


/* ********************************************************** */
/* Herein lies the Photo object constructor function. Don't   */
/* change this code (unless you really know what yer doin')!  */
/* ********************************************************** */

var photoNum = 0;  // index into origPhotoObjectsArray

function Photo(url, thumburl, caption, commentary, keywords)
  {
  this.url = url;                // Photo.url property
  this.thumburl = thumburl;      // Photo.thumburl property
  this.caption = caption;        // Photo.caption property
  this.commentary = commentary;  // Photo.commentary property
  this.keywords = keywords;      // Photo.keywords property

  this.suppLinksNum = arguments.length - 5;  // 6th+ args are suppLinks
  if (this.suppLinksNum > 0)
    {
    this.suppLinksArray = new Array();
    for (var i=0; i<this.suppLinksNum; i++)
      this.suppLinksArray[i] = arguments[i+5];
    }
  origPhotoObjectsArray[photoNum++] = this;  // to update thumbs dynamically
  }


/* ********************************************************** */
/* PHOTO OBJECTS                                              */
/* =============                                              */
/* Here's where you create your Photo objects, one for each   */
/* photo in your album. Use this syntax:                      */
/*                                                            */
/* var photoObjName = new Photo(                              */
/*     "photoURL",                                            */
/*     "thumbnailURL",                                        */
/*     "caption",                                             */
/*     "commentary",                                          */
/*     "keywords"                                             */
/*    );                                                      */
/*                                                            */
/*   photoObjName - any legal JS identifier                   */
/*   photoURL - absolute/relative URL of photo                */
/*   thumbnailURL - absolute/relative URL of thumbnail        */
/*   caption - string (use \' for ', don't use ")             */
/*   commentary - string (ditto on \' and ")                  */
/*   keywords - string of form: "keyword1, keyword2, etc."    */
/*                                                            */
/* To display 1-N supplemental links beneath the photo,       */
/* append 1-N of the following lines to the above construct:  */
/*                                                            */
/*   "linktext^linkURL"                                       */
/*                                                            */
/*   linktext - the text that is linked (underlined)          */
/*   ^ - required delimiter between linktext and linkURL      */
/*   linkURL - the URL to load when the link is clicked       */
/*                                                            */
/* Make sure that all your Photo() arguments are separated    */
/* by commas, except for the last argument. Here are two      */
/* examples; the first has 0 supp links, the second has 2:    */
/*                                                            */
/* var brownie = new Photo(                                   */
/*     "brownie.jpg",           // photoURL                   */
/*     "brownie-.jpg",          // thumbnailURL               */
/*     "Kodak Brownie Camera",  // caption                    */
/*     "This 1900 ad extols the virtues ...",  // commentary  */
/*     "1900-10"                // keywords                   */
/* );                                                         */
/*                                                            */
/* var robbery = new Photo(                                   */
/*     "robbery.jpg",           // photoURL                   */
/*     "robbery-.jpg",          // thumbnailURL               */
/*     "The Train Robbery",     // caption                    */
/*     "In this scene from the film ...",  // commentary      */
/*     "Trains, Movies",        // keywords                   */
/*     "Watch Movie^samp.mov",  // supplemental link 1        */
/*     "Jump to URL^jump.html"  // supplemental link 2        */
/* );                                                         */
/*                                                            */
/* KEYWORDS                                                   */
/* ========                                                   */
/* To enable the keyword feature to work (i.e., user selects  */
/* a keyword from the Show: select box to display only those  */
/* thumbnails that are associated with this keyword):         */
/*                                                            */
/* 1. Enter your keywords in the keywordsArray array (above). */
/* 2. Enter the appropriate keywords in each photo object's   */
/*    keywords argument (below).                              */
/* Note: Keyword spelling/case is critical!                   */
/*                                                            */
/* If you choose not to use keywords at all, create an empty  */
/* keywordsArray array (as described above) and leave all of  */
/* your photo objects' keywords arguments blank "".           */
/* ********************************************************** */

var thumbtitle = "Cedar Breaks, Zion NP, Red Canyon, Bryce Canyon NP";

var foto1 = new Photo(
    "089-Amphitheater_CedarBreaks.jpg",
    "tn_089-Amphitheater_CedarBreaks.jpg",
    "Amphitheater van Cedar Breaks",
    "Een soort Bryce Canyon in het klein - maar heerlijk rustig",
    "Cedar Breaks"
);

var foto2 = new Photo(
    "092-IndianPaintbrush_CedarBreaks.jpg",
    "tn_092-IndianPaintbrush_CedarBreaks.jpg",
    "Indian Paintbrush in Cedar Breaks",
    "Er waren hier zeer veel mooie bloemenweiden en wilde Akeleien in het bos",
    "Cedar Breaks"
);

var foto3 = new Photo(
    "095-Bergpieken_Zion.jpg",
    "tn_095-Bergpieken_Zion.jpg",
    "Bergpieken in Zion NP", 
    "In dit NP zie je de rotsen van onderen, vanaf de canyon-grond",
    "Zion NP"
);

var foto4 = new Photo(
    "096-Rooksignalen_Zion.jpg",
    "tn_096-Rooksignalen_Zion.jpg",
    "Geen indianen, maar wel rooksignalen", 
    "Als je goed kijkt, kun je nog wat mensen onderscheiden boven op de rotswand",
    "Zion NP"
);

var foto5 = new Photo(
    "100-Libelle_Zion.jpg",
		"tn_100-Libelle_Zion.jpg", 
    "Libelle tijdens een trail in Zion NP", 
    "",
    "Zion NP"
);

var foto6 = new Photo(
    "101-CanyonOverlookTrail_Zion.jpg",
		"tn_101-CanyonOverlookTrail_Zion.jpg", 
    "Canyon Overlook Trail in Zion NP", 
    "Bij de oost-uitgang, pal bij de tunnel",
    "Zion NP"
);

var foto7 = new Photo(
    "102-CheckerboardMesa_Zion.jpg",
		"tn_102-CheckerboardMesa_Zion.jpg",
    "Checkerboard Mesa in Zion NP", 
    "Zin in een potje dammen?",
    "Zion NP"
);

var foto8 = new Photo(
    "103-OnderwegZionBryceCanyon.jpg",
		"tn_103-OnderwegZionBryceCanyon.jpg",
    "Onderweg van Zion NP naar Bryce Canyon NP", 
    "Antiek, rommel, noem het maar op...",
    "Zion NP"
);

var foto9 = new Photo(
    "105-PinkLedgeTrail_2_RedCanyon.jpg",
		"tn_105-PinkLedgeTrail_2_RedCanyon.jpg",
    "Pink Ledge Trail in de Red Canyon", 
    "Ook hier was een geocache gps-wandeling, in een zeer mooi gebied. Wel met onweersdreiging!",
    "Red Canyon"
);

var foto10 = new Photo(
    "106-PinkLedgeTrail_3_RedCanyon.jpg",
		"tn_106-PinkLedgeTrail_3_RedCanyon.jpg",
    "Pink Ledge Trail in de Red Canyon", 
    "Wanneer zou deze instorten?",
    "Red Canyon"
);

var foto11 = new Photo(
    "108-DodeBoom_BryceCanyon.jpg",
		"tn_108-DodeBoom_BryceCanyon.jpg",
    "Er waren opmerkelijk veel dode bomen overal, zoals hier in Bryce Canyon NP", 
    "Dit bleek het gevolg te zijn van een kever-plaag die de bomen dodelijk aantast.",
    "Bryce Canyon NP"
);

var foto12 = new Photo(
    "109-QueensGardenTrail_BryceCanyon.jpg",
		"tn_109-QueensGardenTrail_BryceCanyon.jpg",
    "Queens Garden Trail in Bryce Canyon NP", 
    "",
    "Bryce Canyon NP"
);

var foto13 = new Photo(
    "110-QueensGardenTrail_TheQueen_BryceCanyon.jpg",
		"tn_110-QueensGardenTrail_TheQueen_BryceCanyon.jpg",
    "Queens Garden Trail in Bryce Canyon NP", 
    "Queen Elizabeth herself...",
    "Bryce Canyon NP"
);

var foto14 = new Photo(
    "111-MossyCaveTrail_BijBryceCanyon.jpg",
		"tn_111-MossyCaveTrail_BijBryceCanyon.jpg",
    "Mossy Cave Trail", 
    "Net buiten Bryce Canyon NP, ten noord-oosten van de ingang",
    "Bryce Canyon NP"
);

var foto15 = new Photo(
    "112-MossyCaveTrail_Vogelnesten_BijBryceCanyon.jpg",
		"tn_112-MossyCaveTrail_Vogelnesten_BijBryceCanyon.jpg",
    "Mossy Cave Trail", 
    "Vogelnesten",
    "Bryce Canyon NP"
);

var foto16 = new Photo(
    "114-NavajoTrail_Bloemetje_BryceCanyon.jpg",
		"tn_114-NavajoTrail_Bloemetje_BryceCanyon.jpg",
    "Navajo Trail in Bryce Canyon", 
    "Ondanks de droge grond groeien er nog mooie bloemen!",
    "Bryce Canyon NP"
);

var foto17 = new Photo(
    "115-Uitzicht_BryceCanyon.jpg",
		"tn_115-Uitzicht_BryceCanyon.jpg",
    "De amphitheaters in Bryce Canyon", 
    "Je blijft foto\'s maken...",
    "Bryce Canyon NP"
);

var foto18 = new Photo(
    "117-QueensGardenTrail_BryceCanyon.jpg",
		"tn_117-QueensGardenTrail_BryceCanyon.jpg",
    "Nogmaals Queen Garden Trail in Bryce Canyon", 
    "Deze trail moet je gelopen hebben als je in Bryce Canyon bent!",
    "Bryce Canyon NP"
);

/* ********************************************************** */
/* set currPhotoObjectsArray = origPhotoObjectsArray. Don't   */
/* change this code (unless you really know what yer doin')!  */
/* ********************************************************** */

for (var i=0; i<origPhotoObjectsArray.length; i++) 
  currPhotoObjectsArray[i] = origPhotoObjectsArray[i];
currPhotoObjectsArrayLength = origPhotoObjectsArray.length  // set global!



