// JavaScript Document


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

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


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


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


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


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


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


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




//Image next previous function

which_image_loaded = 0;

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


which_image_loaded = 0;

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


which_image_loaded = 0;

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


which_image_loaded = 0;

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


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


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


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


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