/*Image Rollover
  Version 1.1
  Last Updated: January 25, 2000
  Code maintained at: http://www.moock.org/webdesign/javascript/
  Copy permission granted for non-commercial uses. Written by Colin Moock.
*/

//Init Global Variables
rollonImages  = new Array();
rolloffImages = new Array();
var imagePrefix = "/images/";  //path to rollover images and shared name portion

var num_images = imgnames.length;

//Preload Images
if (javascript_version > 1.0){
  for(count = 1; count < num_images; count++){
    rollonImages[count] = new Image();      
    rollonImages[count].src = imagePrefix + imgnames[count] + "_over.gif"; 
    rolloffImages[count] = new Image();      
    rolloffImages[count].src = imagePrefix + imgnames[count] + ".gif";
  }
}

	 
function rollon(imgName){
  // this function changes images to the rollover state (assigned above)
  // it's called by the ONMOUSEOVER attribute of the HREF element
		
  var imgNum;
  for (i=1; i < num_images; i++){
    if (imgName == imgnames[i]){
      imgNum = i;
    }
  }
  if (document.images && document.images[imgName].complete){
    document.images[imgName].src = rollonImages[imgNum].src;
  }
}

function rolloff(imgName){
  // this function changes images to the off state (assigned above)
  // it's called by the ONMOUSEOUT attribute of the HREF element

  var imgNum;
  for (i=1; i < num_images; i++){
    if (imgName == imgnames[i]){
      imgNum = i;
    }
  }
  if (document.images && document.images[imgName].complete){
    document.images[imgName].src = rolloffImages[imgNum].src;
  }
}


