function swap(targetId){
  if (document.getElementById)
        {
        target = document.getElementById(targetId);
        
            if (target.style.display == "none")
                {
                target.style.display = "";
                } 
            else 
                {
                target.style.display = "none";
                }
        }
}

function swapSketch(sketchSRC,theCaption,theCredit) {
if (document.getElementById("caption")) {
	var theImage = document.getElementById("mainSketch");
	var displayedCaption = document.getElementById("caption");
	var displayedCredit  = document.getElementById("credit");
	var imgFolder        = "image/";
	displayedCaption.firstChild.nodeValue = theCaption;
	displayedCredit.firstChild.nodeValue  = theCredit;
	theImage.setAttribute("src", imgFolder+sketchSRC);
	theImage.setAttribute("visibility", "hidden");
	}
}

