// Michael Griffiths Mar 2001
// Script used to change source of images on screen to make them look highlighted or depressed
function HighLight(ImgName)
{
   document.images[ImgName].src = "images/"+ImgName+"h.gif";
}

function LowLight(ImgName)
{
   document.images[ImgName].src = "images/"+ImgName+".gif";
}

function Depress(ImgName)
{
   document.images[ImgName].src = "images/"+ImgName+"d.gif";
}

function preloadimages()
{
   //Preload images used throught site for when a user clicks/highlights a link
   //NOTE: Will only preload images if browser supports javascript
   var strRootPath = new String("images/");

   var eImg = new Image();
   eImg.src = strRootPath + "logoh.gif";

   var aImages = new Array("btnhome","btninfo","btnwhatson","btncourse","btnother","btnnewsletter","btnfridayclub","btnfaq","btnsiteinfo","btnlinks","btnpodcast","btnprevious","btnnext");
   for (var i=0;i<aImages.length;i++)
   {
      //When the image objects source is set, the browser will load (and cache) the image.
      var eImg1 = new Image();
      eImg1.src = strRootPath + aImages[i] + "h.gif";
      var eImg2 = new Image();
      eImg2.src = strRootPath + aImages[i] + "d.gif";
   }
}
