<!--
if (document.images) {// Active Images
img1on = new Image();
img1on.src = "images/topnav-on-rate.gif";
img2on = new Image();
img2on.src = "images/topnav-on-calendar.gif";
img3on = new Image();
img3on.src = "images/topnav-on-map.gif";
img6on = new Image();
img6on.src = "images/topnav-on-home.gif";

img1off = new Image();
img1off.src = "images/topnav-off-rate.gif";
img2off = new Image();
img2off.src = "images/topnav-off-calendar.gif";
img3off = new Image();
img3off.src = "images/topnav-off-map.gif";
img6off = new Image();
img6off.src = "images/topnav-off-home.gif";
}

// Function to 'activate' images.
function imgOn(imgName) {
if (document.images) {
document[imgName].src = eval(imgName + "on.src");
}
}

// Function to 'deactivate' images.
function imgOff(imgName) {
if (document.images) {
document[imgName].src = eval(imgName + "off.src");
}
}


which_image_loaded = 0;
NUMBER_OF_IMAGES = 5;

ImageNames = new Object();
ImageNames.length = NUMBER_OF_IMAGES - 1;

for (counter = 0; counter < NUMBER_OF_IMAGES; counter++){
    file_number = counter + 1;
    filename = ("image" + file_number + ".jpg");
    ImageNames[counter] = filename;
}

function changeImage(direction) {
    which_image_loaded += direction;
    if (which_image_loaded < 0)
        which_image_loaded = NUMBER_OF_IMAGES - 1;
    if (which_image_loaded == NUMBER_OF_IMAGES)
        which_image_loaded = 0;
    if (document.images)
        document.myimage.src = ImageNames[which_image_loaded];
}
// -->