// JavaScript Document


ImageNamesOffice = new Object();
ImageNamesOffice.length = 13; //Because arrays start at 0, the length is one  
                        //less than the number of images.
for (counter = 0; counter < 14; counter++) {
    file_number = counter + 1;
    file_name = ("images/photos/vm_office" + file_number + ".jpg");
    ImageNamesOffice[counter] = file_name;
}

ImageNamesPrison = new Object();
ImageNamesPrison.length = 14; //Because arrays start at 0, the length is one  
                        //less than the number of images.
for (counter = 0; counter < 15; counter++) {
    file_number = counter + 1;
    file_name = ("images/photos/prisonmakeover" + file_number + ".jpg");
    ImageNamesPrison[counter] = file_name;
}


ImageNamesEditing = new Object();
ImageNamesEditing.length = 2; //Because arrays start at 0, the length is one  
                        //less than the number of images.
for (counter = 0; counter < 3; counter++) {
    file_number = counter + 1;
    file_name = ("images/photos/vm_editing" + file_number + ".jpg");
    ImageNamesEditing[counter] = file_name;
}


ImageNamesAirsoftTasing = new Object();
ImageNamesAirsoftTasing.length = 13; //Because arrays start at 0, the length is one  
                        //less than the number of images.
for (counter = 0; counter < 14; counter++) {
    file_number = counter + 1;
    file_name = ("images/photos/vm_airsofttasing" + file_number + ".jpg");
    ImageNamesAirsoftTasing[counter] = file_name;
}

ImageNamesIndian = new Object();
ImageNamesIndian.length = 24; //Because arrays start at 0, the length is one  
                        //less than the number of images.
for (counter = 0; counter < 25; counter++) {
    file_number = counter + 1;
    file_name = ("images/photos/vm_indian" + file_number + ".jpg");
    ImageNamesIndian[counter] = file_name;
}

ImageNamesChefs = new Object();
ImageNamesChefs.length = 43; //Because arrays start at 0, the length is one  
                        //less than the number of images.
for (counter = 0; counter < 44; counter++) {
    file_number = counter + 1;
    file_name = ("images/photos/vm_chefs" + file_number + ".jpg");
    ImageNamesChefs[counter] = file_name;
}

ImageNamesAirsoft = new Object();
ImageNamesAirsoft.length = 47; //Because arrays start at 0, the length is one  
                        //less than the number of images.
for (counter = 0; counter < 48; counter++) {
    file_number = counter + 1;
    file_name = ("images/photos/vm_airsoft" + file_number + ".jpg");
    ImageNamesAirsoft[counter] = file_name;
}




//Image next previous function

which_image_loaded = 0;

function changeImageOffice(direction) {
    which_image_loaded += direction;
    if (which_image_loaded < 0)
        which_image_loaded = 13;  //Again, one less than the actual number of images.
    if (which_image_loaded > 13)
    which_image_loaded = 0;
    if (document.images)
        document.myimage.src = ImageNamesOffice[which_image_loaded];
}


which_image_loaded = 0;

function changeImagePrison(direction) {
    which_image_loaded += direction;
    if (which_image_loaded < 0)
        which_image_loaded = 14;  //Again, one less than the actual number of images.
    if (which_image_loaded > 14)
    which_image_loaded = 0;
    if (document.images)
        document.myimage.src = ImageNamesPrison[which_image_loaded];
}

which_image_loaded = 0;

function changeImageEditing(direction) {
    which_image_loaded += direction;
    if (which_image_loaded < 0)
        which_image_loaded = 2;  //Again, one less than the actual number of images.
    if (which_image_loaded > 2)
    which_image_loaded = 0;
    if (document.images)
        document.myimage.src = ImageNamesEditing[which_image_loaded];
}

which_image_loaded = 0;

function changeImageAirsoftTasing(direction) {
    which_image_loaded += direction;
    if (which_image_loaded < 0)
        which_image_loaded = 13;  //Again, one less than the actual number of images.
    if (which_image_loaded > 13)
    which_image_loaded = 0;
    if (document.images)
        document.myimage.src = ImageNamesAirsoftTasing[which_image_loaded];
}

function changeImageIndian(direction) {
    which_image_loaded += direction;
    if (which_image_loaded < 0)
        which_image_loaded = 24;  //Again, one less than the actual number of images.
    if (which_image_loaded > 24)
    which_image_loaded = 0;
    if (document.images)
        document.myimage.src = ImageNamesIndian[which_image_loaded];
}

function changeImageChefs(direction) {
    which_image_loaded += direction;
    if (which_image_loaded < 0)
        which_image_loaded = 43;  //Again, one less than the actual number of images.
    if (which_image_loaded > 43)
    which_image_loaded = 0;
    if (document.images)
        document.myimage.src = ImageNamesChefs[which_image_loaded];
}

function changeImageAirsoft(direction) {
    which_image_loaded += direction;
    if (which_image_loaded < 0)
        which_image_loaded = 47;  //Again, one less than the actual number of images.
    if (which_image_loaded > 47)
    which_image_loaded = 0;
    if (document.images)
        document.myimage.src = ImageNamesAirsoft[which_image_loaded];
}