/*function swap(targetId){
  
  if (document.getElementById)
        {
        target = document.getElementById(targetId);
        
            if (target.style.display == "none")
                {
                target.style.display = "";
                } 
            else 
                {
                target.style.display = "none";
                }
                
        }
}
*/

function swapPhoto(photoSRC,theCaption,theCredit) {

if (document.getElementById("caption")) {

	var theImage = document.getElementById("mainPhoto");
	var displayedCaption = document.getElementById("caption");
	var displayedCredit = document.getElementById("credit");
	var imgFolder = "assets/";
	displayedCaption.firstChild.nodeValue = theCaption;
	displayedCredit.firstChild.nodeValue = theCredit;
	theImage.setAttribute("src", imgFolder+photoSRC);

    }
  }
  
 <!--  Added by Luis Camberos Sept 17, 2007 - Need to create a new function per  collapsing div -->
  function swapPhoto2(photoSRC2,theCaption,theCredit) {

if (document.getElementById("caption2")) {

	var theImage = document.getElementById("mainPhoto2");
	var displayedCaption = document.getElementById("caption2");
	var displayedCredit = document.getElementById("credit2");
	var imgFolder = "assets/";
	displayedCaption.firstChild.nodeValue = theCaption;
	displayedCredit.firstChild.nodeValue = theCredit;
	theImage.setAttribute("src", imgFolder+photoSRC2);

    }
  }
  
 
 <!--  Added by Luis Camberos Sept 17, 2007 - Need to create a new function per  collapsing div -->
  function swapPhoto3(photoSRC3,theCaption,theCredit) {

if (document.getElementById("caption3")) {

	var theImage = document.getElementById("mainPhoto3");
	var displayedCaption = document.getElementById("caption3");
	var displayedCredit = document.getElementById("credit3");
	var imgFolder = "assets/";
	displayedCaption.firstChild.nodeValue = theCaption;
	displayedCredit.firstChild.nodeValue = theCredit;
	theImage.setAttribute("src", imgFolder+photoSRC3);

    }
  }
  
  
  <!--  Added by Luis Camberos Sept 20, 2007 - Need to create a new function per  collapsing div -->
  function swapPhoto4(photoSRC4,theCaption,theCredit) {

if (document.getElementById("caption4")) {

	var theImage = document.getElementById("mainPhoto4");
	var displayedCaption = document.getElementById("caption4");
	var displayedCredit = document.getElementById("credit4");
	var imgFolder = "assets/";
	displayedCaption.firstChild.nodeValue = theCaption;
	displayedCredit.firstChild.nodeValue = theCredit;
	theImage.setAttribute("src", imgFolder+photoSRC4);

    }
  }
  
  <!--  Added by Luis Camberos Sept 17, 2007 - Need to create a new function per  collapsing div -->
  function swapPhoto5(photoSRC5,theCaption,theCredit) {

if (document.getElementById("caption5")) {

	var theImage = document.getElementById("mainPhoto5");
	var displayedCaption = document.getElementById("caption5");
	var displayedCredit = document.getElementById("credit5");
	var imgFolder = "assets/";
	displayedCaption.firstChild.nodeValue = theCaption;
	displayedCredit.firstChild.nodeValue = theCredit;
	theImage.setAttribute("src", imgFolder+photoSRC5);

    }
  }
  
  
