/*
   Deel 1 Foto's - Reisverslag Ecuador en Galapagos 2005, Wouter en Carin
     - Quito, Cuenca, El Cajas, Riobamba
*/

/* *************************************************************
** 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(
	"Quito",
	"Cuenca",
	"Ingapirca",
 	"El Cajas",
	"Riobamba",
	"Banos");

/* ********************************************************** */
/* 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 = "Quito, Cuenca, El Cajas, Riobamba";

var foto0 = new Photo(
    "1_05_hotelquito_juniorplaza.jpg", 
    "tn_1_05_hotelquito_juniorplaza.jpg ", 
    "", 
    "",
    "Quito"
);

var foto1 = new Photo(
    "1_10_carinopplein.jpg", 
    "tn_1_10_carinopplein.jpg ", 
    "", 
    "",
    "Quito"
);

var foto2 = new Photo(
    "1_11_pleinquito.jpg", 
    "tn_1_11_pleinquito.jpg", 
    "", 
    "",
    "Quito"
);

var foto3 = new Photo(
    "1_12_wittetorenopplein.jpg", 
    "tn_1_12_wittetorenopplein.jpg ", 
    "", 
    "",
    "Quito"
);

var foto4 = new Photo(
    "1_20_rivierwasdoorkinderen.jpg", 
    "tn_1_20_rivierwasdoorkinderen.jpg", 
    "", 
    "",
    "Cuenca"
);

var foto5 = new Photo(
    "1_21_rivierwastedrogen.jpg", 
    "tn_1_21_rivierwastedrogen.jpg", 
    "", 
    "",
    "Cuenca"
);

var foto6 = new Photo(
    "1_24_cuencaplein.jpg", 
    "tn_1_24_cuencaplein.jpg", 
    "", 
    "",
    "Cuenca"
);

var foto7 = new Photo(
    "1_25_krantlezendeman.jpg", 
    "tn_1_25_krantlezendeman.jpg", 
    "", 
    "",
    "Cuenca"
);

var foto8 = new Photo(
    "1_29_carinwouteropwegnaaringapirca.jpg", 
    "tn_1_29_carinwouteropwegnaaringapirca.jpg", 
    "", 
    "",
    "Ingapirca"
);

var foto9 = new Photo(
    "1_32_carinvooringapirca.jpg", 
    "tn_1_32_carinvooringapirca.jpg", 
    "", 
    "",
    "Ingapirca"
);

var foto10 = new Photo(
    "1_36_jongetrailbegeleidermetezel.jpg", 
    "tn_1_36_jongetrailbegeleidermetezel.jpg", 
    "", 
    "",
    "Ingapirca"
);

var foto11 = new Photo(
    "1_37_jongetrailbegeleiderportret.jpg", 
    "tn_1_37_jongetrailbegeleiderportret.jpg", 
    "", 
    "",
    "Ingapirca"
);

var foto12 = new Photo(
    "1_41_elcajas_carinwouter.jpg", 
    "tn_1_41_elcajas_carinwouter.jpg", 
    "", 
    "",
    "El Cajas"
);

var foto13 = new Photo(
    "1_42_cajasuitzicht.jpg", 
    "tn_1_42_cajasuitzicht.jpg", 
    "", 
    "",
    "El Cajas"
);

var foto14 = new Photo(
    "1_43_elcajas_lamas.jpg", 
    "tn_1_43_elcajas_lamas.jpg", 
    "", 
    "",
    "El Cajas"
);

var foto15 = new Photo(
    "1_50_cuencabusstation.jpg", 
    "tn_1_50_cuencabusstation.jpg", 
    "", 
    "",
    "Cuenca"
);

var foto16 = new Photo(
    "2_01_indianenonderweg.jpg", 
    "tn_2_01_indianenonderweg.jpg", 
    "", 
    "",
    "Banos"
);

var foto17 = new Photo(
    "2_07_banoscarinbijbaden.jpg", 
    "tn_2_07_banoscarinbijbaden.jpg", 
    "", 
    "",
    "Banos"
);

var foto18 = new Photo(
    "2_25_banos_cafe.jpg", 
    "tn_2_25_banos_cafe.jpg", 
    "", 
    "",
    "Banos"
);

var foto19 = new Photo(
    "2_14_riobambaindianeninstad.jpg", 
    "tn_2_14_riobambaindianeninstad.jpg", 
    "", 
    "",
    "Riobamba"
);

var foto20 = new Photo(
    "2_15_riobambaindiaansevrouwinauto.jpg", 
    "tn_2_15_riobambaindiaansevrouwinauto.jpg", 
    "", 
    "",
    "Riobamba"
);

var foto21 = new Photo(
    "2_20_indiaansmeisjeportret.jpg", 
    "tn_2_20_indiaansmeisjeportret.jpg", 
    "", 
    "",
    "Riobamba"
);


/* ********************************************************** */
/* 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!



