<!-- Hide from old browsers

var debugWindow;
var debugging=0;

var currentSubjImg="1";

// Browser sensing
var isNS=0;
var isIE=0;
var docObj;
var styleObj;
var availableWidth;
var availableHeight;

// Determine the browser name and version
var browserName=navigator.appName;
var browserVerStr=navigator.appVersion;
var browserNum=parseInt(navigator.appVersion);

// Color scheme for navigation
var normalMenuColor="#d7b0f7";
var selectedMenuColor="#a8adf2";

var seqNum=0;

var homePortraitImage=0;

// Variables for home page slide show
var slideSetIdx=1;
var slideType="vertical";
var numImagesToLoad=0; // number of images to preload for slide show
var numImagesLoaded=0; // number of images loaded for slide show
var maxSlideSets; // max sets of images for slide rotation
var numSlideSets=0; // current number of images sets loaded for slide show
var loadCounter=0;

// Array for preloaded images
var preloadedImages = new Array(100);

// Image sources for first changing slide
var verticalSlides =
["images/slide_show_vertical/autom.jpg",      // 0
 "images/slide_show_vertical/italymaniq.jpg",      // 1
 "images/slide_show_vertical/sonj_gilbert_eye.jpg",      // 2
 "images/slide_show_vertical/einstein_portrait.jpg",  // 3
 "images/slide_show_vertical/cbureau_girl_el_window.jpg",      // 4
 "images/slide_show_vertical/mom.jpg",        // 5
 "images/slide_show_vertical/choir.jpg"  // 6
 ]

// Link targets for first changing slide
var verticalSlideLinks =
["nyc_automat_frame_set.htm",      // 0
 "sonj_italy_other_frame_set.htm",        // 1
 "sonj_gilbert_frame_set.htm",     // 2
 "life_einstein_frame_set.htm",         // 3
 "cb_play_frame_set.htm",         // 4
 "pepsi_trinidad_frame_set.htm", // 5
 "life_altar_boy_frame_set.htm"          // 6
]

// Image sources for second changing slide
var horizontalSlides =
["images/slide_show_horizontal/tomball_choir.jpg",       // 0
 "images/slide_show_horizontal/bus_backtoback.jpg",   // 1
 "images/slide_show_horizontal/tetan.jpg",        // 2
 "images/slide_show_horizontal/cheltenham_bathrobe.jpg",      // 3
 "images/slide_show_horizontal/platform.jpg",      // 4
 "images/slide_show_horizontal/uruguay_m_cats.jpg",       // 5
 "images/slide_show_horizontal/nfeet.jpg"      // 6
]

// Link targets for second changing slide
var horizontalSlideLinks =
["sonj_texas_tomball_frame_set.htm",     // 0
 "sonj_bus_story_frame_set.htm",      // 1
 "life_hospitals_frame_set.htm", // 2
 "life_cheltenham_frame_set.htm",    // 3
 "nyc_el_frame_set.htm",   // 4
 "pepsi_uruguay_frame_set.htm",    // 5
 "sheba_frame_set.htm"   // 6
]

// Images sources for third changing slide
var squareSlides =
["images/slide_show_square/bhphone.jpg",       // 0
 "images/slide_show_square/sonj_gilbert_honoria_older.jpg",    // 1
 "images/slide_show_square/bhstairs.jpg",        // 2
 "images/slide_show_square/india_two_faces.jpg",       // 3
 "images/slide_show_square/owi_dc_vet_sells_flags.jpg",       // 4
 "images/slide_show_square/bridge.jpg", // 5
 "images/slide_show_square/nthreemen.jpg"       // 6
]

// Link targets for third changing slide
var squareSlideLinks =
["owi_boarding_house_frame_set.htm",    // 0
 "sonj_gilbert_frame_set.htm",          // 1
 "owi_boarding_house_frame_set.htm",     // 2
 "panam_india_frame_set.htm",       // 3
 "owi_around_washington_frame_set.htm",      // 4
 "sonj_harbor_story_frame_set.htm",        // 5
 "sonj_workers_frame_set.htm"  // 6
]

// Variables for sorting image list table
var curSort="none"; // no sort
var sortOrder="u"; // unknown
var firstSort="true";

// Image Information object for image list table
function imageInfo(cl, to, ci, st, co, ca, dt, lk)
{
  this.client = cl
  this.topic = to
  this.city = ci
  this.state = st
  this.country = co
  this.circa = ca
  this.date = dt
  this.link = lk
}

// Image List Table                                                                                   1
var imageList = new Array(500);

