It's these lines which adds the image path to the word:
Code:
seleccionado=banners[ad];
localizador=seleccionado.lastIndexOf('.');
localizador2=localizador+4
I don't do javascript (java is very different from javascript which is what this is), so I'm not sure exactly what you should do. Play with it on your test site until it is right. (Is that last line missing a ; at the end?)