var WidthAdjust  = 25;
var HeightAdjust = 20;
//----------------------------------------------------------------------
// function init
//          If the browser is Internet Explorer, loads the MSIE 
//          stylesheet.
//----------------------------------------------------------------------
function init(myID)
{
  if (navigator.userAgent.match("MSIE"))
  {
    document.getElementById(myID).href='MSIE.css';
  }
  return;
}

//----------------------------------------------------------------------
// function showAll
//          Sets the display property of each element of the specified
//          tag type to 'block', thus making it visible.
//======================================================================
function showAll(myTag)
{
  var allTags = document.getElementsByTagName(myTag);
  for (var int=0; int<allTags.length; int++)
  {
    var myElem = allTags[int];
    if (myElem.className == 'shelter')
    {
      allTags[int].style.display='block';
    }
  }
  return;
}

//----------------------------------------------------------------------
// function hideAll
//          Sets the display property of each element of the specified
//          tag type to 'none', thus making it invisible.
//======================================================================
function hideAll(myTag)
{
  var allTags = document.getElementsByTagName(myTag);
  for (var int=0; int<allTags.length; int++)
  {
    var myElem = allTags[int];
    if (myElem.className == 'shelter')
    {
      allTags[int].style.display='none';
    }
  }
  return;
}

//----------------------------------------------------------------------
// function toggle(id)
//          If the named element's display property is 'block',
//          sets it to 'none'.
//          If the named element's dislay property is 'none',
//          sets it to 'block'.
//          Essentially, reverses the visibility of the element.
//----------------------------------------------------------------------
function toggle(myID)
{
  myElem=document.getElementById(myID);
  if (myElem.style.display == 'block') { myElem.style.display = 'none'; }
                                  else { myElem.style.display = 'block'; }
  return;
}

//----------------------------------------------------------------------
// Function: showPhoto
//           This is experimental
//----------------------------------------------------------------------
function showPhoto(Photo,Width,Height,Photog)
{
  if (Photog)
  {
    var pageHeight = parseInt(Height) + HeightAdjust;
    var caption = "<p style='font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11pt;text-align:center;margin-top:0px;margin-bottom:0px'>Photo by " + Photog + "</p>";
  }
  else
  {
    var pageHeight = Height;
    var caption = '';
  }
  var pageWidth = parseInt(Width) + WidthAdjust;
  var properties = "height=" + pageHeight + ",width=" + pageWidth +",toolbar=no,resizable=yes,scrollbars=yes,menubar=no";
  var img="<img src='" + Photo + "'>";
  var title="<title>" + Photo + "</title>";
  OpenWindow=window.open("", "Photo", properties);
  OpenWindow.document.write("<html>");
  OpenWindow.document.write("<head>");
  OpenWindow.document.write(title)
  OpenWindow.document.write("</head>");
  OpenWindow.document.write("<body style='background-color: gainsboro;margin:0px 0px 0px 0px'>");
  OpenWindow.document.write(img);
  OpenWindow.document.write(caption);
  OpenWindow.document.write("</body>");
  OpenWindow.document.write("</html>");

  OpenWindow.document.close()
  self.name="main"
}

function newWindow(url, width, height)
{
  popupWin = window.open(url, "blank", "resizable,scrollbars,width=" + width + ",height=" + height);
}


