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) {

if (document.getElementById("caption")) {

	var theImage = document.getElementById("mainPhoto");
	var displayedCaption = document.getElementById("caption");
	
	var imgFolder = "images/photos/";
	displayedCaption.firstChild.nodeValue = theCaption;
	
	theImage.setAttribute("src", imgFolder+photoSRC);

    }
  }
