/* lakeshore javascript file for misc. functions
 *
 * Chris H. (chris.hammer@gmail.com)
 */

function hide_nav (theNavDiv, theContentDiv)
{
  var navdiv = document.getElementById (theNavDiv);
  var condiv = document.getElementById (theContentDiv);

  navdiv.style.display = 'none';
  condiv.style.marginLeft = '0';
}

function hide_show (theNavDiv)
{
  var navdiv = document.getElementById (theNavDiv);

  navdiv.style.display = 'block';
}

function tooltipShow (tipObj) { document.getElementById(tipObj).style.display = ''; }
function tooltipHide (tipObj) { document.getElementById(tipObj).style.display = 'none'; }

function showSkipperMontage ()
{
  window.open("/theguys/skipper/montage.html","montage","menubar=0,resizable=0,scrollbar=0,width=480,height=385");
}

function showPebblesMontage ()
{
  window.open("/thegirls/pebbles/montage.html","montage","menubar=0,resizable=0,scrollbar=0,width=480,height=385");
}

function externalLinks()
{
  if (!document.getElementsByTagName)
    return;

  var anchors = document.getElementsByTagName ("a");

  for (var i = 0; i < anchors.length; i++)
  {
    var anchor = anchors[i];

    if (anchor.getAttribute ("href") && anchor.getAttribute ("rel") == "external")
      anchor.target = "_blank";
  }
}

window.onload = externalLinks;
