Why would you use JavaScript to do this? Isn't this a job for CSS?
Just taking a stab at it:
Code:
<div style="position: absolute; top: 915px; width: 100%; text-align: center;">
<img ... style="margin-right: 5px;"><img ... style="margin-left: 5px;">
</div>
(tested, seems to work fine)
Of course, if the screen is too narrow to hold the two images side by side, then they will end up stacked. If it's really important to you to avoid that, then there are other CSS tricks you can use.