imgs = [

	//'http://www.eastsidechurch.org/RotateFadeImg/Jazz-in-July-2010.jpg',
	'http://www.eastsidechurch.org/RotateFadeImg/Champions.jpg',
	//'http://www.eastsidechurch.org/RotateFadeImg/Summer-Camp.jpg',
	'http://www.eastsidechurch.org/RotateFadeImg/Baptism-Picnic.jpg',
	'http://www.eastsidechurch.org/RotateFadeImg/Fraternity-The-QUEST.jpg',
	'http://www.eastsidechurch.org/RotateFadeImg/ID-Seattle.jpg'

   





];


urls = [
  
    //'http://www.eastsidechurch.org/RotateFadeImg/Jazz_in_July.pdf',
	'http://www.eastsidechurch.org/newevents.htm#champions',
	//'http://www.eastsidechurch.org/newevents.htm#SummerCamp',
    'http://www.eastsidechurch.org/newevents.htm#Baptism',
	'http://www.eastsidechurch.org/newevents.htm#Fraternity',
	'http://www.eastsidechurch.org/newevents.htm#ID'

];
var timeoutID = 0;
var imgIndex = 0;


function rotate() {

    if (document.images) {

        imgIndex++;

        if (imgIndex >= imgs.length) {
            imgIndex = 0;
        }

        crossfade(document.getElementById('rollimg'), imgs[imgIndex], '1');

        timeoutID = setTimeout("rotate();", 4000);

    }

}


function gotoURL() {
    window.location = urls[imgIndex];
}

function prevImg() {
    if (document.images) {
        imgIndex--;
        if (imgIndex < 0) {
            if (imgs.length > 0) {
                imgIndex = imgs.length - 1;
            } else {
                imgIndex = 0;
            }
        }
        crossfade(document.getElementById('rollimg'), imgs[imgIndex], '1');

        clearTimeout(timeoutID);
    }

}

function nextImg() {
    if (document.images) {
        imgIndex++;
        if (imgIndex >= imgs.length) {
            imgIndex = 0;
        }

        crossfade(document.getElementById('rollimg'), imgs[imgIndex], '1');

        clearTimeout(timeoutID);
    }

}

timeoutID = setTimeout("rotate();", 6000);