imageList[0] = new imageInfo("&nbsp;", "Automat", "New York", "NY", "United States", "&nbsp;", "1948", "nyc_automat_frame_set.htm");
imageList[1] = new imageInfo("&nbsp;", "Central Park", "New York", "NY", "United States", "&nbsp;", "1954-1995", "nyc_cp_frame_set.htm");
imageList[2] = new imageInfo("&nbsp;", "Charlie Parker", "Los Angeles", "CA", "United States", "&nbsp;", "1952", "cparker_frame_set.htm");
imageList[3] = new imageInfo("&nbsp;", "City Scenes", "New York", "NY", "United States", "&nbsp;", "1944-1959", "nyc_scenes_frame_set.htm");
imageList[4] = new imageInfo("&nbsp;", "Elevated Train", "New York", "NY", "United States", "&nbsp;", "1951", "nyc_el_frame_set.htm");
imageList[5] = new imageInfo("&nbsp;", "How Kittens Grow", "&nbsp;", "&nbsp;", "United States", "&nbsp;", "1973", "how_kittens_grow_frame_set.htm");
imageList[6] = new imageInfo("&nbsp;", "How Puppies Grow", "&nbsp;", "&nbsp;", "United States", "&nbsp;", "1971", "how_puppies_grow_frame_set.htm");
imageList[7] = new imageInfo("&nbsp;", "Rockefeller Center", "New York", "NY", "United States", "&nbsp;", "1945-1954", "nyc_rockefeller_frame_set.htm");
imageList[8] = new imageInfo("&nbsp;", "Sheba", "New York", "NY", "United States", "c", "1965", "sheba_frame_set.htm");
imageList[9] = new imageInfo("Children's Bureau", "Blythedale Convalescent Home for Children", "Valhalla", "NY", "United States", "&nbsp;", "1948", "cb_blythedale_frame_set.htm");
imageList[10] = new imageInfo("Children's Bureau", "Children At Play", "New York", "NY", "United States", "&nbsp;", "1948", "cb_play_frame_set.htm");
imageList[11] = new imageInfo("Children's Bureau", "Nursery School", "New York", "NY", "United States", "&nbsp;", "1948", "cb_nursery_frame_set.htm");
imageList[12] = new imageInfo("Herald Tribune", "First Things First", "New York", "NY", "United States", "&nbsp;", "1957", "ht_foundations_frame_set.htm");
imageList[13] = new imageInfo("Irish Tourist Bureau", "Horse Races", "various", "&nbsp;", "Ireland", "&nbsp;", "1962", "itb_ireland_horse_frame_set.htm");
imageList[14] = new imageInfo("Irish Tourist Bureau", "Pub", "Donegal", "&nbsp;", "Ireland", "&nbsp;", "1962", "itb_ireland_donegal_frame_set.htm");
imageList[15] = new imageInfo("Ladies' Home Journal", "Mental Illness", "&nbsp;", "&nbsp;", "United States", "&nbsp;", "1949", "lhj_mental_frame_set.htm");
imageList[16] = new imageInfo("Ladies' Home Journal", "Wanted: Nine Children", "Fort Dodge", "IA", "United States", "&nbsp;", "1951", "lhj_nine_children_frame_set.htm");
imageList[17] = new imageInfo("Ladies' Home Journal", "Whole Heart for Ramona", "New York", "NY", "United States", "&nbsp;", "1959", "lhj_ramona_frame_set.htm");
imageList[18] = new imageInfo("LIFE", "Albert Einstein", "Princeton", "NJ", "United States", "&nbsp;", "1953", "life_einstein_frame_set.htm");
imageList[19] = new imageInfo("LIFE", "Altar Boy Momentary Angel", "Walden", "NY", "United States", "&nbsp;", "1959", "life_altar_boy_frame_set.htm");
imageList[20] = new imageInfo("LIFE", "Benny Goodman", "Portland", "ME", "United States", "&nbsp;", "1953", "life_bgoodman_frame_set.htm");
imageList[21] = new imageInfo("LIFE", "Cheltenham Ladies' College", "Cheltenham", "&nbsp;", "England", "&nbsp;", "1954", "    life_cheltenham_frame_set.htm");
imageList[22] = new imageInfo("LIFE", "Congressman and the Baby", "&nbsp;", "&nbsp;", "United States", "&nbsp;", "1952", "life_congressman_frame_set.htm");
imageList[23] = new imageInfo("LIFE", "Italian Beauty Contest", "&nbsp;", "&nbsp;", "Italy", "c", "1952", "life_italian_beauty_frame_set.htm");
imageList[24] = new imageInfo("LIFE", "Marianne Moore", "Brooklyn, Bronx, Perkasie", "NY, PA", "United States", "&nbsp;", "1953", "life_moore_frame_set.htm");
imageList[25] = new imageInfo("LIFE", "People Who Go To Hospitals", "New York", "NY", "United States", "&nbsp;", "1951", "life_hospitals_frame_set.htm");
imageList[26] = new imageInfo( "National Foundation for Infantile Paralysis", "Infantile Paralysis (Polio) Poster Contest", "&nbsp;", "&nbsp;", "United States", "&nbsp;", "1950", "polio_frame_set.htm");
imageList[27] = new imageInfo("OWI", "Around Washington, DC", "Washington", "DC", "United States", "&nbsp;", "1943", "owi_around_washington_frame_set.htm");
imageList[28] = new imageInfo("OWI", "Boarding House", "Washington", "DC", "United States", "c", "1943", "owi_boarding_house_frame_set.htm");
imageList[29] = new imageInfo("OWI", "Bus Story", "various", "&nbsp;", "United States", "&nbsp;", "1943", "owi_bus_story_frame_set.htm");
imageList[30] = new imageInfo("PanAm", "Australia", "various", "&nbsp;", "Australia", "&nbsp;", "1965-1966", "panam_australia_various_frame_set.htm");
imageList[31] = new imageInfo("PanAm", "Australian Steel Mill", "Port Kembla", "&nbsp;", " Australia", "&nbsp;", "1965", "panam_australia_steel_frame_set.htm");
imageList[32] = new imageInfo("PanAm", "India", "various", "&nbsp;", "India", "&nbsp;", "1964", "panam_india_frame_set.htm");
imageList[33] = new imageInfo("PanAm", "Istanbul", "Istanbul", "&nbsp;", "Turkey", "&nbsp;", "1964", "panam_istanbul_frame_set.htm");
imageList[34] = new imageInfo("PanAm", "Lisbon", "Lisbon", "&nbsp;", "Portugal", "&nbsp;", "1965", "panam_lisbon_frame_set.htm");
imageList[35] = new imageInfo("PanAm", "Tehran", "Tehran", "&nbsp;", "Iran", "&nbsp;", "1964", "panam_tehran_frame_set.htm");
imageList[36] = new imageInfo("PanAm", "New Zealand: Bowls (bowling on the green)", "Christchurch", "&nbsp;", "New Zealand", "&nbsp;", "1965", "panam_new_zealand_bw_frame_set.htm");
imageList[37] = new imageInfo("PanAm", "New Zealand: Mt. Cook &amp; Rotorua Geyser", "Rotorua, Mt. Cook Village", "&nbsp;", "New Zealand", "&nbsp;", "1965", "panam_new_zealand_frame_set.htm");
imageList[38] = new imageInfo("Pepsi Cola", "Brazil", "Ouro Preto, various", "&nbsp;", "Brazil", "c", "1956", "pepsi_brazil_frame_set.htm");
imageList[39] = new imageInfo("Pepsi Cola", "Ecuador", "&nbsp;", "&nbsp;", "Ecuador", "c", "1956", "pepsi_ecuador_frame_set.htm");
imageList[40] = new imageInfo("Pepsi Cola", "Guatemala", "&nbsp;", "&nbsp;", "Guatemala", "&nbsp;", "1955", "pepsi_guatemala_frame_set.htm");
imageList[41] = new imageInfo("Pepsi Cola", "Peru", "&nbsp;", "&nbsp;", "Peru", "c", "1955", "pepsi_peru_frame_set.htm");
imageList[42] = new imageInfo("Pepsi Cola", "Trinidad", "&nbsp;", "&nbsp;", "Trinidad", "c", "1955", "pepsi_trinidad_frame_set.htm");
imageList[43] = new imageInfo("Pepsi Cola", "Uruguay", "&nbsp;", "&nbsp;", "Uruguay", "c", "1955", "pepsi_uruguay_frame_set.htm");
imageList[44] = new imageInfo("SONJ", "Bus Story", "New York", "NY", "United States", "&nbsp;", "1947", "sonj_bus_story_frame_set.htm");
imageList[45] = new imageInfo("SONJ", "Bus Hostess Story", "Assissi, Rome", "&nbsp;", "Italy", "&nbsp;", "1952", "sonj_italy_bus_hostess_frame_set.htm");
imageList[46] = new imageInfo("SONJ", "Copenhagen-Malm&ouml; Ferry", "&nbsp;", "&nbsp;", "Denmark, Sweden", "&nbsp;", "1952", "sonj_denmark_copenhagen_frame_set.htm");
imageList[47] = new imageInfo("SONJ", "Island of Aero", "Aero", "&nbsp;", "Denmark", "&nbsp;", "1952", "sonj_denmark_aero_frame_set.htm");
imageList[48] = new imageInfo("SONJ", "Island of Mano", "Mano", "&nbsp;", "Denmark", "&nbsp;", "1952", "sonj_denmark_mano_frame_set.htm");
imageList[49] = new imageInfo("SONJ", "Gilbert and Barker Mfg. Co.", "W. Springfield", "MA", "United States", "&nbsp;", "1944", "sonj_gilbert_frame_set.htm");
imageList[50] = new imageInfo("SONJ", "Harbor Story", "New York", "NY", "United States", "&nbsp;", "1946", "sonj_harbor_story_frame_set.htm");
imageList[51] = new imageInfo("SONJ", "Italy", "various", "&nbsp;", "Italy", "&nbsp;", "1955", "sonj_italy_other_frame_set.htm");
/*
imageList[52] = new imageInfo("SONJ", "RCA Building", "New York", "NY", "United States", "c", "1946", "sonj_rca_building_frame_set.htm");
*/
imageList[52] = new imageInfo("SONJ", "Oil Town, U.S.A.", "Tomball", "TX", "United States", "&nbsp;", "1945", "sonj_texas_tomball_frame_set.htm");
imageList[53] = new imageInfo("SONJ", "Philippines", "&nbsp;", "&nbsp;", "Philippines", "&nbsp;", "1965", "sonj_philippines_frame_set.htm");
imageList[54] = new imageInfo("SONJ", "Workers", "various", "&nbsp;", "United States", "c", "1944", "sonj_workers_frame_set.htm");
imageList[55] = new imageInfo("UNICEF", "Trachoma Project", "various", "&nbsp;", "Morocco", "&nbsp;", "1953", "unicef_trachoma_frame_set.htm");
imageList[56] = new imageInfo("University of Pittsburgh", "Emergency Tracheotomy", "Pittsburgh", "PA", "United States", "&nbsp;", "1951", "pgh_tracheotomy_frame_set.htm");
imageList[57] = new imageInfo("Woman's Day", "Eight-thirty to Twelve", "Westport", "CT", "United States", "&nbsp;", "1957", "wd_milbrath_frame_set.htm");
imageList[58] = new imageInfo("END OF LIST", "", "", "", "" , "", "", "");

