Hmmm, well... the way you've done it... certainly may seem simple, but I personally prefer to be able to keep track of images, rather than just assigning. Now, the following will work with any amount of images (not just 3), and should pretty much achieve the carousel effect(only in one direction, considering there's only one function at the moment, but it shouldn't take too long to add a secondary for moving in the other direction):
Code:
<script type="text/javascript">
minimg = 1;
currimg = 2;
maximg = 3;
extension = ".jpeg"
function movefwd(){
if (currimg == minimg)
currimg = maximg;
else
currimg--;
if (currimg == minimg)
var fstpic = maximg + extension;
else
var fstpic = (currimg - 1) + extension;
A.src = fstpic;
B.src = currimg + extension;
if (currimg == maximg)
lstpic = minimg + extension;
else
lstpic = (currimg + 1) + extension;
C.src = lstpic;
}
function movebck() {
}
</script>
And just call the function movefwd on a desired button. Enjoy.