if (document.images)
    {
      preload_image_object = new Image();
      // set image url
      newImg = new Array();
      newImg[0] = "images/Shows/Park-Life-Circus-Show-1.jpg";
      newImg[1] = "images/Shows/Park-Life-Circus-Show-2.jpg";
      newImg[2] = "images/Shows/Park-Life-Circus-Show-3.jpg";
      newImg[3] = "images/Shows/Park-Life-Circus-Show-4.jpg";
      newImg[4] = "images/Shows/Park-Life-Circus-Show-5.jpg";
	newImg[5] = "images/Shows/My-Law-Circus-Show-1.jpg";
	newImg[6] = "images/Shows/My-Law-Circus-Show-2.jpg";
	newImg[7] = "images/Shows/My-Law-Circus-Show-3.jpg";
	newImg[8] = "images/Shows/My-Law-Circus-Show-4.jpg";
	newImg[9] = "images/Shows/My-Law-Circus-Show-5.jpg";
	newImg[10] = "images/Shows/My-Law-Circus-Show-6.jpg";
      newImg[11] = "images/Shows/Return-Journey-Circus-Show-6.jpg";
      newImg[12] = "images/Shows/Return-Journey-Circus-Show-7.jpg";
      newImg[13] = "images/Shows/Return-Journey-Circus-Show-8.jpg";
      newImg[14] = "images/Shows/Return-Journey-Circus-Show-9.jpg";
      newImg[15] = "images/Shows/Looks-Deceiving-Circus-Show-10.jpg";
      newImg[16] = "images/Shows/Looks-Deceiving-Circus-Show-11.jpg";
      newImg[17] = "images/Shows/Does-My-Bum-Look-Big-in-This-Circus-Show-12.jpg";
      newImg[18] = "images/Shows/Does-My-Bum-Look-Big-in-This-Circus-Show-13.jpg";
      newImg[19] = "images/Shows/Does-My-Bum-Look-Big-in-This-Circus-Show-14.jpg";
      newImg[20] = "images/Shows/Does-My-Bum-Look-Big-in-This-Circus-Show-15.jpg";

	
	newCaption = new Array();
	newCaption[0] = 'Expressive Feat performance<br />"Park Life"';
	newCaption[1] = 'Expressive Feat performance<br />"Park Life"';
	newCaption[2] = 'Expressive Feat performance<br />"Park Life"';
	newCaption[3] = 'Expressive Feat performance<br />"Park Life"';
	newCaption[4] = 'Expressive Feat performance<br />"Park Life"';
	newCaption[5] = 'Expressive Feat performance<br />"My Law"';
	newCaption[6] = 'Expressive Feat performance<br />"My Law"';
	newCaption[7] = 'Expressive Feat performance<br />"My Law"';
	newCaption[8] = 'Expressive Feat performance<br />"My Law"';
	newCaption[9] = 'Expressive Feat performance<br />"My Law"';
	newCaption[10] = 'Expressive Feat performance<br />"My Law"';
	newCaption[11] = 'Expressive Feat performance<br />"Return Journey"';
	newCaption[12] = 'Expressive Feat performance<br />"Return Journey"';
	newCaption[13] = 'Expressive Feat performance<br />"Return Journey"';
	newCaption[14] = 'Expressive Feat performance<br />"Return Journey"';
	newCaption[15] = 'Expressive Feat performance<br />"Looks Deceiving"';
	newCaption[16] = 'Expressive Feat performance<br />"Looks Deceiving"';
	newCaption[17] = 'Expressive Feat performance<br />"Does My Bum Look Big In This"';
	newCaption[18] = 'Expressive Feat performance<br />"Does My Bum Look Big In This"';
	newCaption[19] = 'Expressive Feat performance<br />"Does My Bum Look Big In This"';
	newCaption[20] = 'Expressive Feat performance<br />"Does My Bum Look Big In This"';


       var i = 0;
       for(i=0; i<=21; i++) 
         preload_image_object.src = newImg[i];
    }

var ImgNum = 0;
var ImgLength = newImg.length - 1;

//Time delay between Slides in milliseconds
var delay = 3000;

var lock = true;
var run;

function chgImg(direction) {
if (document.images) {
ImgNum = ImgNum + direction;
if (ImgNum > ImgLength) {
ImgNum = 0;
}
if (ImgNum < 0) {
ImgNum = ImgLength;
}
document.getElementById("gallImage").src = newImg[ImgNum];
document.getElementById("gallCaption").innerHTML = newCaption[ImgNum];
   }
}


function auto() {
if (lock == false) {
lock = true;
window.clearInterval(run);
document.getElementById("slidestartstop").innerHTML= "play all";
}
else if (lock == true) {
lock = false;
chgImg(1);
run = setInterval("chgImg(1)", delay);
document.getElementById("slidestartstop").innerHTML= "stop slideshow";
   }
}
