NewImg = new Array ('http://cdn.listingphotos.sierrastatic.com/pics/v1524175233/3/3_1496741_01.jpg','http://cdn.listingphotos.sierrastatic.com/pics/v1524014947/3/3_1500262_01.jpg','http://cdn.listingphotos.sierrastatic.com/pics/v1523132785/3/3_1496338_01.jpg','http://cdn.listingphotos.sierrastatic.com/pics/v1526408944/3/3_1502244_01.jpg','http://cdn.listingphotos.sierrastatic.com/pics/v1523659707/3/3_1500496_01.jpg','http://cdn.listingphotos.sierrastatic.com/pics/v1526988570/3/3_1503890_01.jpg','http://cdn.listingphotos.sierrastatic.com/pics/v1524970481/3/3_1501850_01.jpg','http://cdn.listingphotos.sierrastatic.com/pics/v1522168831/3/3_1495938_01.jpg'); NewCap = new Array ('$290,000
Bedrooms: 4
Baths: 2 Full / 1 Half
Square Feet: 2788
\"View','$290,000
Bedrooms: 4
Baths: 2 Full / 1 Half
Square Feet: 1979
\"View','$259,000
Bedrooms: 4
Baths: 2 Full / 1 Half
Square Feet: 2152
\"View','$225,000
Bedrooms: 3
Baths: 2
Square Feet: 2411
\"View','$199,000
Bedrooms: 3
Baths: 2 Full / 1 Half
Square Feet: 1644
\"View','$145,000
Bedrooms: 3
Baths: 2
Square Feet: 1592
\"View','$116,000
Bedrooms: 3
Baths: 1
Square Feet: 1309
\"View','$16,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("
$290,000
Bedrooms: 2
Baths: 1
Square Feet: 1134
\"View
\"Prev\"\"Next\"
");