Fix JavaScript bug (use of undefined function image_popup)