// Less than function for sorting image list by client
function clientIsLess(aa,bb)
{
  var bufa, bufb;
  bufa=aa.client.toUpperCase();
  bufb=bb.client.toUpperCase();
  if (bufa < bufb)
    return true;
  if (bufa > bufb)
    return false;
  bufa=aa.topic.toUpperCase();
  bufb=bb.topic.toUpperCase();
  if (bufa < bufb)
    return true;
  if (bufa > bufb)
    return false;
  bufa=aa.country.toUpperCase();
  bufb=bb.country.toUpperCase();
  if (bufa < bufb)
    return true;
  if (bufa > bufb)
    return false;
  bufa=aa.state.toUpperCase();
  bufb=bb.state.toUpperCase();
  if (bufa < bufb)
    return true;
  if (bufa > bufb)
    return false;
  bufa=aa.city.toUpperCase();
  bufb=bb.city.toUpperCase();
  if (bufa < bufb)
    return true;
  if (bufa > bufb)
    return false;
  bufa=aa.date.toUpperCase();
  bufb=bb.date.toUpperCase();
  if (bufa < bufb)
    return true;
  if (bufa > bufb)
    return false;
  bufa=aa.circa.toUpperCase();
  bufb=bb.circa.toUpperCase();
  if (bufa < bufb)
    return true;
  if (bufa > bufb)
    return false;
  return false;

}

