/***********************************************************************
 * Create an image slideshow, that updates an image and chnages it 
 * in desired interval. Configurable with the variable slideShowSpeed.
 * 
 * - INSTRUCTIONS --------------
 * 1)Just include a call to the function runSlideShow in the body-tag 
 * like this: <BODY onLoad="runSlideShow()">
 * 
 * 2)In the IMG-tag of the image you want as a slideshow just add a 
 *   NAME attribute like this: <IMG SRC="images/1.jpg" NAME="SlideShow">
 * 
 * 3)Add the names and paths of the images you want included in your 
 *   slideshow to the 'fadeimgarray' as in the example below.
 *   fadeimgarray[0] = 'images/1.jpg';
 *   fadeimgarray[1] = 'images/2.jpg';
 *   fadeimgarray[2] = 'images/3.jpg';
 *         ...              ...
 *   fadeimgarray[x] = 'images/y.jpg';
 *
 * 4)Finally you have to include the script in the html file like this:
 *   <script type='text/javascript' src='scripts/slideshow.js'></script>
 *   preferably immediately BEFORE the </body> tag or whereever you
 *   consider it better.
 ***********************************************************************/

var slideShowSpeed = 6000;
var fadeDuration = 10;

fadeimgarray = new Array(); 
fadeimgarray[0]  = 'images/covers/downnout.jpg';
fadeimgarray[1]  = 'images/covers/darlingkennedy2.jpg';
fadeimgarray[2]  = 'images/covers/somekindofhate.jpg';
fadeimgarray[3]  = 'images/covers/emmy.jpg';
fadeimgarray[4]  = 'images/covers/arise.jpg';
fadeimgarray[5]  = 'images/covers/exitno7.jpg';
fadeimgarray[6]  = 'images/covers/brutnaVingar.jpg';
fadeimgarray[7]  = 'images/covers/mental-ed.jpg';
fadeimgarray[8]  = 'images/covers/transcelebration.jpg';
fadeimgarray[9]  = 'images/covers/quarterpipe.gif';
fadeimgarray[10]  = 'images/covers/dead-hot-and-ready.jpg';
fadeimgarray[11] = 'images/covers/bird-in-captivity.jpg';
fadeimgarray[12] = 'images/covers/movements.jpg';
fadeimgarray[13] = 'images/covers/pleasant-tone.jpg';
fadeimgarray[14] = 'images/covers/prejudiced-beliefs.jpg';
fadeimgarray[15] = 'images/covers/restless-and-dead.jpg';
fadeimgarray[16] = 'images/covers/humanneeds.gif';
fadeimgarray[17] = 'images/covers/starlitsky.gif';
fadeimgarray[18] = 'images/covers/fearlessdivision.jpg';
fadeimgarray[19] = 'images/covers/redq.jpg';
fadeimgarray[20] = 'images/covers/deathtrain.jpg';

titlearray = new Array(); 
titlearray[0]  = 'Down \'n Out - Lost Can Be Found';
titlearray[1]  = 'Darling Kennedy - The Story of Miss K';
titlearray[2]  = 'Marys Creek - Some Kind of Hate';
titlearray[3]  = 'Emmy E:sson';
titlearray[4]  = 'Everybody Used to Call Me Joe - Arise';
titlearray[5]  = 'Breakpoint Down - Exit No.7';
titlearray[6]  = 'LEO - Brutna Vingar';
titlearray[7]  = 'Demental - Mental Ed';
titlearray[8]  = 'Mary Celeste - Transcelebration';
titlearray[9]  = 'Quarterpipe - Newmarket';
titlearray[10]  = 'Wichery - Dead, Hot & Ready';
titlearray[11] = 'Mary Celeste - Bird in Captivity';
titlearray[12] = 'U.N.I.T - Movement';
titlearray[13] = 'Richard M?rlin - In a Pleasent Tone';
titlearray[14] = 'Mary Celeste - Prejudiced Beliefs';
titlearray[15] = 'Wichery - Restless And Dead';
titlearray[16] = 'Quarterpipe - Every Kind of Human Needs';
titlearray[17] = 'Morifade - Across a Starlit Sky';
titlearray[18] = 'Fearless Division - Now and Forever';
titlearray[19] = 'Red Q - Red Q';
titlearray[20] = 'Denata - Death Train';

var t
var j = 0

var preLoad = new Array()
for (i = 0; i < fadeimgarray.length; i++){
   preLoad[i] = new Image()
   preLoad[i].src = fadeimgarray[i]
   preLoad[i].title = titlearray[i]
}

function runSlideShow(){
   if (document.all){
      document.images.SlideShow.style.filter="blendTrans(duration=2)"
      document.images.SlideShow.style.filter="blendTrans(duration=fadeDuration)"
      document.images.SlideShow.filters.blendTrans.Apply()      
   }
   document.images.SlideShow.src = preLoad[j].src
   document.images.SlideShow.title = preLoad[j].title
   if (document.all){
      document.images.SlideShow.filters.blendTrans.Play()
   }
   j = j + 1
   if (j > (fadeimgarray.length-1)) j=0
   t = setTimeout('runSlideShow()', slideShowSpeed)
}
