//check if browser is capable, NS3+, IE4+
if (document.images) {
 //preload images
 //base image
 homeN= new Image(150,19);
 homeN.src= 'images/home.gif' ;
 contactusN= new Image(150,19);
 contactusN.src= 'images/contactus.gif' ;
 aboutusN= new Image(150,19);
 aboutusN.src= 'images/aboutus.gif' ;
 //hover or rollover image
 homeH= new Image(150,19);
 homeH.src= 'images/homehover.gif' ;
 contactusH= new Image(150,19);
 contactusH.src= 'images/contactushover.gif' ;
 aboutusH= new Image(150,19);
 aboutusH.src= 'images/aboutushover.gif' ;
 function myOn(myImgName) {
  //we need to name the image in the BODY
  //so we can use its name here
  document[myImgName].src=eval(myImgName+ 'H' ).src;
 }
 function myOut(myImgName) {
  document[myImgName].src=eval(myImgName+ 'N' ).src;
 }
} //end of if document.images