// Less than function for sorting image list by topic
function topicIsLess(aa,bb)
{
  var bufa, bufb;

  bufa=aa.topic.toUpperCase();
  bufb=bb.topic.toUpperCase();
  if (bufa < bufb)
    return true;
  if (bufa > bufb)
    return false;
  bufa=aa.client.toUpperCase();
  bufb=bb.client.toUpperCase();
  if (bufa < bufb)
    return true;
  if (bufa > bufb)
    return false;
  bufa=aa.country.toUpperCase();
  bufb=bb.country.toUpperCase();
  if (bufa < bufb)
    return true;
  if (bufa > bufb)
    return false;
  bufa=aa.state.toUpperCase();
  bufb=bb.state.toUpperCase();
  if (bufa < bufb)
    return true;
  if (bufa > bufb)
    return false;
  bufa=aa.city.toUpperCase();
  bufb=bb.city.toUpperCase();
  if (bufa < bufb)
    return true;
  if (bufa > bufb)
    return false;
  bufa=aa.date.toUpperCase();
  bufb=bb.date.toUpperCase();
  if (bufa < bufb)
    return true;
  if (bufa > bufb)
    return false;
  bufa=aa.circa.toUpperCase();
  bufb=bb.circa.toUpperCase();
  if (bufa < bufb)
    return true;
  if (bufa > bufb)
    return false;
  return false;

}

// Less than function for sorting image list by city
function cityIsLess(aa,bb)
{
  var bufa, bufb;

  bufa=aa.city.toUpperCase();
  bufb=bb.city.toUpperCase();
  if (bufa < bufb)
    return true;
  if (bufa > bufb)
    return false;
  bufa=aa.country.toUpperCase();
  bufb=bb.country.toUpperCase();
  if (bufa < bufb)
    return true;
  if (bufa > bufb)
    return false;
  bufa=aa.state.toUpperCase();
  bufb=bb.state.toUpperCase();
  if (bufa < bufb)
    return true;
  if (bufa > bufb)
    return false;
  bufa=aa.client.toUpperCase();
  bufb=bb.client.toUpperCase();
  if (bufa < bufb)
    return true;
  if (bufa > bufb)
    return false;
  bufa=aa.topic.toUpperCase();
  bufb=bb.topic.toUpperCase();
  if (bufa < bufb)
    return true;
  if (bufa > bufb)
    return false;
  bufa=aa.date.toUpperCase();
  bufb=bb.date.toUpperCase();
  if (bufa < bufb)
    return true;
  if (bufa > bufb)
    return false;
  bufa=aa.circa.toUpperCase();
  bufb=bb.circa.toUpperCase();
  if (bufa < bufb)
    return true;
  if (bufa > bufb)
    return false;
  return false;

}

