I don't see any change in the code apart from dropping the 'path' quote marks. I leave this out for clarity.
I have an array of elements - thumbnails - which I figure to set an ID value - 0 to say 100
I think to set the equivalent array - var images = [0, 1,...,100]
How to get the thumbnail ID inserted into var image = images[ID];