var active_answer = null;

//take in the question dt as "this"
function showAnswer(question_dt)
{
  if(Element.hasClassName(question_dt, 'active'))
  {
    return;
  }
  var answer_id = question_dt.id.replace(/^q/, 'a');
  if(active_answer)
  {
    //hide the currently active answer first
    //Element.hide(active_answer);
    new Effect.SlideUp(active_answer, { queue: 'end', afterFinish: function() { Element.removeClassName(active_answer.replace(/^a/, 'q'), 'active'); active_answer = null; } });
      }
  //make the answer appear
  //Element.show(answer_id);
  new Effect.SlideDown(answer_id, { queue: 'end', afterFinish: function() { Element.addClassName(question_dt, 'active'); active_answer = answer_id; } });
}

