function ShowImages(g_images, g_labels, g_targets, g_widths, g_heights, g_desc)
{
//alert(window.location.href);
  var text;
  var ix;
  var target_begin, target_end, pref;

  var lcpage = window.location.href;
  lcpage = lcpage.toLowerCase();
  var is_gallery_page = 0;
  var is_main_gallery_page = 0;
  if (lcpage.indexOf('gallery') >= 0)
  {
    is_gallery_page = 1;
    is_main_gallery_page = 1;
    if (lcpage.indexOf('gallery_') >= 0) is_main_gallery_page = 0;
  }
  gm_images  = new Array("g_sugarridge_gallery.jpg", "g_arborlea_gallery.jpg",  "g_pickardmountain_gallery.jpg", "g_cedargrove_gallery.jpg",  "g_montery_gallery.jpg",   "g_stoneridge_gallery.jpg", "g_briarbridgelane_gallery.jpg", "g_carolwoodsll_gallery.jpg", "g_buckhornmt_gallery.jpg", "g_calanoe_gallery.jpg", "g_collingtondrive_gallery.jpg", "g_prestonspring_gallery.jpg");
  gm_labels  = new Array("sugar ridge",              "arbor lea",               "pickard mountain",              "cedar grove",               "montery",                 "stoneridge",              "briarbridge lane",               "carolwoods ll",              "buckhorn mt",              "calanoe",               "collington drive",              "preston spring");           
  gm_targets = new Array("gallery_sugarridge.shtml", "gallery_arborlea.shtml",  "gallery_pickardmountain.shtml", "gallery_cedargrove.shtml",  "gallery_montery.shtml",   "gallery_stoneridge.shtml","gallery_briarbridgelane.shtml",  "gallery_carolwoodsll.shtml", "gallery_buckhornmt.shtml", "gallery_calanoe.shtml", "gallery_collingtondrive.shtml", "gallery_prestonspring.shtml");
  gm_widths  = new Array("480",                      "480",                     "480",                           "480",                       "480",                     "480",                     "480",                            "480",                        "480",                      "480",                   "480",                           "480");
  gm_heights = new Array("380",                      "380",                     "380",                           "380",                       "380",                     "380",                     "380",                            "380",                        "380",                      "380",                   "380",                           "380");
  if (is_main_gallery_page)
  {
    g_images  = gm_images;
    g_labels  = gm_labels;
    g_targets = gm_targets;
    g_widths  = gm_widths;
    g_heights = gm_heights;
  }

  text =
    "<div class='ImageTableStyle'>" +
    "<table cellspacing='0' cellpadding='0' bgcolor='white'>";

  for (ix = 0; ix < g_images.length; ix++)
  {
    if (g_targets[ix].length <= 0)
    {
      target_begin = "";
      target_end = "";
    }
    else 
    {
      if (g_targets[ix].indexOf(".jpg") > 0)
      {
        pref = "/gallery/";
      }
      else
      {
        pref = "/";
      }
      target_begin = "<a href='" + pref + g_targets[ix] + "'>";
      target_end = "</a>";
    }
    text += 
    "    <td><table cellspacing='0' cellpadding='0' class='ImageTableBorderStyle'>" +
    "    <tr><td align='center' valign='bottom' bgcolor='red' " + "' height='380px'>" +
    "      " + target_begin +
    "      <img src='gallery/" + g_images[ix] + "' width='" + g_widths[ix] + "px' height='" + g_heights[ix] + "' border='0' alt='" + g_labels[ix] + "'>" +
    "      " + target_end +
    "    </td></tr>" +
    "    <tr><td align='center' valign='middle' bgcolor='red' " + "' height='20px'>" +
    "      " + target_begin +
    "      <span class='GalleryTextStyle'>&nbsp;" + g_labels[ix] + "&nbsp;</span>" + 
    "      " + target_end +
    "    </td></tr>" +
    "    </table></td>";
  }
  text +=
    "</table>" +
    "</div>";
  document.getElementById("ImageTable").innerHTML = text;

  if (is_gallery_page) // add menu to other galleries
  {
    if (is_main_gallery_page)
    {
      g_desc = "";
    }  
    else
    {
      g_desc += "<br><br>";
    }
    for (var ix = 0; ix < gm_targets.length; ix++)
    {
      if (lcpage.indexOf(gm_targets[ix]) == -1) // not same as this gallery
      {
        g_desc += 
        " <a href='" + gm_targets[ix] + "'>" + gm_labels[ix] + "</a><br><br>";
      }
    }
  }

  text = g_desc;
  document.getElementById("LeftMenu").innerHTML = text;
}

function LeftMenuAddress()
{
  document.getElementById("LeftMenu").innerHTML = 
                  "<a href='/gallery_map.shtml'>" +
                  "116 meadow brook dr<br>" +
                  "chapel hill, nc 27514<br><br>" +
                  "</a>" +
                  "office:<br>" +
                  "919.967.9678<br><br>" +
                  "fax:<br>" +
                  "919.967.9678<br><br>" +
                  "email:<br>" +
                  "<a href='mailto:knox@knoxtate.com'>knox tate at knoxtate.com</a>";
}

function Startup()
{
  var obj = document.getElementById("InfoObject1");
  if (obj)
  {
    obj.style.display="none";
  }
  obj = document.getElementById("InfoObject2");
  if (obj)
  {
    obj.style.display="none";
  }
}

