function showAnswerTip(evt, ix) {
  containerWidth = document.viewport.getWidth();
  width = Element.getWidth("answer-tip-" + ix);
  
  newLeft = Math.min(Event.pointerX(evt) + 12, containerWidth - width - 12);
  newTop = Event.pointerY(evt) + 12;  
  
  Element.setStyle("answer-tip-" + ix, { left: newLeft + "px", top: newTop + "px" });
  Element.show("answer-tip-" + ix);
}

function hideAnswerTip(evt, ix) {
  Element.hide("answer-tip-" + ix);  
}

function slideBars(numBars) {
  for (i=1;i<=numBars;i++) {
    new Effect.SlideRightIn("abar-" + i, { duration: 0.75 });
  }
}