here's what I think the problem is.
you see, a frame site is made up of several different pages, all being displayed on one page simultaneously. now when you click on your image, it takes you to a stand alone page, which, as I understand from your post, is outside of the trames page. so, when you click your return button, it is probably linked to the main page, ie, the one that contains all the frames. for reference purposes, we will cal it frame.html. frame.html is set up so it displays certain pages in certain frames by default. what you should do, if you want to keep your frame layout, (which you don't have to, there's a way around it, and I'll get into that in a sec), is on your thumbnail page, link your thumbnails to the large picture page, so that the picture page opens in that same frame as the thumbs page. so let's say that your thumbs page is in a frame called frame1. so, as far as I can recall, your link for your image would go something like this: <a href="image1.html" targe="frame1"><img src="thumb1.jpg"></a>. this will cause the big picture page to open in the same frame as the thumbs page when the user clicks on a thumbnail.
on your big picture page, in order for the user to be returned to the thumbs page by clicking on YOUR button, here's what you need to do.
<a href="thumbs.html" target="frame1"><img src="backbutton.jpg"></a>
this should do it.
if you have Photoshop, then you are in luck, because the program does all the work for you. simply go to File>Automate>Web Photo Gallery, and then experiment with the options the program gives you.
you can also go to
http://www.yoxim.com/cars/ which is a page I made, and you can simply copy the source and use your own images. hope this helps. good luck.