/*  Copyright © 2001, 2002 OGMA Consulting Corp. */

/*
 * alternateDisplay
 * display1 reflects the action being passed
 */
function alternateDisplay(action, display1, display2, label1, label2) {

  if (action == 'show') {
    show(display1);
    hide(display2);

    if (arguments.length == 5) {
      show(label1);
      hide(label2);
    }
  } else if (action == 'hide'){
    hide(display1);
    show(display2);

    if (arguments.length == 5) {
      hide(label1);
      show(label2);
    }
  } else {

    field = eval("document.all." + display1 + '[0]')

    if (field != null) {

      if (eval('document.all.' + display1 + '[0].style.display') == 'block') {
        hide(display1);
        show(display2);
      } else {
        show(display1);
        hide(display2);
      }
    }
  }
}
