var originalImage; var originalContent; function setOriginal(){ originalImage = document.mainImage.src; originalContent = document.getElementById("general-tekst").innerHTML; } function restoreContent(){ document.mainImage.src = originalImage; //document.getElementById("general-tekst").innerHTML = originalContent; } function updateContent(id){ switch(id){ case 0: break; case 1: document.mainImage.src = "../images/IMG_7623.JPG"; break; case 2: document.mainImage.src = "../images/IMG_7617.JPG"; break; case 3: document.mainImage.src = "../images/IMG_7603.JPG"; break; case 4: document.mainImage.src = "../images/IMG_7607.JPG"; break; case 5: document.mainImage.src = "../images/IMG_7611.JPG"; break; case 6: document.mainImage.src = "../images/IMG_7605.JPG"; break; case 7: document.mainImage.src = "../images/IMG_7613.JPG"; break; case 8: document.mainImage.src = "../images/IMG_7614.JPG"; break; } }