I fix it using another script
This is the function definition and i added it like Raven said (but i put it in includes/meta.php to be sure is in <header> tag)... linking an outside js file doesn't seremed to work (i made some tests)
Code:
function init() {
if (!document.getElementById) return
var imgOriginSrc;
var imgTemp = new Array();
var imgarr = document.getElementsByTagName('img');
for (var i = 0; i < imgarr.length; i++) {
if (imgarr[i].getAttribute('hsrc')) {
imgTemp[i] = new Image();
imgTemp[i].src = imgarr[i].getAttribute('hsrc');
imgarr[i].onmouseover = function() {
imgOriginSrc = this.getAttribute('src');
this.setAttribute('src',this.getAttribute('hsrc'))
}
imgarr[i].onmouseout = function() {
this.setAttribute('src',imgOriginSrc)
}
}
}
}
onload=init;
And the calls are very easy and clean:
Now the hard part..the JS Menus :cry: .... any other JS Menus which have a very simple call of the function? (seems this was the problem)