//Javascript file var currentImageIndex = 0; var imageArray = new Array(); var additionalIndex = 0; var additionalImageArray = new Array(); imageArray.push("a-snow-days-video-btn.jpg"); imageArray.push("b-ski-magazine-whiteface-mtn.jpg"); imageArray.push("c-winter-suite.jpg"); imageArray.push("d-ski-accolades.jpg"); imageArray.push("e-bistro-bar.jpg"); imageArray.push("f-spa.jpg"); imageArray.push("h-dessert.jpg"); imageArray.push("i-andrew-weibrecht.jpg"); imageArray.push("j-snowman-chair.jpg"); imageArray.push("k-moose-room.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/MLI-Exterior-Inn.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-snow-days-video-btn.jpg"; var Image2 = new Image(547,264); Image2.src = "/homeMovieImages/b-ski-magazine-whiteface-mtn.jpg"; var Image3 = new Image(547,264); Image3.src = "/homeMovieImages/c-winter-suite.jpg"; var Image4 = new Image(547,264); Image4.src = "/homeMovieImages/d-ski-accolades.jpg"; var Image5 = new Image(547,264); Image5.src = "/homeMovieImages/e-bistro-bar.jpg"; var Image6 = new Image(547,264); Image6.src = "/homeMovieImages/f-spa.jpg"; var Image7 = new Image(547,264); Image7.src = "/homeMovieImages/h-dessert.jpg"; var Image8 = new Image(547,264); Image8.src = "/homeMovieImages/i-andrew-weibrecht.jpg"; var Image9 = new Image(547,264); Image9.src = "/homeMovieImages/j-snowman-chair.jpg"; var Image10 = new Image(547,264); Image10.src = "/homeMovieImages/k-moose-room.jpg"; } var totalImages = 10; var fadeInterval = 0; function startImageFade() { //swap the images every 6 seconds fadeInterval = setInterval("imageFade()",5000); } function imageFade() { currentImageIndex++; //have we cycled through all the available photos? if(currentImageIndex == imageArray.length) { clearInterval(fadeInterval); } else { fadeSwapFadeImage('homePhoto','/homeMovieImages/'+imageArray[currentImageIndex]); document.getElementById("homePhoto").style.cursor = 'default'; document.getElementById("homePhoto").onclick = null; } } 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(); document.getElementById("homePhoto").style.cursor = 'pointer'; document.getElementById("homePhoto").onclick = function() { Shadowbox.open({ content: 'http://www.youtube.com/v/D7eTf-NQXes&hl=en&fs=1&rel=0&autoplay=1', player: "swf", title: "Lake Placid, NY - We Have Snow at the Mirror Lake Inn!", height: 380, width: 473 }); } } function openSnowyDaysVideo() { Shadowbox.open({ content: 'http://www.youtube.com/v/D7eTf-NQXes&hl=en&fs=1&rel=0&autoplay=1', player: "swf", title: "Lake Placid, NY - We Have Snow at the Mirror Lake Inn!", height: 380, width: 473 }); }