
var Pic = new Array()
Pic[0]  = '/images/photo-headers/FMBCChampionship2011(CompanyFront).jpg'
Pic[1]  = '/images/photo-headers/Parade2011.jpg'
Pic[2]  = '/images/photo-headers/Game2Clarinets2010.jpg'
Pic[3]  = '/images/photo-headers/EndingSet2010.jpg'
Pic[4]  = '/images/photo-headers/MrKBandHuddle.jpg'
Pic[5]  = '/images/photo-headers/TubasAlmaMater2010.jpg'
Pic[6]  = '/images/photo-headers/Stands2010-1.jpg'
Pic[7]  = '/images/photo-headers/Game2Flutes2010.jpg'
Pic[8]  = '/images/photo-headers/Stands2010-2.jpg'
Pic[9]  = '/images/photo-headers/StandsTop2010.jpg'
Pic[10]  = '/images/photo-headers/PreviewShowArc2008.jpg'
Pic[11] = '/images/photo-headers/middleburgGroupHuddle.jpg'

var ndx     = 0
var htmlStr = ""
var preLoad = new Image()
preLoad.src = Pic[ndx]

function runSlideShow() {
    var slideShowSpeed    = 8000
    var crossFadeDuration = 2
    var maxIndex          = Pic.length - 1

    document.images.SlideShow.src = preLoad.src

    if (document.all) {
   /*
    * I think these filter effects only work with Internet Explorer (Sigh). 
    * We should not use proprietary browser features on our site.
    */
        document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
        document.images.SlideShow.style.visibility="visible|hidden"
        document.images.SlideShow.filters.blendTrans.Apply()
        document.images.SlideShow.filters.blendTrans.Play()
    }

    t = setTimeout('runSlideShow()', slideShowSpeed)

    ndx = ndx + 1
    if ( ndx > maxIndex ) {
        ndx = 0
    }
    preLoad.src = Pic[ndx]
}

/*
 * This is an html + javascript oddity.  By writing Pic[0] initially, we load
 * the first image in the slide show and avoid a visible hiccup in the start
 * of the slide show.   After the initial load, the document's "SlideShow" image
 * object is overwritten by the recursive runSlideShow() function so that we cycle
 * through all the images in the Pic Array.
 */

htmlStr = '<img src="' + Pic[0] + '" name="SlideShow" >';
document.write(htmlStr);