// Less than function for sorting image list by state
function stateIsLess(aa,bb)
{
  var bufa, bufb;

  bufa=aa.state.toUpperCase();
  bufb=bb.state.toUpperCase();
  if (bufa < bufb)
    return true;
  if (bufa > bufb)
    return false;
  bufa=aa.country.toUpperCase();
  bufb=bb.country.toUpperCase();
  if (bufa < bufb)
    return true;
  if (bufa > bufb)
    return false;
  bufa=aa.city.toUpperCase();
  bufb=bb.city.toUpperCase();
  if (bufa < bufb)
    return true;
  if (bufa > bufb)
    return false;
  bufa=aa.client.toUpperCase();
  bufb=bb.client.toUpperCase();
  if (bufa < bufb)
    return true;
  if (bufa > bufb)
    return false;
  bufa=aa.topic.toUpperCase();
  bufb=bb.topic.toUpperCase();
  if (bufa < bufb)
    return true;
  if (bufa > bufb)
    return false;
  bufa=aa.date.toUpperCase();
  bufb=bb.date.toUpperCase();
  if (bufa < bufb)
    return true;
  if (bufa > bufb)
    return false;
  bufa=aa.circa.toUpperCase();
  bufb=bb.circa.toUpperCase();
  if (bufa < bufb)
    return true;
  if (bufa > bufb)
    return false;
  return false;

}

// Less than function for sorting image list by country
function countryIsLess(aa,bb)
{
  var bufa, bufb;

  bufa=aa.country.toUpperCase();
  bufb=bb.country.toUpperCase();
  if (bufa < bufb)
    return true;
  if (bufa > bufb)
    return false;
  bufa=aa.state.toUpperCase();
  bufb=bb.state.toUpperCase();
  if (bufa < bufb)
    return true;
  if (bufa > bufb)
    return false;
  bufa=aa.city.toUpperCase();
  bufb=bb.city.toUpperCase();
  if (bufa < bufb)
    return true;
  if (bufa > bufb)
    return false;
  bufa=aa.client.toUpperCase();
  bufb=bb.client.toUpperCase();
  if (bufa < bufb)
    return true;
  if (bufa > bufb)
    return false;
  bufa=aa.topic.toUpperCase();
  bufb=bb.topic.toUpperCase();
  if (bufa < bufb)
    return true;
  if (bufa > bufb)
    return false;
  bufa=aa.date.toUpperCase();
  bufb=bb.date.toUpperCase();
  if (bufa < bufb)
    return true;
  if (bufa > bufb)
    return false;
  bufa=aa.circa.toUpperCase();
  bufb=bb.circa.toUpperCase();
  if (bufa < bufb)
    return true;
  if (bufa > bufb)
    return false;
  return false;

}

// Less than function for sorting image list by date
function dateIsLess(aa,bb)
{
  var bufa, bufb;

  bufa=aa.date.toUpperCase();
  bufb=bb.date.toUpperCase();
  if (bufa < bufb)
    return true;
  if (bufa > bufb)
    return false;
  bufa=aa.circa.toUpperCase();
  bufb=bb.circa.toUpperCase();
  if (bufa < bufb)
    return true;
  if (bufa > bufb)
    return false;
  bufa=aa.client.toUpperCase();
  bufb=bb.client.toUpperCase();
  if (bufa < bufb)
    return true;
  if (bufa > bufb)
    return false;
  bufa=aa.topic.toUpperCase();
  bufb=bb.topic.toUpperCase();
  if (bufa < bufb)
    return true;
  if (bufa > bufb)
    return false;
  bufa=aa.country.toUpperCase();
  bufb=bb.country.toUpperCase();
  if (bufa < bufb)
    return true;
  if (bufa > bufb)
    return false;
  bufa=aa.state.toUpperCase();
  bufb=bb.state.toUpperCase();
  if (bufa < bufb)
    return true;
  if (bufa > bufb)
    return false;
  bufa=aa.city.toUpperCase();
  bufb=bb.city.toUpperCase();
  if (bufa < bufb)
    return true;
  if (bufa > bufb)
    return false;
  return false;

}

