NewImg = new Array ('http://cdn.listingphotos.sierrastatic.com/pics/v1519299033/3/3_1496341_01.jpg','http://cdn.listingphotos.sierrastatic.com/pics/v1519278822/3/3_1496338_01.jpg','http://cdn.listingphotos.sierrastatic.com/pics/v1515260817/3/3_1493311_01.jpg','http://cdn.listingphotos.sierrastatic.com/pics/v1516560487/3/3_1492942_01.jpg','http://cdn.listingphotos.sierrastatic.com/pics/v1509695713/3/3_1488695_01.jpg','http://cdn.listingphotos.sierrastatic.com/pics/v1518779450/3/3_1495938_01.jpg'); NewCap = new Array ('$334,900
Bedrooms: 4
Baths: 3 Full / 1 Half
Square Feet: 3778
\"View','$265,000
Bedrooms: 4
Baths: 2 Full / 1 Half
Square Feet: 2152
\"View','$205,000
Bedrooms: 4
Baths: 1 Full / 1 Half
Square Feet: 1780
\"View','$167,500
Bedrooms: 3
Baths: 1
Square Feet: 2033
\"View','$155,000
Bedrooms: 3
Baths: 2 Full / 1 Half
Square Feet: 1890
\"View','$24,000
Bedrooms: 2
Baths: 1
Square Feet: 1134
\"View'); var preLoad = new Array() for (i = 0; i < NewImg.length; i++) { preLoad[i] = new Image() preLoad[i].src = NewImg[i] } /* Slideshow Functions */ var ImgNum = 0; var ImgLength = preLoad.length - 1; var delay = 5000; //Time delay between Slides in milliseconds var tmpDelay = 10000; // temp delay when user clicks on a photo var lock = false; var run; var autoPlay = true; var iPlayed = 0; function chgImg(direction) { var oSlideshowPic = document.getElementById('slideshowPic') var oSlideshowCap = document.getElementById('slideshowCap') if (iPlayed > 25) { lock = false; autoPlay = false; window.clearInterval(run); } else { if (document.images) { ImgNum = ImgNum + direction; if (ImgNum > ImgLength) { ImgNum = 0; iPlayed = iPlayed + 1 } if (ImgNum < 0) { ImgNum = ImgLength; } oSlideshowPic.src = preLoad[ImgNum].src; oSlideshowCap.innerHTML = NewCap[ImgNum]; } } } function auto() { if (lock == true) { lock = false; autoPlay = false; window.clearInterval(run); run = setInterval("auto()", tmpDelay); } else if (lock == false) { lock = true; autoPlay = true; run = setInterval("chgImg(1)", delay); } } function showPicture(whichDir) { var oSlideshowPic = document.getElementById('slideshowPic') var oSlideshowCap = document.getElementById('slideshowCap') lock = false; autoPlay = false; window.clearInterval(run); if (whichDir == '+') { if (ImgNum == ImgLength) { ImgNum = 0 } else { ImgNum = ImgNum + 1 } } else { if (ImgNum == 0) { ImgNum = ImgLength } else { ImgNum = ImgNum - 1 } } if (autoPlay == true) {auto()} oSlideshowPic.src = preLoad[ImgNum].src; oSlideshowCap.innerHTML = NewCap[ImgNum]; } if (autoPlay == true) { auto() } /*Output HTML - Escape any double quotes used */ document.write("
$334,900
Bedrooms: 2
Baths: 1
Square Feet: 1134
\"View
\"Prev\"\"Next\"
");