// JavaScript Document var arImg = Array( Array( '/images/slideshow/Picture0.jpg', 'All baptized are welcome to take the body and blood of our Lord and Savior Jesus Christ.' ), Array( '/images/slideshow/Picture1.jpg', 'The Cross is center of our lives' ), Array( '/images/slideshow/Picture2.jpg', 'Fun and Fellowship for everyone' ), Array( '/images/slideshow/Picture3.jpg', 'Seeing the Holy Spirit at work at Zion' ), Array( '/images/slideshow/Picture4.jpg', 'The Cross is center, even when we struggle in life.' ), Array( '/images/slideshow/Picture5.jpg', 'Vacation Bible School is always fun, especially walking through the Red Sea!' ), Array( '/images/slideshow/Picture6.jpg', 'Join us for our Rock Service' ), Array() ); var swapCnt = 0; function swap() { // set first one immediately if ( swapCnt == (arImg.length - 1) ) swapCnt = 0; blendimage( 'tdsmallpicture', 'smallpicture', arImg[ swapCnt ][ 0 ], arImg[ swapCnt ][ 1 ], 5000 ); swapCnt++; setTimeout( 'swap()', 10000 ); } function rotate() { // rotate through array continuously setTimeout( 'swap()', 5000 ); } //change the opacity for different browsers function changeOpac(opacity, id) { var object = document.getElementById(id).style; object.opacity = (opacity / 100); object.MozOpacity = (opacity / 100); object.KhtmlOpacity = (opacity / 100); object.filter = "alpha(opacity=" + opacity + ")"; } function blendimage(divid, imageid, imagefile, txt, millisec) { var speed = Math.round(millisec / 100); var timer = 0; document.getElementById( 'tdsmalltext' ).innerHTML = txt; //set the current image as background document.getElementById(divid).style.backgroundImage = "url(" + document.getElementById(imageid).src + ")"; //make image transparent changeOpac(0, imageid); //make new image document.getElementById(imageid).src = imagefile; //fade in image for(i = 0; i <= 100; i++) { setTimeout("changeOpac(" + i + ",'" + imageid + "')",(timer * speed)); timer++; } }