// Sort the image list by the specified column
//
function sortImageList(column)
{
  var i, j, isLess;

  if (firstSort=="true" & column=="client")
    sortOrder="d";
  else if (column==curSort & sortOrder=="a") // column is currently sorted ascending
    sortOrder="d"; // change sort to decending
  else
    sortOrder="a"; // change sort to ascending
  curSort=column;
  firstSort="false";
  for (i=0; i < imageList.length - 1; i++)
  {
    if (imageList[i].client == "END OF LIST")
      break;
    for (j=i+1; j < imageList.length; j++)
    {
      if (imageList[j].client == "END OF LIST")
        break;
      if (column=="client")
        isLess=clientIsLess(imageList[j], imageList[i]);
      else if (column=="topic")
        isLess=topicIsLess(imageList[j], imageList[i]);
      else if (column=="city")
        isLess=cityIsLess(imageList[j], imageList[i]);
      else if (column=="state")
        isLess=stateIsLess(imageList[j], imageList[i]);
      else if (column=="country")
        isLess=countryIsLess(imageList[j], imageList[i]);
      else if (column=="circa")
        isLess=dateIsLess(imageList[j], imageList[i]);
      else if (column=="date")
        isLess=dateIsLess(imageList[j], imageList[i]);
      else
        isLess=clientIsLess(imageList[j], imageList[i]);
      if ((isLess && sortOrder=="a") || (!isLess && imageList[i]!=imageList[j] && sortOrder=="d"))
      {
        var saveRow=imageList[i];
        imageList[i]=imageList[j];
        imageList[j]=saveRow;
      } // if (isLess ...)
    } // for (j ...)
  } // for (i ...)
  writeImageList();
}

function writeImageListFromParent()
{
  if (browserName=="Netscape")
    return;
  else
    writeImageList();
}

function writeImageListFromChild()
{
  if (browserName!="Netscape")
    return;
  else
    writeImageList();
}
// Write the image list to the frame named "main"
//
function writeImageList()
{
  var row, i=0;
  var np, textString;

  np = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">";
  np = np + "<html><head>";
  np = np + "<script language=\"javascript\" src=\"eb.js\"></script>";
  np = np + "<link rel=\"stylesheet\" type=\"text/css\" href=\"eb.css\" />";
  np = np + "</head>";
  np = np + "<body class=\"frameMainNoTopMargin\" link=\"#ffffff\" vlink=\"#ffffff\" alink=\"#ffffff\">";
  np = np + "<table align=\"center\" cellpadding=\"2\" cellspacing=\"0\">";

  // Table data
  for (i = 0; i < imageList.length; i++)
  {
    if (imageList[i].client == "END OF LIST")
      break;
    np = np + "<tr>";

    np = np + "<td class=\"data\" width=\"150\" align=\"left\">";
    textString = imageList[i].client;
    np = np + textString;
    np = np + "</td>"
    np = np + "<td class=\"data\" width=\"300\" align=\"left\"><span class=\"lowKeyNu\"><a href=\"JavaScript:goToPage('";
    textString = imageList[i].link;
    np = np + textString;
    np = np + "', '_top');\">";
    textString = imageList[i].topic;
    np = np + textString;
    np = np + "</a></span></td>"
    np = np + "<td class=\"data\" width=\"100\" align=\"left\">";
    textString = imageList[i].city;
    np = np + textString;
    np = np + "</td>"
    np = np + "<td class=\"data\" width=\"50\" align=\"left\">";
    textString = imageList[i].state;
    np = np + textString;
    np = np + "</td>"
    np = np + "<td class=\"data\" width=\"100\" align=\"left\">";
    textString = imageList[i].country;
    np = np + textString;
    np = np + "</td>"
    np = np + "<td class=\"data\" width=\"10\" align=\"left\">";
    textString = imageList[i].circa;
    np = np + textString;
    np = np + "</td>"
    np = np + "<td class=\"data\" width=\"100\" align=\"left\">";
    textString = imageList[i].date;
    np = np + textString;
    np = np + "</td>"
    np = np + "</tr>";
  }
  np = np + "</table></body></html>";

  parent.frames["main"].document.write(np);
  parent.frames["main"].document.close();

}

//document.writeln('checking browser<br>');
if (browserName=="Netscape") {
  isNS=1;
}
if (browserName=="Microsoft Internet Explorer"){
  isIE=1;
}

docObj= (isNS) ? 'document' : 'document.all';
styleObj= (isNS && browserNum < 5) ? '' : '.style';

function setWidthHeight() {
  // do object detection
  if (window.innerHeight) { // Mozilla, Opera, Safari
    availableWidth=window.innerWidth;
    availableHeight=window.innerHeight;
  }
  else if (window.document.documentElement.clientHeight) { // IE standards mode
    availableWidth=document.documentElement.clientWidth;
    availableHeight=document.documentElement.clientHeight;
    }
  else { // quirks mode, old versions of IE
    availableWidth=window.document.body.clientWidth;
    availableHeight=window.document.body.clientHeight;
 }
}

function initSetUp() {
  setWidthHeight();
}

