//Javascript file var currentImageIndex = 0; var imageArray = new Array(); var additionalIndex = 0; var additionalImageArray = new Array(); imageArray.push("a-andrew_weibrect.jpg"); imageArray.push("z-andrew_weibrecht.jpg"); additionalImageArray.push("abook.jpg"); additionalImageArray.push("adkChairs.jpg"); additionalImageArray.push("diningtable-wineglasses.jpg"); additionalImageArray.push("lambchops-closeup.jpg"); additionalImageArray.push("sittingarea-fireplace.jpg"); additionalImageArray.push("theCottageDeck.jpg"); additionalImageArray.push("wheredoyoumeet.jpg"); additionalImageArray.push("winter-facade.jpg"); additionalImageArray.push("winter-horse.jpg"); var ImageHomeBGTemp = new Image(933,264); ImageHomeBGTemp.src = "i/mirror-lake-inn-dock-sunset-image.jpg"; //call this function as the flash movie unloads, so the images are available function preloadSlideshowImages() { var Image1 = new Image(547,264); Image1.src = "/homeMovieImages/a-andrew_weibrect.jpg"; var Image2 = new Image(547,264); Image2.src = "/homeMovieImages/z-andrew_weibrecht.jpg"; } var totalImages = 2; var fadeInterval = 0; function startImageFade() { //swap the images every 6 seconds fadeInterval = setInterval("imageFade()",9000); } function imageFade() { currentImageIndex++; //have we cycled through all the available photos? if(currentImageIndex == imageArray.length) { clearInterval(fadeInterval); } else { fadeSwapFadeImage('homePhoto','/homeMovieImages/'+imageArray[currentImageIndex]); } } function updateHomePhoto() { document.getElementById("homePhoto").src = "/homePhotosAdditional/"+additionalImageArray[additionalIndex]; } function nextPhoto() { clearInterval(fadeInterval); additionalIndex++; if(additionalIndex == additionalImageArray.length) additionalIndex = 0; updateHomePhoto(); } function prevPhoto() { clearInterval(fadeInterval); additionalIndex--; if(additionalIndex < 0) additionalIndex = additionalImageArray.length - 1; updateHomePhoto(); } //called after initial load of flash movie, to remvoe the temporary background image function updateFlashDiv() { document.getElementById("homePageMovie").style.backgroundImage = "none"; } //called at the end of the intro flash movie function hideFlashDiv() { document.getElementById("flashIntro").style.display = "none"; document.getElementById("flashIntro").style.height = "0px"; //we want to begin the image fade out script startImageFade(); }