// Copyright 2000 Kevin Dempsey Peterson
// You can freely use and modify this, provided you credit me

var image_base = "gfx/ico-";
var image_ext = ".jpg";

function on(image) {
  document[image].src = image_base + image + "-on" + image_ext;
}
function off(image) {
  document[image].src = image_base + image + "-off" + image_ext;
}
function put_mouseover(image, dest, alt) {
  put_mouseover_size(image, dest, alt, 0, 0);
}
function put_mouseover_size(image, dest, alt, height, width) {
  var anchor = '<A HREF="' + dest + '" ' + 
               'onMouseOut="off(\'' + image + '\')" ' +
               'onMouseOver="on(\'' + image + '\')">';
  var img    = '<IMG SRC="' + image_base + image + "-off" +
               image_ext + '" BORDER="0" ALT="' + alt +
               '" name="' + image + '" ';
  var size = "";
  if(height > 0 && width > 0) {
    size = 'height="' + height + '" width="' + width + '" ';
  }
  var end    = '></A>\n';
  document.write(anchor + img + size + end);
}
function put_nav_button(image, dest, alt) {
  put_mouseover_size(image, dest, alt, 40, 40);
  document.write("<BR>");
}
