// Author: Alan Nanut, ATS, York University

// Modify iThumbs variable to indicate total
// image count for this gallery.  Note all thumbnail files
// are named as consecutive numbers starting from 1
// (eg. 1.jpg, 2.jpg, ... 50.jpg)
// Modify image properties in gall_map_init.js


// thumbnail count
var iThumbs = 23;
// avg thumbnail width
var iThumbW = 100;
// width occupied by text captions
var iCaptionWidth = 450;


setBrowser ();


var iWidth = iClientWidth - 1;
var iContentWidth = iWidth;
var szIEparams = "";
// ns poses script problems if image properties include the following style properties
if (use_features == 1)
  szIEparams = " position: absolute; left: 0; top: -300;";


if (!use_features)
{
  document.write ("<center>This page requires JavaScript</center>");
}
else
{
  document.write ("<layer id = 'gall_layer1' visibility = 'hide'>");
  document.write ("<img src = 'gallery/trans.gif' name = 'gall_img1' border = '0' style = 'filter: alpha(opacity = 100); visibility: hidden; -moz-opacity: 100;'>");
  document.write ("</layer>");

  document.write ("<layer id = 'thumb_layer1' visibility = 'hide'>");
  document.write ("<img src = 'gallery/trans.gif' name = 'thumb_img1' border = '0' style = 'filter: alpha(opacity = 0); visibility: hidden; -moz-opacity: 100;'>");
  document.write ("</layer>");


  for (iIndex = 1; iIndex <= iThumbs; iIndex++)
  {
    document.write ("<layer id = 'sm_layer"+iIndex+"' visibility = 'hide'>");
    document.write ("<img src = 'gallery/sm/"+iIndex+".jpg' name = 'sm_img"+iIndex+"' border = '0' style = 'filter: alpha(opacity = 100); visibility: hidden; -moz-opacity: 100;"+szIEparams+"'>");
    document.write ("</layer>");

  }

  for (iIndex = 1; iIndex <= iThumbs; iIndex++)
  {
    document.write ("<layer id = 'trans_layer"+iIndex+"' visibility = 'hide'>");
    document.write ("<a href = '#' onFocus = 'hideBorder (this);' onClick = 'GALL_end (1); GALL_start ("+iIndex+"); return false;'><img src = 'gallery/trans.gif' name = 'trans_img"+iIndex+"' border = '0' style = 'filter: alpha(opacity = 100); visibility: hidden; -moz-opacity: 100;"+szIEparams+"' width = '"+iThumbW+"' height = '"+iThumbW+"'></a>");
    document.write ("</layer>");
  }


}


// caption layer

if (use_features == 2)
  document.write ("<layer id = 'caption_layer1' visibility = 'hide' width = '"+iCaptionWidth+"'>");
else
  document.write ("<div id = 'caption_layer1' style = 'position: absolute; visibility: hidden; width: "+iCaptionWidth+";'>");

if (use_features == 2)
  document.write ("</layer>");
else
  document.write ("</div>");



// left gallery navigation arrow

if (use_features == 2)
  document.write ("<layer id = 'left_layer1' visibility = 'hide'>");
else
  document.write ("<div id = 'left_layer1' style = 'position: absolute; visibility: hidden; left: 0; top: -300;'>");
  document.write ("<a href = '#' onClick = 'JavaScript: GALL_left (0); return false;'><img src = 'gallery/prev.gif' border = '0'></a>");
if (use_features == 2)
  document.write ("</layer>");
else
  document.write ("</div>");


// right gallery navigation arrow

if (use_features == 2)
  document.write ("<layer id = 'right_layer1' visibility = 'hide'>");
else
  document.write ("<div id = 'right_layer1' style = 'position: absolute; visibility: hidden; left: 0; top: -300;'>");
  document.write ("<a href = '#' onClick = 'JavaScript: GALL_right (0); return false;'><img src = 'gallery/next.gif' border = '0'></a>");
if (use_features == 2)
  document.write ("</layer>");
else
  document.write ("</div>");









