//Main rollover for navigation.




var imgNames,numImgs,imgsOff,imgsOn;

if(document.images)
{
  //  arrays for image names/objects
 
 imgNames=new Array("whiteProject-","whiteCapabilities-","whiteService-", "whiteSafety-", "whiteAboutUs-", "whiteContactUs-", "whiteMemberships-");     //we are storing the names of the images in this array
  
  numImgs=imgNames.length;  											//number of images (numIMgs) equals the number of elements (length) in the Array
  
  imgsOff=new Array(numImgs);
  imgsOn=new Array(numImgs);

//  preload images

  for(var i=0;i<numImgs;i++)
  {
    imgsOff[i]=new Image();														//It's not necesary to include the dimensions of the images (which it is nice when we have images of different sizes)
    imgsOff[i].src="../imgs/navigation/"+imgNames[i]+"off.jpg";					// With this technique we just need 2 lines of code instead of two for each couple of images: GREAT!!
    imgsOn[i]=new Image();
    imgsOn[i].src="../imgs/navigation/"+imgNames[i]+"on.jpg";						// 
  }
}

function rollOn(index)
{
  if(document.images)
    document.images[imgNames[index]].src=imgsOn[index].src;
}

function rollOff(index)
{
  if(document.images)
    document.images[imgNames[index]].src=imgsOff[index].src;
}