No worries ScP, if you're doing mouseover buttons I have a handy piece of Javascript you might like:
Code:
function mouseover(object) {
var newsrc = object.src;
var insertat = newsrc.lastIndexOf("/");
newsrc = newsrc.substr(0,insertat) + "/mo_" + newsrc.substr(insertat + 1, newsrc.length);
object.src = newsrc;
}// end mouseover
function mouseout(object) {
var newsrc = object.src;
var insertat = newsrc.lastIndexOf("/");
newsrc = newsrc.substr(0,insertat + 1) + newsrc.substr(insertat + 4, newsrc.length);
object.src = newsrc;
}// end mouseout
function preload(someImage) {
someButton = new Image();
someButton.src = someImage;
}// end preload
Pretty straightforward, normal buttons are named "image.ext" and the mouseover buttons are named "mo_image.ext".
If you want to add a mouseover effect to an image just insert the following piece into the img tag:
Code:
onMouseOver="mouseover(this);" onMouseOut="mouseout(this);"
and you're set.
Right, and preloading is done by explicitely calling the preload function, preferably as an inline Javascript in head.