Ironically I just wrote this last night for a friend
To use this. put all the script within <script> tags in the head
<script language="Javascript">
stufff here
</script>
Then in your body tag you put
<body onLoad="preload()"
Okay here is the deal in the preloader change the array to all of the images you want to swap.
Now you should be set.
The swap function switches the nav item. switchMain switches the main image.
Links should look something like this
<a href="whatever.com" onMouseover="swap('anImage',0);switchMain('3')" onMouseout="swap('anImage',1)">
Where the numbers correspond with the image number in the array
This is rough instructions.
Why don't you try installing this and let me know where you have problems.
var loaded;
function preload() {
if (document.images) {
// Put your images here. Just cut and paste.
// Make sure the numbers are all in order.
// I'd put the main images in first and then all the over and off states for the nav second.
daImgArray = new Array()
daImgArray[0] = "images/lap_01.jpg";
daImgArray[1] = "images/liz_2.jpg";
daImgArray[2] = "images/liz_3.jpg";
daImgArray[3] = "images/liz_4.jpg";
daImgArray[4] = "images/liz_5.jpg";
daImgArray[5] = "images/liz_6.jpg";
daImgArray[6] = "images/gwen_1.jpg";
daImgArray[7] = 'images/members_on.gif';
daImgArray[8] = 'images/members_off.gif';
daImgArray[9] = 'images/join_on.gif';
daImgArray[10] = 'images/join_off.gif';
daImgArray[11] = 'images/contact_on.gif';
daImgArray[12] = 'images/contact_off.gif';
daImgArray[13] = 'images/booking_on.gif';
daImgArray[14] = 'images/booking_off.gif';
daImgArray[15] = 'images/cd_on.gif';
daImgArray[16] = 'images/cd_off.gif';
daImgArray[17] = 'images/links_on.gif';
daImgArray[18] = 'images/links_off.gif';
daImgs = new Array();
for (i=0; i < daImgArray.length; i++) {
daImgs[i] = new Image;
daImgs[i].src = daImgArray[i];
}
loaded = true;
}
}
function switchMain(daImgNum) {
if (document.images && loaded) {
document.mainImg.src= daImgs[daImgNum].src;
}
}
//Pop Up windows
function openWin( windowURL, windowName, windowFeatures ) {
return window.open( windowURL, windowName, windowFeatures ) ;
}
function swap(name,num){
if((document.images) && (loaded)){
document[name].src = daImgs[num].src;
}
}
Walking the Earth like Kane