var show;function toggleDisplay(layer) {		e = document.getElementById(layer + "_text");		f = document.getElementById(layer + "_head");				if (show == "yes") {			e.style.display = "none";			f.className = "closed";						show = "no";		} else {			e.style.display = "block";			f.className = "open";						show = "yes";		}		}window.onload = initPage;  // Make sure that no other javscripts assign a fuction to window.onload// There can be only one window.onload at a timefunction initPage() {  initPopupLinks();  // place here any other code you wish to run when the page loads.}function initPopupLinks(){  if (!document.getElementsByTagName) return true;  var pageLinks = document.getElementsByTagName("a");  for (var i = 0; i < pageLinks.length; i++)   {    if (((pageLinks[i].className != null) &&          (pageLinks[i].className != "")) ||        ((pageLinks[i].parentNode.className != null) &&          (pageLinks[i].parentNode.className != "")))    {      var linkClass = " " + pageLinks[i].className + " ";      if ((linkClass == "  ") && (pageLinks[i].parentNode.className != ""))      {        linkClass = " " + pageLinks[i].parentNode.className + " ";      }      for (var theKey in popupLinkConfig)       {        if (linkClass.indexOf(" " + theKey + " ") > -1)        {          if ((pageLinks[i].target == "") || (pageLinks[i].target == null))          {            pageLinks[i].target = (popupLinkConfig[theKey][0] != "") ? popupLinkConfig[theKey][0] : theKey;          }          pageLinks[i].settings = popupLinkConfig[theKey][1];          pageLinks[i].onclick = popUp;        }      }    }  }  return true;}function popUp(){  newWin = window.open(this.href, this.target, this.settings);  newWin.focus();  return false;} var popupLinkConfig = new Array;popupLinkConfig["landscape"] = new Array ( "","width=800,height=600,scrollbars=yes,menubar=yes,resizable=yes");popupLinkConfig["portrait"] = new Array ( "","width=600,height=700,scrollbars=yes,menubar=yes,resizable=yes");


//PHOTOPOP!
var UniqueID = 314 // Make each link open in a new window 
var newWinOffset = 0 // Position of first pop-up

function PhotoOpen(imagetitle,imagepath,imagecaption) { 
PlayWin = window.open('','imagewindow','width=650,height=650,top=' + newWinOffset +',left=0,resizable=0,scrollbars=0,titlebar=0,toolbar=0,menubar=0,status=0,directories=0,personalbar=0');//replace 'imagewindow' with UniqueID
PlayWin.focus(); 

var winContent = "<html><head><title>" + imagetitle + "</title><link rel='stylesheet' href='styles/popups.css' type='text/css' /></head><body>"; 
winContent += "<h1>" + imagetitle + "</h1>";
winContent += "<img width='600'  src='" + imagepath + "'/>";
winContent += "<p>" + imagecaption + "</p>";
winContent += "</body></html>"; 

PlayWin.document.write(winContent); 
PlayWin.document.close(); // "Finalizes" new window 
UniqueID = UniqueID + 1; //this is not being used because all the images are currently going into the same window
newWinOffset = newWinOffset + 20 // subsequent pop-ups will be this many pixels lower 
} 

function PhotoOpenPortrait(imagetitle,imagepath,imagecaption) { 
PlayWin = window.open('','imagewindow','width=650,height=650,top=' + newWinOffset +',left=0,resizable=0,scrollbars=0,titlebar=0,toolbar=0,menubar=0,status=0,directories=0,personalbar=0');//replace 'imagewindow' with UniqueID
PlayWin.focus(); 

var winContent = "<html><head><title>" + imagetitle + "</title><link rel='stylesheet' href='styles/popups.css' type='text/css' /></head><body>"; 
winContent += "<h1>" + imagetitle + "</h1>";
winContent += "<img width='358'  src='" + imagepath + "'/>";
winContent += "<p>" + imagecaption + "</p>";
winContent += "</body></html>"; 

PlayWin.document.write(winContent); 
PlayWin.document.close(); // "Finalizes" new window 
UniqueID = UniqueID + 1; //this is not being used because all the images are currently going into the same window
newWinOffset = newWinOffset + 20 // subsequent pop-ups will be this many pixels lower 
} 