function $(x) { return document.getElementById(x); } var slideshow1imgarray = Array( Array("images/spacer.jpg", "images/spacer.jpg", "images/spacer.jpg", "images/spacer.jpg", "images/spacer.jpg", "images/spacer.jpg", "images/spacer.jpg"), Array("images/spacer.jpg"), Array("images/spacer.jpg") ); var slideshow2imgarray = Array( Array( "http://www.sunsetchurchofchrist.org/images/family8a.jpg", "http://www.sunsetchurchofchrist.org/images/family9a.jpg", "http://www.sunsetchurchofchrist.org/images/family10a.jpg", "http://www.sunsetchurchofchrist.org/images/family1aa.jpg", "http://www.sunsetchurchofchrist.org/images/family2a.jpg", "http://www.sunsetchurchofchrist.org/images/family6a.jpg", "http://www.sunsetchurchofchrist.org/images/family7aa.jpg"), Array("images/spacer.jpg"), Array("images/spacer.jpg") ); var imgs2 = { urls: Array("http://www.sunsetchurchofchrist.org/images/family8a14.jpg", "http://www.sunsetchurchofchrist.org/images/family8a.jpg", "http://www.sunsetchurchofchrist.org/images/family9a.jpg", "http://www.sunsetchurchofchrist.org/images/family10a.jpg", "http://www.sunsetchurchofchrist.org/images/family1aa.jpg", "http://www.sunsetchurchofchrist.org/images/family2a.jpg", "http://www.sunsetchurchofchrist.org/images/family6a.jpg", "http://www.sunsetchurchofchrist.org/images/family7aa.jpg", "images/spacer.jpg"), objects: Array(), preload: function() { for (i=0; i < imgs2.urls.length; i++) { imgs2.objects[i] = new Image(); imgs2.objects[i].src = imgs2.urls[i]; } } } var slideshow2 = { imgs: slideshow2imgarray, pause: 1.75, delay: 60, step: 0.05, curIndex: 0, curImgSet: 0, curOpc: 1, curDir: 0, tOut: null, start: function() { $('slideIMG2').src = slideshow2.imgs[slideshow2.curImgSet][0]; $('slideIMG2').style.opacity = "1"; slideshow2.curOpc = 1; $('slideDIV2').style.backgroundImage = "url('" + slideshow2.imgs[slideshow2.curImgSet][1] + "')"; slideshow2.curIndex++; slideshow2.tOut = setTimeout(slideshow2.doSlide, slideshow2.pause*750); }, doSlide: function() { if (!slideshow2.curDir) { slideshow2.curOpc-=slideshow2.step; $('slideIMG2').style.opacity = slideshow2.curOpc; if (window.ActiveXObject) $('slideIMG2').style.filter = "alpha (opacity=" + (slideshow2.curOpc*100) + ")"; if (slideshow2.curOpc > 0) slideshow2.tOut = setTimeout(slideshow2.doSlide, slideshow2.delay); else { slideshow2.changeImgs(); slideshow2.curDir = 1; slideshow2.tOut = setTimeout(slideshow2.doSlide, slideshow2.pause*1000); } } else { slideshow2.curOpc+=slideshow2.step; $('slideIMG2').style.opacity = slideshow2.curOpc; if (window.ActiveXObject) $('slideIMG2').style.filter = "alpha (opacity=" + (slideshow2.curOpc*100) + ")"; if (slideshow2.curOpc < 1) slideshow2.tOut = setTimeout(slideshow2.doSlide, slideshow2.delay); else { slideshow2.changeImgs(); slideshow2.curDir = 0; slideshow2.tOut = setTimeout(slideshow2.doSlide, slideshow2.pause*1000); } } }, changeImgs: function() { if (slideshow2.curIndex < slideshow2.imgs[slideshow2.curImgSet].length-1) slideshow2.curIndex++; else slideshow2.curIndex = 0; if (!slideshow2.curDir) { $('slideIMG2').src = slideshow2.imgs[slideshow2.curImgSet][slideshow2.curIndex]; slideshow2.curOpc = 0; $('slideIMG2').style.opacity = 0; } else $('slideDIV2').style.backgroundImage = "url('" + slideshow2.imgs[slideshow2.curImgSet][slideshow2.curIndex] + "')"; }, chgImgSet: function (newImgSet) { if (newImgSet != slideshow2.curImgSet) { clearTimeout(slideshow2.tOut); slideshow2.curImgSet = newImgSet; slideshow2.curIndex = 0; slideshow2.start(); } } } var imgs1 = { urls: Array("images/spacer.jpg", "images/spacer.jpg", "images/spacer.jpg", "images/spacer.jpg", "images/spacer.jpg", "images/spacer.jpg"), objects: Array(), preload: function() { for (i=0; i < imgs1.urls.length; i++) { imgs1.objects[i] = new Image(); imgs1.objects[i].src = imgs1.urls[i]; } } } var slideshow1 = { imgs: slideshow1imgarray, pause: .50, delay: 40, step: 0.05, curIndex: 0, curImgSet: 0, curOpc: 1, curDir: 0, tOut: null, start: function() { $('slideIMG1').src = slideshow1.imgs[slideshow1.curImgSet][0]; $('slideIMG1').style.opacity = "1"; slideshow1.curOpc = 1; $('slideDIV1').style.backgroundImage = "url('" + slideshow1.imgs[slideshow1.curImgSet][1] + "')"; slideshow1.curIndex++; slideshow1.tOut = setTimeout(slideshow1.doSlide, slideshow1.pause*700); }, doSlide: function() { if (!slideshow1.curDir) { slideshow1.curOpc-=slideshow1.step; $('slideIMG1').style.opacity = slideshow1.curOpc; if (window.ActiveXObject) $('slideIMG1').style.filter = "alpha (opacity=" + (slideshow1.curOpc*100) + ")"; if (slideshow1.curOpc > 0) slideshow1.tOut = setTimeout(slideshow1.doSlide, slideshow1.delay); else { slideshow1.changeImgs(); slideshow1.curDir = 1; slideshow1.tOut = setTimeout(slideshow1.doSlide, slideshow1.pause*1000); } } else { slideshow1.curOpc+=slideshow1.step; $('slideIMG1').style.opacity = slideshow1.curOpc; if (window.ActiveXObject) $('slideIMG1').style.filter = "alpha (opacity=" + (slideshow1.curOpc*100) + ")"; if (slideshow1.curOpc < 1) slideshow1.tOut = setTimeout(slideshow1.doSlide, slideshow1.delay); else { slideshow1.changeImgs(); slideshow1.curDir = 0; slideshow1.tOut = setTimeout(slideshow1.doSlide, slideshow1.pause*1000); } } }, changeImgs: function() { if (slideshow1.curIndex < slideshow1.imgs[slideshow1.curImgSet].length-1) slideshow1.curIndex++; else slideshow1.curIndex = 0; if (!slideshow1.curDir) { $('slideIMG1').src = slideshow1.imgs[slideshow1.curImgSet][slideshow1.curIndex]; slideshow1.curOpc = 0; $('slideIMG1').style.opacity = 0; } else $('slideDIV1').style.backgroundImage = "url('" + slideshow1.imgs[slideshow1.curImgSet][slideshow1.curIndex] + "')"; }, chgImgSet: function (newImgSet) { if (newImgSet != slideshow1.curImgSet) { clearTimeout(slideshow1.tOut); slideshow1.curImgSet = newImgSet; slideshow1.curIndex = 0; slideshow1.start(); } } }