// Menu Images
if (document.images)
{
  BallOn = new Image();
  BallOn.src = "ball_on.jpg";
  BallOff = new Image();
  BallOff.src = "ball.jpg";
}

// Function to 'activate' images.
function imgOn(imgName, imgIndex)
{
  if (document.images)
  {
    if (imgIndex)
    {
      fullName = imgName + "_" + imgIndex;
      document[fullName].src = eval(imgName + "On.src");
    }
    else
    {
      document[imgName].src = eval(imgName + "On.src");
    }
  }
}

// Function to 'deactivate' images.
function imgOff(imgName, imgIndex)
{
  if (document.images)
  {
    if (imgIndex)
    {
      fullName = imgName + "_" + imgIndex;
      document[fullName].src = eval(imgName + "Off.src");
    }
    else
    {
      document[imgName].src = eval(imgName + "Off.src");
    }
  }
}

// Create a popup window
function popup(MyLink, WindowName)
{
    if (! window.focus)
    {
        return true;
    }
    
    var href;
    
    if (typeof(mylink) == 'string')
    {
        href = MyLink;
    }
    else
    {
        href = MyLink.href;
    }
    
    window.open(href, WindowName,
      'width=400,height=400,left=400,top=300,scrollbars=yes,resize=yes');
    
    return false;
}


