There are several variations/types of ways to assign a function to the onload event. Some of these are mutually exclusive. If you only use that type, whichever one is seen last by the browser is the only one that will be executed.
If you look inside the motiongallery.js script, you will see this line near the end:
That's one of the exclusive ways I was talking about. Using onload in the body tag is another. But you can combine them into one onload in the body tag -
Get rid of this:
That actually does nothing.
and get rid of the:
from the other script.
Now you can put them together in the body tag:
<body style="background-image: url('background.jpg');" onload="fillup();getFilenameFromURL();">