moved mouse event and image load functions to UIFunctions.js for real this time.