A better idea might be to read in all of the files in the directory that are images, and build an array of file names. Then, figure out the last image displayed (from the session variable), find that image in the array, and display the next image.
It is a little more complicated than what you are doing, but it has a couple of advantages:
It will work with any number of images
You never have to modify the code to make it work with new images
You don't have to rename your image files
I have written a page that demonstrates this in action
BuzzLY's Image Rotator
To view the source, click here.