// (C) 2000 www.CodeLifter.com -- HEAVILY MODIFIED BY ADAMS // http://www.codelifter.com // Free for all users, but leave in this header // NS4-6,IE4-6 // Fade effect only in IE; degrades gracefully // ======================================= // set the following variables // ======================================= // Set slideShowSpeed (milliseconds) var slideShowSpeed = 5000; //var slideShowSpeed = 1000; // Duration of crossfade (seconds) //var crossFadeDuration = 3; var crossFadeDuration = 1; // 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 // Specify the image files //var Pic = new Array(); // don't touch this //Pic[0] = '/images/header/main_02.jpg'; //Pic[1] = '/images/header-ani/main_02a.jpg'; //Pic[2] = '/images/header-ani/main_02b.jpg'; //Pic[3] = '/images/header-ani/main_02c.jpg'; var Pic = HeaderSlideShowPic; // ======================================= // do not edit anything below this line // ======================================= var t; var j = 1; var p = Pic.length; var d = -1; var preLoad = new Array() for (i = 0; i < p; i++){ preLoad[i] = new Image(); preLoad[i].src = Pic[i]; } function Button( Action ) { if ( Action == 'Play' ) { if ( document.HeaderSlideShowControl.State.value != 'Play' ) { document.HeaderSlideShowControl.State.value='Play'; runSlideShow(Action); } } if ( Action == 'Pause' ) { if ( document.HeaderSlideShowControl.State.value != 'Pause' ) { document.HeaderSlideShowControl.State.value='Pause'; if ( j > 0 ) j = j-1; runSlideShow(Action); } } if ( Action == 'Next' ) { document.HeaderSlideShowControl.State.value='Pause'; if ( d == j ) { j = j + 1; if (j > (p-1)) j=0; } runSlideShow(Action); } if ( Action == 'Prev' ) { document.HeaderSlideShowControl.State.value='Pause'; j = j - 1; if (j < (0)) j=p-1; runSlideShow(Action); } } function runSlideShow(Action) { //document.HeaderSlideShowControl.Status.value = document.HeaderSlideShowControl.State.value + ' ' + (j+1) + ' of ' + 9; if (( Action != 'Pause' ) && ( d != j )) { // Transition to the "next" slide unless we're paused if ((document.all) && ( Action != 'Next' ) && ( Action != 'Prev' )) { 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(); } d=j; } if (( document.HeaderSlideShowControl.State.value == 'Play' ) && ( Action == 'Play' )) { // If we're playing, setup the next slide event j = j + 1; if (j > (p-1)) j=0; if ( t ) clearTimeout(t); t = setTimeout('runSlideShow("Play")', slideShowSpeed); } } Button('Pause'); Button('Play');