function loadFromOpener()
{
  // The inputs don't get brought across because the user enters the
  // values.  They are not part of the HTML.  Get the selected calculator
  // from the opener windows.
  var tab = window.opener.selectedTab;

  // Load the params and results divs from the calculator window.
  document.getElementById('params').innerHTML = window.opener.document.getElementById('p_' + tab).innerHTML;
  document.getElementById('results').innerHTML = window.opener.document.getElementById('r_' + tab).innerHTML;

  // Get the selected tab from the opener.
  var tab_div = window.opener.document.getElementById('p_' + tab);

  // Loop to load the inputs.
  var this_inp;
  var inp_array = getElementsByClass('number', tab_div, 'input');
  for (var i = 0; i < inp_array.length; i ++) {
    this_inp = document.getElementById(inp_array[i].id);
    if (this_inp) {
      this_inp.value = inp_array[i].value;
      this_inp.readOnly = true;
    }
  }

  var inp_array = getElementsByClass('', tab_div, 'select');
  for (var i = 0; i < inp_array.length; i ++) {
    this_inp = document.getElementById(inp_array[i].id);
    this_inp.selectedIndex = inp_array[i].selectedIndex;
    this_inp.disabled = true;

    // If the existing select is not disabled, make the background
    // color white.
    if (! inp_array[i].disabled) {
      this_inp.style.backgroundColor = 'white';
    }
  }
}

