// JavaScript Document
<!--This script for image swapping was written by GEOFF HING - www.terrorware.com - and you can use it if you want-->

var hrefToImgId; 
var filename;

function setDefaultHighlight () {
  hrefToImgId = new Object;
  hrefToImgId['about.htm'] = 'about';
  hrefToImgId['gallery.htm'] = 'gallery';
  hrefToImgId['prices.htm'] = 'prices';
  hrefToImgId['ordering.htm'] = 'ordering';
  hrefToImgId['buyitnow.htm'] = 'buyitnow';
  hrefToImgId['contact.htm'] = 'contact';
  hrefToImgId['links.htm'] = 'links';
  hrefToImgId['guest.htm'] = 'guest';

  

  var href = location.href;
  filename = href.substring(href.lastIndexOf('/') + 1);
  
  if (filename == '') {
    filename = 'index.htm';
  }
  
  var img = document.getElementById(hrefToImgId[filename]);
  img.src = "images/button" + hrefToImgId[filename] + "on.png";
} // setDefaultHighlight

function swapImage (imgId, newImage) {  
  if (imgId != hrefToImgId[filename]) {
    var img = document.getElementById(imgId);
    img.src = newImage;
  }
}
