Decreasing the amount of JS files in a website from 2 to 1

hey everyone,
i got 2 galleries that use 2 JS files for a thumbviewer, those 2 files are very similar and both are used to achieve excactlly the same thing

the only difference is that one of them got page scrolling:

here is the one that use page scrolling : ddphpalbum.js
http://sospets.brinkster.net/newsite/gallery.asp

and here is the one without : thumbnailviewer.js
http://sospets.brinkster.net/newsite/cats.asp

My question is, is there any way of changing one of those files so it’ll fit both kinds of galleries? so ill just use 1 of them instead of 2…

thanks for the help

I’m not familiar with ddphpalbum.js, but it is obviously some sort of lightbox clone. Maybe you would be better of using the lightbox plugin with pagination support.