Move the JS code for dragging an image from the image list html to a separate javascript source file.