// Menu + caption
var menufx_enabled = false;
var current_page = "";

function on(elem)
{
  if (menufx_enabled)
  { 
    hide(document.getElementById(elem.id.substring(0, elem.id.length-3)+'_of'));
  }
}

function out(elem)
{
  if (menufx_enabled)
  {
    if(elem.id.substring(0, elem.id.length-3) != current_page)
    {
      show(document.getElementById(elem.id.substring(0, elem.id.length-3)+'_of'));
    }
  }
}

function push(elem)
{
  document.getElementById(current_page + '_on').style.backgroundImage = 'url("img/buttons/'+current_page+'_on.gif")';
  show(document.getElementById(current_page + '_of'));
  elem.style.backgroundImage = 'none';
  current_page = elem.id.substring(0, elem.id.length-3);
  changeCaption();
}

function load()
{
  if(navigator.appName == 'Microsoft Internet Explorer')
  {
    menufx_enabled = true;
  }

  current_page = 'home';

  hide(document.getElementById(current_page + '_of'));
  document.getElementById(current_page + '_on').style.backgroundImage = 'none';
}

function show(elem)
{
  elem.style.visibility='visible';
}

function hide(elem)
{
  elem.style.visibility='hidden';
}

function changeCaption()
{ 
  document.getElementById('caption_img').src = 'img/'+current_page+'_caption.gif';
}
