﻿/* Image Gallery*/
//Function imgGallery swaps the pictures with the placeholder (or  current
//image showing)

function imgGallery(pic) {
    //get the image url
    var source = pic.getAttribute("id");
    var theDiv = document.getElementById("blank");
    var display = "block";
    theDiv.style.display = display;
    var newNode = document.createElement("img");
    newNode.setAttribute("src", source);

    theDiv.appendChild(newNode);
}

function imgSwitch(pic) {
    var theDiv = document.getElementById("blank");
    var noDisplay = "none";

    var oldNode = theDiv.childNodes[0];
    //theDiv.removeChild(childNodes[0]);
    theDiv.style.display = noDisplay;
    theDiv.removeChild(oldNode);
}
