<!--

var pics;
browserOK = true;
pics = new Array();

var objCount = 0; // number of (changing) images on web-page
var activePic = '';

function preload(name, first, second) {  

  // preload images and place them in an array

  if (browserOK) {     
    pics[objCount] = new Array(3);
    pics[objCount][0] = new Image();
    pics[objCount][0].src = first;
    pics[objCount][1] = new Image();
    pics[objCount][1].src = second;
    pics[objCount][2] = name;
    objCount++;
  }
}

function on(name){
  if (browserOK) {
     for (i = 0; i < objCount; i++) {
      if (document.images[pics[i][2]] != null)
        if ((name != pics[i][2]) & (document.images[pics[i][2]] != activePic)) { 
          // set back all other pictures
          document.images[pics[i][2]].src = pics[i][0].src;
        } else {
           // show the second image because cursor moves across this image
           document.images[pics[i][2]].src = pics[i][1].src;
        }
    }
  }
}

function active(name){
  if (browserOK) {
     for (i = 0; i < objCount; i++) {
      if (document.images[pics[i][2]] != null) {
	  
	  	if (name == pics[i][2])
			{
           document.images[pics[i][2]].src = pics[i][1].src; 
		   activePic = document.images[pics[i][2]];
		   }
		   
		   }
    }
  }
off();
}

function off(){
  if (browserOK) {
     for (i = 0; i < objCount; i++) {
      // set back all pictures
      if ((document.images[pics[i][2]] != null) & (document.images[pics[i][2]] != activePic))
        document.images[pics[i][2]].src = pics[i][0].src;
    }
  }
}

// example: preload("link1", "images/01_longdrinks_off.jpg", "images/01_longdrinks.jpg");

// -->