// Preload images for home page slide show
function preLoad() {
  var i;

  if (numImagesLoaded>=numImagesToLoad)
    return;
  i=numImagesLoaded-1;

  // Load next image for vertical slide
  preloadedImages[i] = new Image();
  preloadedImages[i].onload = imageLoadCheck;
  preloadedImages[i++].src = verticalSlides[numSlideSets];

  // Load next image for horizontal slide
  preloadedImages[i] = new Image();
  preloadedImages[i].onload = imageLoadCheck;
  preloadedImages[i++].src = horizontalSlides[numSlideSets];

  // Load next image for square slide
  preloadedImages[i] = new Image();
  preloadedImages[i].onload = imageLoadCheck;
  preloadedImages[i++].src = squareSlides[numSlideSets];

}

// imageLoadCheck() check to see if all images
//                  for home page slide show
//                  are loaded
function imageLoadCheck() {

  numImagesLoaded++;
  loadCounter++;
  if (loadCounter == 3) {
    numSlideSets++;
    loadCounter=0;
    if (numImagesLoaded < numImagesToLoad) {
      preLoad(); // load the next set of images
    }
    else {
      // Hide the downloading msg
      /*alert(document.getElementById('downloadMsg').style.visibility);*/
      document.getElementById('downloadMsg').style.visibility="hidden";
    }
  }
}

// Display a sub-window
//
// Arguments:
//    subWinPath     pathname of document to display in sub-window
//    winWidth    width, in pixels, of sub-window
//    winHeight   height, in pixels, of sub-window
//
function popupSubWindow(winPath, winWidth, winHeight) {
  var features;

  features="width=" + winWidth + "," +
           "height=" + winHeight + "," +
           "resizable,scrollbars,location,status,menubar,toolbar";
  var w=window.open(winPath, // URL
                    self.name + seqNum++, // unique window name
                    features); // features
}

// onLoad() setup for the home page
function homeSetUp() {
  setWidthHeight();
  maxSlideSets=verticalSlides.length;
  if (maxSlideSets > horizontalSlides.length) {
    maxSlideSets = horizontalSlides.length;
  }
  if (maxSlideSets > squareSlides.length) {
    maxSlideSets = squareSlides.length;
  }
  numImagesToLoad = 3 * maxSlideSets;
  preLoad(); // preload first set of images for slide show

  // Start the timer for the slide show
  setInterval("changeImage()", 3000); // 3000 ms is 3 seconds
}

// onUnload() clean-up for home page
function homeCleanUp() {
  clearInterval();
}

// onLoad() setup for non-home pages
function mySetUp() {
  setWidthHeight();
}

// Home page function to change an image
function changeImage() {
  if (numSlideSets < 2)
    return;

  switch(slideType) {
  case "vertical":
    document.getElementById('vSlide').src=verticalSlides[slideSetIdx];
    document.getElementById('vSlideLink').href=verticalSlideLinks[slideSetIdx];
	 slideType="horizontal";
	 break;
  case "horizontal":
	 document.getElementById('hSlide').src=horizontalSlides[slideSetIdx];
    document.getElementById('hSlideLink').href=horizontalSlideLinks[slideSetIdx];
    slideType="square";
    break;
  case "square":
    document.getElementById('sSlideLink').href=squareSlideLinks[slideSetIdx];
	 document.getElementById('sSlide').src=squareSlides[slideSetIdx];
    slideType="vertical";
    slideSetIdx++;
    if (slideSetIdx == numSlideSets)
      slideSetIdx=0;
    break;
  }
}

// Go to a new page.
//
// Arguments:
//  pageSource   relative pathname of new page
//  targetName   '_top' makes the new page the top level, removing all frames
//                      Other values are interpreted as the name of a frame
//                      relative to the parent window
function goToPage(pageSource, targetName) {
  if (targetName=="_top") {
    top.location=pageSource;
  }
  else {
    parent.frames[targetName].location=pageSource;
  }
}

// Show an element
//
// Arguments:
//  elem   ID of element to be shown
function showElement(elem) {
  document.getElementById(elem).style.visibility="visible";
}

// Hide an element
//
// Arguments:
//  elem   ID of element to be hidden
function hideElement(elem) {
  document.getElementById(elem).style.visibility="hidden";
}

// Hide one element and show another element
//
// Arguments:
//  hideElem   ID of element to be hidden
//  showElem   ID of element to be shown
function hideAndShowElement(hideElem, showElem) {
  hideElement(hideElem);
  showElement(showElem);
}

// For use on the Biographical Sketch page
// Hide one set of elements and show another
//
// Arguments:
//  hideElem   ID of element to be hidden
//  showElem   ID of element to be shown
function hideAndShowBioElements(hideElem, showElem) {
  hideAndShowElement("pic" + hideElem, "pic" + showElem);
  hideAndShowElement("quote" + hideElem, "quote" + showElem);
  hideAndShowElement("text" + hideElem, "text" + showElem);
  hideAndShowElement("nav" + hideElem, "nav" + showElem);
}

// Toggle visibility of an element
//
// Arguments:
//  elem   ID of element to be shown
function toggleVisibility(elem) {
  var el=document.getElementById(elem);
  var visi=el.style.visibility;
  if (visi != "visible")
    el.style.visibility="visible";
  else
    el.style.visibility="hidden";
}

