//----------------------------------------------------------------------------
// Javascript Rollovers
//----------------------------------------------------------------------------
// (c) Dom Esplen 2004
//----------------------------------------------------------------------------
//
// Cause image to change when mouse moves over a link
//
//----------------------------------------------------------------------------

var photo;
var code;
var draw;
var heart;
var home;

//----------------------------------------------------------------------------
// LoadImages
//----------------------------------------------------------------------------

function LoadImages(relPath)
{ 
  photo  = new HilightIcon(relPath, "photo");
  code   = new HilightIcon(relPath, "code");
  home   = new HilightIcon(relPath, "home");
  heart  = new HilightIcon(relPath, "heart");
}

//----------------------------------------------------------------------------
// HiLightIcon class
//----------------------------------------------------------------------------    
function HilightIcon(relPath, iconName)
{
  this.m_object        = document.images[iconName];
  this.m_offImage      = new Image();
  this.m_onImage       = new Image();
  this.m_offImage.src  = relPath + "images/" + iconName + ".gif";
  this.m_onImage.src   = relPath + "images/" + iconName + "C.gif";
}
    
//----------------------------------------------------------------------------
// Hilight
//----------------------------------------------------------------------------
function Hilight(iconName)
{
  eval(iconName + ".m_object.src = " + iconName + ".m_onImage.src;");
}
 
//----------------------------------------------------------------------------
// Lowlight
//---------------------------------------------------------------------------- 
function Lowlight(iconName)
{
  eval(iconName + ".m_object.src = " + iconName + ".m_offImage.src;");
}
  
//----------------------------------------------------------------------------  
// LowLightAll
//----------------------------------------------------------------------------
function LowLightAll()
{
  Lowlight("photo");
  Lowlight("code");
  Lowlight("heart");       
  Lowlight("home");
}

