which_image_loaded = 1; //this is the number of the file you are starting with (for example, if the file is named "image1.jpg" then this number should be "1")

NUMBER_OF_IMAGES = 14; //this number is one more then the total number of files you have (for example if you have 7 images you need to scroll through, this number would be "8")
  

ImageNames = new Object();
ImageNames.length = NUMBER_OF_IMAGES;


for (counter = 1; counter < NUMBER_OF_IMAGES; counter++){ //the counter should start at the number of what image you are starting at (if the file is named "image1.jpg" then this number should be "1" not "0")
    file_number = counter;
	filename = ("images/" + "carhistory" + file_number + ".png"); // change this to go to the folder where all of the images are; make sure to name your images in order (example for using 7 images: "image1.jpg" - "image7.jpg")
   	  		 
    ImageNames[counter] = filename;
}


function changeImageARROWS(direction) {
    which_image_loaded += direction;

    if (which_image_loaded < 1)
        which_image_loaded = NUMBER_OF_IMAGES - 1;
    if (which_image_loaded == NUMBER_OF_IMAGES)
        which_image_loaded = 1;
    if (document.images)
        document.CARHISTORY.src = ImageNames[which_image_loaded]; // document.IMAGEB7.src - "IMAGEB7" is the name of the image; in the image tag, type " name="IMAGEB7"  " (you can name it whatever you want)
}

function changeImageTHUMBNAILS(number) {
    which_image_loaded = number;

    if (which_image_loaded < 1)
        which_image_loaded = NUMBER_OF_IMAGES - 1;
    if (which_image_loaded == NUMBER_OF_IMAGES)
        which_image_loaded = 1;
    if (document.images)
        document.CARHISTORY.src = ImageNames[which_image_loaded]; // document.IMAGEB7.src - "IMAGEB7" is the name of the image; in the image tag, type " name="IMAGEB7"  " (you can name it whatever you want)
 	
	}
	
	////////////////////////
	
//function beginSlide7() {
//  document.THESHOP.src="images/theshop1.png";
 //	which_image_loaded = 1;
//	}