// Turn on a sub-menu
//
// Arguments:
//  subMenu   Prefix of the subMenu element ID and the associated link ID
function subMenuOn(subMenu) {
  // Create the element IDs of the subMenu to display and its associated link
  // Get the elements
  var subMenuID=subMenu + "SubNav";
  var linkID=subMenu + "Link";
  var subMenuElem=document.getElementById(subMenuID);
  var linkElem=document.getElementById(linkID);

  // Make the subMenu visible
  subMenuElem.style.visibility="visible";

  // Make the associated link the appropriate color
  linkElem.style.color=selectedMenuColor;

  // Hide other subMenus
  subMenusOffExcept(subMenu);
}

// Turn off all subMenus execpt the one specified
//
// Arguments:
//   except   subMenu the remains visible or "none" to turn off all subMenus
//
function subMenusOffExcept(except) {
  var subMenuID=except + "SubNav";
  var x;

  if (subMenuID != "imageSubNav") {
    x = document.getElementById('imageSubNav');
    if (x) {
      x.style.visibility="hidden";
      document.getElementById('imageLink').style.color=normalMenuColor;
    }
  }

  if (subMenuID != "infoSubNav") {
    x = document.getElementById('infoSubNav');
    if (x) {
      x.style.visibility="hidden";
      document.getElementById('infoLink').style.color=normalMenuColor;
    }
  }

  if (subMenuID != "imageFrameSubNav") {
    x = document.getElementById('imageFrameSubNav');
    if (x) {
      x.style.visibility="hidden";
      document.getElementById('imageFrameLink').style.color=normalMenuColor;
    }
  }
  if (subMenuID != "infoFrameSubNav") {
    x = document.getElementById('infoFrameSubNav');
    if (x) {
      x.style.visibility="hidden";
      document.getElementById('infoFrameLink').style.color=normalMenuColor;
    }
  }
}

// Turn off all subMenus
//
// Arguments:
//  none
function subMenusOff() {
  subMenusOffExcept('none');
}

// Toggle visibility of a sub-menu
//
// Arguments:
//  subMenu   Prefix of the subMenu element ID and the associated link ID
function toggleSubMenu(subMenu) {
  // Create the element IDs of the subMenu to display and its associated link
  // Get the elements
  var subMenuID=subMenu + "SubNav";
  var linkID=subMenu + "Link";
  var subMenuElem=document.getElementById(subMenuID);
  var linkElem=document.getElementById(linkID);

  // If sub-menu is hidden
  if (subMenuElem.style.visibility != "visible") {
    // Make sub-menu visible
    subMenuElem.style.visibility = "visible";
    // Make the associated link the appropriate color
    linkElem.style.color=selectedMenuColor;
    // Hide other subMenus
    subMenusOffExcept(subMenu);
  }
  else {
    // Hide the sub-menu
    subMenuElem.style.visibility="hidden";
    // Make the associated link the appropriate color
    linkElem.style.color=normalMenuColor;
  }
}

// Change the text color of an element
//
// Arguments:
//
// elem   ID of element
// color  new color
//
function changeColor(elem, color) {
  var el=document.getElementById(elem);
  el.style.color=color;
}

// Swap the image in the specified element
//
// Arguments:
//  elem       Element ID
//  imagePath  Pathname of new image
//
function swapImage(elem, imagePath) {
  document.getElementById(elem).src=imagePath;
}

// Display text in a new window
function test() {
  var w=window.open("", // URL not specified
                    "window" + seqNum++, // unique window name
                    "width=400,height=400,left=200,top=200,screenX=200,screenY=200"); // features
  var d=w.document;
  d.write("<html>");
  d.write("<body>");
  d.write("This is a test javascript function");
  d.write("</html>");
  d.close();
  return true;
}

// Show the specified subject image, hide the others
//
// Arguments:
//   subj   subject image number to show
//
function showSubjImg(num) {
  var x, y, i;

  for (i=1; i<100; i++) {
    subjImgID="subjImg" + i;
    subjLinkID="subjLink" + i;
    /*
    x = document.getElementById(subjImgID);
    y = document.getElementById(subjLinkID);
    */
    x = parent.frames["main"].document.getElementById(subjImgID);
    y = parent.frames["mainR"].document.getElementById(subjLinkID);
    if (x) {
      if (i == num) {
        x.style.visibility="visible";
		  if (y)
		    y.style.color="#a8adf2";
      }
      else {
        x.style.visibility="hidden";
		  if (y)
		    y.style.color="#ffffff";
	   }
    }
  }
}

function setCurrentSubjImg(num) {
  parent.frames["main"].currentSubjImg=num;
  }
function showCurrentSubjImg(num) {
  showSubjImg(parent.frames["main"].currentSubjImg);
  }

// Blank page
function blank()
{
  return "<html><body></body></html>";
}

// Do Nothing
function doNothing() {
}

// TEST
function testFunc()
{
  alert("test function invoked");
}


// stop hiding from old browsers -->

