All you need is a little "state" checking. If int is = 0 (or one), don't to previous. If int is greater than (or equal to) the total number in the array, don't do next. You can also replace the image src with a space.gif. --- Anthony Baratta President Keyboard Jockeys Blatant Plug: Cool Jazz for a hot summer, http://LisaMarie.Baratta.com