ok I have made your suggested change to the code but I am now trying to preload the images using the following code,
---------------------------
function doPreload()
{
var the_images = new Array('images/contactOne.gif','images/contactTwo.gif',
'images/faqTwo.gif', 'images/faqOne.gif', 'images/aboutusOne.gif', 'images/aboutusTwo.gif',
'images/portfolioOne.gif', 'images/portfolioTwo.gif', 'images/productsOne.gif', 'images/productsTwo.gif',
'images/hostingOne.gif', 'images/hostingTwo.gif', 'images/servicesOne.gif', 'images/servicesTwo.gif',
'images/homeOne.gif', 'images/homeTwo.gif');
preloadImages(the_images);
}
function preloadImages(the_images_array) {
for(var loop = 0; loop < the_images_array.length; loop++)
{
var an_image = new Image();
an_image.src = the_images_array[loop];
}
}
---------------------------
and I call the preLoad() function in the body tag, but it doesent seem to be preloading the images right as every time I do a mouse over the browser starts to dowload the image. Heres an example of a mouse over button code
---------------------------
<a href="http://www.banaghergaa.com" onMouseOver="home.src='images/homeTwo.gif';" onMouseOut="home.src='images/homeOne.gif';">
<img src="images/homeOne.gif" name="home" width="72" height="17" border="0"></a>
---------------------------
I think it might have sometink to do with the line
an_image.src = the_images_array[loop];
but am not sure