How to synchronize several javascripts for resizing and enlarging thumbnails

here are two page that i want to combine the best of but i cant figure out how to allow the multiple scripts to work w one another

www.phi
lip
dusel.com/work.html

works great in the sense that the thumbnails and the arrows can change the image, and when the page expands the large image on the left moves with it. all this i want to keep

www.phi
lip
dusel.com/work2.html works great in the sense that the large image on the left proportionally resizes with the browser window resize.

my issue is putting the two together.

i am running into problems because the work2.html has the img src contained in the javascript, whereas work.html has it in a div. is there someway of taking the image src out of the javacript so the two can work on the same page?

any ideas