Thanks @EricShulman, I realised I had repeated code in several places and had on my list of things to do, to sort this out. My aim today was to get thumbnail lists working, which I obviously managed.
Just for interest, how was the response time for displaying these lists for you, acceptable or not? I am concerned about the response times as these lists get bigger. That is the reason behind my post re caching images ahead of time.
Bobj