<!--
/* Here you make an array with all the URL's of the images you would like to have in your slideshow.*/

var image = new Array("assets/images/testimonials/testimonial1.gif", "assets/images/testimonials/testimonial2.gif", 
"assets/images/testimonials/testimonial3.gif", "assets/images/testimonials/testimonial4.gif", "assets/images/testimonials/testimonial5.gif", "assets/images/testimonials/testimonial6.gif", "assets/images/testimonials/testimonial7.gif", "assets/images/testimonials/testimonial8.gif", "assets/images/testimonials/testimonial9.gif", "assets/images/testimonials/testimonial10.gif", "assets/images/testimonials/testimonial11.gif", "assets/images/testimonials/testimonial12.gif",  "assets/images/testimonials/testimonial15.gif" )
var imgNumber=1

/* This number is used to refer to a value of the Array and to know what image should be shown next. */

var numberOfImg = image.length

/* This is the total amount of images you use, it is used to determine if the imgNumber can still grow. */


/* Now it's time to make the functions for the next and previous buttons */

function previousImage(){
  if(imgNumber > 1){
    imgNumber--
    }
	/* The if statement is used to know if you aren't already at the first image, because if you are, imgNumber may not decrease. */
   else{
  	imgNumber = numberOfImg
	}
	/* If you already are at the first image, and you click the previous button, the slideshow must show the last image. */
  document.slideImage.src = image[imgNumber-1]
  /* Load the image into the document. Don't forget to write imgNumber-1, an array always starts from 0! */
  }
function nextImage(){
  if(imgNumber < numberOfImg){
    imgNumber++
    }
	/* The if statement is used to know if you aren't already at the last image, because if you are, imgNumber may not increase. */
  else{
  	imgNumber = 1
	}
	/* If you already are at the last image, and you click the next button, the slideshow must show the first image. */
  document.slideImage.src = image[imgNumber-1]
  /* Load the image into the document. Don't forget to write imgNumber-1, an array always starts from 0! */
  }
  /* Now it is time for the code that preloads the images. */
/* Check if your browser supports the Image Object. */
if(document.images){
   /* Create a new Image Object. */
      var image1 = new Image()
      /* Give the source of the image to the Image Object. */
      image1.src = "assets/images/testimonials/testimonial1.gif"
      /* Repeat this for all the images you would like to preload.
      Make sure that you do not preload too many images, this will make your document load slow. */
   var image2 = new Image()
   image2.src = "assets/images/testimonials/testimonial2.gif"
   var image3 = new Image()
   image3.src = "assets/images/testimonials/testimonial3.gif"
   var image4 = new Image()
   image4.src = "assets/images/testimonials/testimonial4.gif"
   }
   
//-->