// JScript source code for any image transitions on web site

// javascript by Ken Richardson
// for Emerald Isle Surf Shop, Emerald Isle, North Carolina
// questions/comments kenneth.r.richardson@gmail.com

/*-----------------------------------------------------------------------
changes starburst bullet images beside links in shop news (blue to green)
-------------------------------------------------------------------------*/
if (document.images) {
    image_off = new Image(16, 16);
    image_off.src = "style/news_star_blue.png";

    image2 = new Image(16, 16);
    image2.src = "style/news_star_green.png";

}

function change1(picName, imgName) {
    if (document.images) {
        imgOn = eval(imgName + ".src");
        document[picName].src = imgOn;
    }
}


/*-----------------------------------------------------------------------------
SLIDESHOW  START
-------------------------------------------------------------------------------*/
// Set slideShowSpeed (milliseconds)

var slideShowSpeed = 5000



// Duration of crossfade (seconds)

var crossFadeDuration = 3



// Specify the image files

var Pic = new Array() // don't touch this

// to add more images, just continue

// the pattern, adding to the array below



Pic[0] = 'images/slideshow/content_top_right_fpc.png'
Pic[1] = 'images/slideshow/content_top_right_fellowship.png'
Pic[2] = 'images/slideshow/content_top_right_mission.png'
Pic[3] = 'images/slideshow/content_top_right_learning.png'
Pic[4] = 'images/slideshow/content_top_right_prayer.png'
Pic[5] = 'images/slideshow/content_top_right_worship.png'
Pic[6] = 'images/slideshow/content_top_right_fpc.png'





// =======================================

// do not edit anything below this line

// =======================================



var t

var j = 0

var p = Pic.length



var preLoad = new Array()

for (i = 0; i < p; i++) {

    preLoad[i] = new Image()

    preLoad[i].src = Pic[i]

}



function runSlideShow() {

    if (document.all) {

        document.images.SlideShow.style.filter = "blendTrans(duration=2)"

        document.images.SlideShow.style.filter = "blendTrans(duration=crossFadeDuration)"

        document.images.SlideShow.filters.blendTrans.Apply()

    }

    document.images.SlideShow.src = preLoad[j].src

    if (document.all) {

        document.images.SlideShow.filters.blendTrans.Play()

    }

    j = j + 1

    if (j > (p - 1)) j = 0

    t = setTimeout('runSlideShow()', slideShowSpeed)

}
