Minor refactoring: Get rid of unnecessary expensive getElementById calls. Images don't need any id then. Closer to initial code from Douglas this way again.