function toggleAccount(a)
{
  a = Element.extend(a);
  id = a.id;
  content = $(id + '_content');
  Effect.toggle(content,'BLIND', {
    afterFinish: function() {
      a.toggleClassName('expanded');
    }
  });
  return false;
}

function collapseAll()
{
  $$('.toggler').each(function(el){
    el = Element.extend(el);
    id = el.id;
    content = $(id + '_content');

    Effect.BlindUp(content, {
      afterFinish: function() {
        el.removeClassName('expanded');
      }
    });
  })
  return false;
}

function expandAll()
{
  $$('.toggler').each(function(el){
    el = Element.extend(el);
    id = el.id;
    content = $(id + '_content');
    if ( ! content.visible())
    {
      Effect.BlindDown(content, {
        afterFinish: function() {
          el.addClassName('expanded');
        }
      });

    }

  })
  return false;
}







function menuCollapse(id)
{
  for(i=1;i<5;i++)
  {
    $('menu'+i).style.display='none';
    $('option'+i).className ='';
  }
  $('menu'+id).style.display='block';
  $('option'+id).className ='active';
}