/* *************************************************************
** 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(
   "Men",
   "Women",
   "People",
   "War",
   "1860-70"
      
   );


/* ********************************************************** */
/* Herein lies the Photo object constructor function. Don't   */
/* change this code (unless you really know what you're doing)!  */
/* ********************************************************** */

var photoNum = 0;  // index into origPhotoObjectsArray

function Photo(url, thumburl, caption, commentary, keywords)
  {
  this.url = "./images/" + url;                // Photo.url property
  this.thumburl = "./images/" + 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 ajburkjer = new Photo(
    "ajburkjer.jpg", 
    "ajburkejr2.jpg", 
    "Andrew Jackson Burke, Jr.(1840-1880)", 
    "A.J. Burke, Jr. is listed in the 1866 directory as a bookeeper in his father's (A. J. Burke) store. A dealer in dry goods between Congress and Preston Streets. The Burke residence block is bounded by Louisiana, Smith, Dallas and Lamar. A. J. Burke, Jr. came from a most impressive family tree. His father A. J. Burke and his mother Eloise were among the first pioneers to live and raise their family in the wild and untamed area now known as Houston. At the time of their arrival in 1837, Texas was still a republic. The Burke home was located at the corner of Travis and Rusk, where the Esperson Building currently stands. By 1869, A. J. Burke Jr. is married to Georgie Thompson and has several children.",
    "1860-70, Men, People"
);

var nettie = new Photo(
    "nettie1.jpg", 
    "nettie2.jpg", 
    "Annette Eloise Burke (1854-1930)", 
    "Nettie Burke was born in her home where the Mille Esperson building now stands on August 1, 1854. She was the eleventh of thirteen children born to A.J. and Eloise Burke. This picture was taken in 1879 as a wedding portrait celebrating her marriage to George Ruthven Bringhurst. Black wedding dresses were not uncommon during the 19th century.",
    "1860-70, Women, People"
);

var geo1 = new Photo(
    "geo1.jpg", 
    "geo12.jpg", 
    "George Bringhurst", 
    "Husband of Nettie Burke, they married in 1879, the year her father was mayor of Houston.",
    "1860-70, Men, People"
);

var netm = new Photo(
    "netm.jpg", 
    "netm2.jpg", 
    "Mrs. Eloise Lusk Burke (1817-1886)", 
    "Eloise Lusk married A.J. Burke on Sept. 13, 1837 in Houston, Texas. Thirteen children were born to them and only 7 survived childhood. The last living child was Nettie Burke Bringhurst who lived until 1930. There were no any surviving male children to carry on the Burke name, so the lineage died with Nettie but now will carry on through publication of her diary and the carefully kept family papers covering the years 1844-1919. Eloise Lusk was a dear friend of Zerviah Noble, early Houston educator and owner of the historic Kellum-Noble house in Sam Houston Park.",
    "1860-70, Women, People"
);

var fany1 = new Photo(
    "fany1.jpg", 
    "fany12.jpg", 
    "Funeral notice for Eloise Lusk Burke", 
    "Mother to Nettie Burke and wife of one-time mayor A. J. Burke.",
    "1860-70, Women, People"
);

var fanny = new Photo(
    "fanny.jpg", 
    "fanny2.jpg", 
    "Fanny Burke (1856-1882)",
    "Fanny Burke is 13 years old in 1869. She was married on May 13, 1881 to Allen Blake. She died eight months later along with her infant child and is buried in Glenwood Cemetary in the Burke plot.",
    "1860-70, Women, People"
);

var fann = new Photo(
    "fann.jpg", 
    "fann2.jpg", 
    "Fanny Burke", 
    "Fanny Burke",
    "1860-70, Women, People"
);

var alf1 = new Photo(
    "alf1.jpg", 
    "alf12.jpg", 
    "Alfred Cushing", 
    "Alfred Cushing was the son of E. H. and Matilda Cushing.",
    "1860-70, Men, People"
);

var edw1 = new Photo(
    "edw1.jpg", 
    "edw12.jpg", 
    "Edward Benjamin Cushing (1863-1924) ", 
    "Edward Benjamin Cushing was born in Houston on Nov. 22, 1863. On Feb. 18, 1888, he married Florence Abbey Powars. He worked for Southern Pacific Railroad in Houston, first as an axman and roadman, then as assistant general manager, and then as a maintenance-of-way engineer (1912). He died in Houston on Feb. 17, 1924.",
    "1860-70, Men, People"
);

var fann = new Photo(
    "fann.jpg", 
    "fann2.jpg", 
    "Fanny Burke", 
    "Fanny Burke",
    "1860-70, Women, People"
);

var nbb = new Photo(
    "nbb.jpg", 
    "nbb2.jpg", 
    "Nettie Burke and Nellie Bagby", 
    "Nellie is the daughter of Thomas M. Bagby, the gentleman for whom Bagby street in Houston is named.",
    "1860-70, Women, People"
);

var netti2 = new Photo(
    "netti2.jpg", 
    "netti2a.jpg", 
    "Nettie Burke", 
    "Nettie and her sister were sent to Norwich Conneticut during some part of the Civil War years. She mentions the time she spent in her diary... I now sit down to have a sweet conversation with my dear old journal.. I dont see how in the world anyone lives without one.. it is such a comfort such evenings as this.. it is a very gloomy evening, it has been so all day long, it reminds me of the winter days in the North only it isn't cold.. oh I would give anything on earth to be in the North.. now if I could only go there on a visit I would be satisfied, I have so many dear friends there and I like them all so much, but of course not as well as my friends in the dear old South but I will not talk about that subject any longer I talk about it the worse I want to go back there. Nettie kept a diary from July 1869 to the first of January 1870.",
    "1860-70, Women, People"
);

var lilliec = new Photo(
    "lilliec.jpg", 
    "lilliec2.jpg", 
    "Lillie Conklin Gaines", 
    "In the 1870 Harris County census she is listed as living at home with her sister Emma and her three brothers. Her father, Mathias is listed as a wholesale/retail druggist. He also is listed in the 1866 city directory as living on Milam street between Dallas and Polk. She married George Gaines.",
    "1860-70, Women, People"      
);

var net = new Photo(
    "net.jpg", 
    "net2.jpg", 
    "Nettie and Fanny", 
    "Nettie and Fanny.",
    "1860-70, Women, People"
);

var maryt = new Photo(
    "maryt.jpg", 
    "maryt2.jpg", 
    "Mary Taylor", 
    "Mary was part of the social set of 1869 Houston. At the age of 16, she was considered an acquaintance or even a rival of Nettie Burkes. From Ellen Robbins Red's book: Early Days on the Bayou, comes this short discription: Horace Taylor, first post-war mayor of Houston elected in 1866 had his own dilemma from the yellow fever epidemic. His children watched over each other in this way... Four-year-old Willie was sewn into a blanket and left in the care of his sister, Mary, age fourteen. Mary had been born immediately after her mother, Emily, had yellow fever and hence, she like her mother, was thereafter immune.",
    "1860-70, Women, People"
);

var frank = new Photo(
    "frank.jpg", 
    "frank2.jpg", 
    "Frank S. Burke (1848-1914)", 
    "Frank S. Burke wrote in a letter to a Yale classmate on June 19th, 1906... I sometimes wonder how I ever went to Yale, for among my earlier recollections, there is very little of schools. Most of them are of riding over the prairies, herding cattle or with a gun and dogs, hunting or chasing almost every kind of game until I was past the age of fifteen years, when I joined a Cavalry regiment in the confederate Army and spent one year entertaining the invaders under Generals Banks and Weitzel and the rest of the time on the frontier, holding back the frolicsome Kiowa and Comanche. In 1869, he was 21 years old. He practiced law in Galveston and stayed a bachelor until the end.",
    "1860-70, Men, People"
);

var maryb = new Photo(
    "maryb.jpg", 
    "maryb2.jpg", 
    "Mary Burke (1846-1864)", 
    "Mary Burke was married on Dec. 29, 1863 to Josiah Copes. She died eight months later along with her infant child. Josiah was not listed in the 1866 city directory nor in the 1870 Harris County census. She is buried in Glenwood.",
    "1860-70, Women, People"
);

var emma = new Photo(
    "emma.jpg", 
    "emma2.jpg", 
    "Emma Conklin Bringhurst", 
    "In the 1870 Harris County census she is listed as living at home with her sister Lillie Conklin Gaines and her three brothers. Her father Mathias is listed as a wholesale/retail druggist. He is also listed in the 1866 city directory as living on Milam street between Dallas and Polk. She married Tom Bringhurst and became Nettie Burke's sister-in-law.",
    "1860-70, Women, People"
);

var edburke = new Photo(
    "edburke.jpg", 
    "edburke2.jpg", 
    "Edmund L. Burke (1852-1919)", 
    "Ed Burke was 17 years old in 1869.",
    "1860-70, Men, People, War"
);

var ehcush1 = new Photo(
    "ehcush1.jpg", 
    "ehcush1a.jpg", 
    "Edward Hopkins Cushing (1829-1897)", 
    "Edward Hopkins Cushing, newspaperman and horticulturist, was born in Royalton Vermont, on June 11, 1829, to Daniel and Nancy (Anthony) Cushing. In 1856, he acquired control of the \" Houston Telegraph\" from Dr. Frances Moore, whom he replaced as editor. In his role as editor and publisher of the Telegraph for the next thirteen years.",
    "1860-70, Men, People, War"
);


var horace = new Photo(
    "horace.jpg", 
    "horace2.jpg", 
    "Horace T. Burke (1851-1890)", 
    "Horace Burke was 18 years old in 1869.",
    "1860-70, Men, People, War"
);

var boh1 = new Photo(
    "boh1.jpg", 
    "boh1a.jpg", 
    "Bohemia, Houston, Texas", 
    "This is home called Bohemia where the Cushing's had a renowned landscaped 10 acres. From entertaining to nursing Civil War soldiers this home was one exciting place. Notaries such as Ashbel Smith, Mollie E. Moore Davis and Sam Houston were quest and the experience of a gathering was written and published by a Northern reporter named Ana S. D.",
    "1860-70, Men, People, War"
);

var matildab1 = new Photo(
    "matildab1.jpg", 
    "matildab1a.jpg", 
    "Matilda Burke Cushing", 
    "Sister to Nettie Burke and wife of E. H. Cushing. Hostess at the ten acre family plot called Bohemia.",
    "1860-70, Men, People, War"
);

var tmb1 = new Photo(
    "tmb1.jpg", 
    "tmb1a.jpg", 
    "Thomas M. Bagby(1814-1868)", 
    "Bagby street in downtown Houston is named for T.M. Bagby and his residence was where the present Julian Ideson building now stands. He named Sam Houston among his friends and served as a Major in the Confederate Navy, married the sister of Capitan William R. Baker and had six children. His daughter Nellie is in a photograph with Nettie Burke and is mentioned in her diary.",
    "1860-70, Men, People, War"
);

var civilwars = new Photo(
    "civilwars.jpg", 
    "civilwars2.jpg", 
    "Civil War Soldiers", 
    "These two soldiers were photographs in the Burke Bringhurst Albums. Their identification still continues.",
    "1860-70, Men, People, War"
);


/* ********************************************************** */
/* 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!


