Changes in JS function to change image

Signed-off-by: Jesús Antonio García Valadez <zerovamp@hotmail.com>