How to make endless thumbnail scroller

Hello,
I am new at this forum and i need help about one of kirupa tutorials

http://www.kirupa.com/developer/mx2004/thumbnails.htm

I used this tutorial and it works pefectly for my goals but now i need to make the scroller
looping. I did it for the big pictures using buttons next and previous but i cannot do when i reach the last thumbnail to show the first one and to make the scroller continue.

I hope i explained this correctly and i`ll be glad if someone can halp me.

Thanks

Polita