/*
   Deel 3 Fotos resiverslag Zuid-Afrika, Wouter en Carin 
     - Addo NP en Shakaland
*/

/* *************************************************************
** 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();


/* ********************************************************** */
/* 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 = "Addo NP en Shakaland";

var addo_meerkatten_1 = new Photo(
    "addo_meerkatten_1.jpg", 
    "addo_meerkatten_1_thumb.jpg", 
    "Meerkatten (of Stokstaartjes): geweldig grappige beestjes", 
    "Een mooi familieportret !",
    ""
);
var addo_meerkatten_2 = new Photo(
    "addo_meerkatten_2.jpg", 
    "addo_meerkatten_2_thumb.jpg", 
    "Hallooo, sta ik er goed op ???", 
    "Zoals ze met z\'n allen een andere kant op staan te kijken...",
    ""
);
var addo_mestkever = new Photo(
    "addo_mestkever.jpg", 
    "addo_mestkever_thumb.jpg", 
    "De mestkever is beschermd in Addo NP", 
    "Als men ziet dat je er één overrijdt, kan je een fikse boete krijgen.",
    ""
);
var addo_mestkever_2 = new Photo(
    "addo_mestkever_2.jpg", 
    "addo_mestkever_2_thumb.jpg", 
    "Het ziet er erg onhandig uit, zoals ze een mestballetje voortbewegen", 
    "met z\'n achterpoten duwt de kever het balletje een kant op.",
    ""
);
var addo_kudu = new Photo(
    "addo_kudu.jpg", 
    "addo_kudu_thumb.jpg", 
    "Een kudu, gezien vanuit een \'hide\'", 
    "heel stil en voorzichtig stond hij daar, tot hij ons gehoord of geroken had.",
    ""
);
var addo_overst_olifanten_autos_ervoor = new Photo(
    "addo_overst_olifanten_autos_ervoor.jpg", 
    "addo_overst_olifanten_autos_ervoor_thumb.jpg", 
    "Hier waren we voor gekomen: heel veel olifanten", 
    "(maar het duurde wel een halve dag voor we ze van dichtbij zagen)",
    ""
);
var addo_closeup_olifant = new Photo(
    "addo_closeup_olifant.jpg", 
    "addo_closeup_olifant_thumb.jpg", 
    "We hebben ze van hééél dichtbij gezien", 
    "en dat was erg indrukwekkend !",
    ""
);
var addo_olifant_met_kleintje = new Photo(
    "addo_olifant_met_kleintje.jpg", 
    "addo_olifant_met_kleintje_thumb.jpg", 
    "Groot en klein, met en zonder slagtanden", 
    "en bruiner dan de (meer bekende) olifant zoals die in Kruger voorkomt!",
    ""
);
var camper_bij_shakaland = new Photo(
    "camper_bij_shakaland.jpg", 
    "camper_bij_shakaland_thumb.jpg", 
    "Na Addo weer wat cultuur: Shakaland", 
    "Dit Zulu-dorp is overgebleven na de opnames van de tv-serie \'Shakazulu\'.",
    ""
);
var bier_maken_shakaland = new Photo(
    "bier_maken_shakaland.jpg", 
    "bier_maken_shakaland_thumb.jpg", 
    "In Shakaland werd nog geleefd zoals de Zulu\'s altijd geleefd hebben.", 
    "Zo werd er op traditionele wijze bier gemaakt (smaak was matig, het smaakte vooral zanderig)",
    ""
);
var shakaland_dansen = new Photo(
    "shakaland_dansen.jpg", 
    "shakaland_dansen_thumb.jpg", 
    "Bij de rondleiding door Shakaland hoorden ook een dansshow", 
    "Er werden dansen van vele stammen uitgevoerd, begeleid door indrukwekkende trommels.",
    ""
);



/* ********************************************************** */
/* 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!



