if (document.images)
    {
      preload_image_object = new Image();
      // set image url
      newImg = new Array();
      newImg[0] = "images/Films/Everyday-Language.jpg";
      newImg[1] = "images/Films/Crow-dancefilm-1.jpg";
      newImg[2] = "images/Films/Crow-dancefilm-2.jpg";
      newImg[3] = "images/Films/Crow-dancefilm-3.jpg";
      newImg[4] = "images/Films/Crow-dancefilm-4.jpg";
      newImg[5] = "images/Films/Crow-dancefilm-5.jpg";
      newImg[6] = "images/Films/Crow-dancefilm-6.jpg";
      newImg[7] = "images/Films/Common-Ground-community-film-project-1.jpg";
      newImg[8] = "images/Films/Common-Ground-community-film-project-2.jpg";
      newImg[9] = "images/Films/Common-Ground-community-film-project-3.jpg";
      newImg[10] = "images/Films/Common-Ground-community-film-project-4.jpg";
      newImg[11] = "images/Films/Common-Ground-community-film-project-5.jpg"; 
      
    	newCaption = new Array();
		newCaption[0] = 'experimental aerial&#45;dance film<br />"Everyday Language"';
		newCaption[1] = 'site&#45;specific dance for camera<br />"Where The Crow Flies"';
		newCaption[2] = 'site&#45;specific dance for camera<br />"Where The Crow Flies"';
		newCaption[3] = 'site&#45;specific dance for camera<br />"Where The Crow Flies"';
		newCaption[4] = 'site&#45;specific dance for camera<br />"Where The Crow Flies"';
		newCaption[5] = 'site&#45;specific dance for camera<br />"Where The Crow Flies"';
		newCaption[6] = 'site&#45;specific dance for camera<br />"Where The Crow Flies"';
		newCaption[7] = 'Community Film Project<br />"Common Ground"';
		newCaption[8] = 'Community Film Project<br />"Common Ground"';
		newCaption[9] = 'Community Film Project<br />"Common Ground"';
		newCaption[10] = 'Community Film Project<br />"Common Ground"';
		newCaption[11] = 'Community Film Project<br />"Common Ground"';


       var i = 0;
       for(i=0; i<=12; 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";   }}
