
// =====================================================
// All contents copyright © 1999-2011. All rights reserved.
// Code from KK's personal website. Used by permission.
// =====================================================
// icon.js

// The variables below must be defined before this file is included.
//
if (typeof nicons == 'undefined') { var nicons = 4; }		 // size of icon set
if (typeof micon  == 'undefined') { var micon  = "reSupp"; } // icon prefix


var images = new Array(nicons);
for (var i=0; i < nicons; i++) {
  images[i] = new Image();
  images[i].src = "images/" + micon + i + ".gif";
}


// ////////////////////////
// Simple Rollover.
// The first argument is the image set name (taken from HTML code: <img src='...' name='...'>)
// The second argument is the image path, including the extension, like .gif or .jpg
// roll('myset', 'images/myimage.gif');
// ////////////////////////
function roll( ) {
  var set = roll.arguments[0];
  var pix = roll.arguments[1];

  document.images[set].src = "images/" + pix;
}


// ////////////////////////
// Old style rollover ("icons").
// ////////////////////////
var images = new Array(nicons);
for (var i=0; i < nicons; i++) {
  images[i] = new Image();
  images[i].src = "images/" + micon + i + ".gif";
}

function showIcon( k ) {
  document.icons.src = images[k].src;
}

// Supplementary funcs in case two separate sets of icons...
// ...need to be displayed in two different places on the same page.
//
function showIcon2( k ) {
  document.icons2.src = images[k].src;
}

function showIcon3( k ) {
  document.icons3.src = images[k].src;
}

function showIcon4( k ) {
  document.icons4.src = images[k].src;
}


// eof

