function setMinHeight(theID,minHeight) {
  debug('setMinHeight', 2)
  if (document.getElementById) {
    var theElement = document.getElementById(theID);
    minHeight = minHeight + 1;
    if (theElement.offsetHeight < minHeight) {
      theElement.style.height = minHeight  + 'px';
    }
  }
}

function commonHeight(ids) {
  debug('commonHeight', 2)
  if (document.getElementById) {
    debug('1', 2)
    var commonHeight = 0;
    for (i=0;i<ids.length;i++) {
      debug('3', 2)
      var theID = ids[i];
      var theElement = document.getElementById(theID);
      debug(theID, 2)
      debug(theElement, 2)
      var thisHeight = theElement.offsetHeight;
      debug('5', 2)
      if (thisHeight > commonHeight) {
        commonHeight = thisHeight;
      }
    }
    debug('2', 2)
    for (i=0;i<ids.length;i++) {
      var theID = ids[i];
      setMinHeight(theID,commonHeight);
    }
  } 
}


function debug(message, value) {
  // values and meanings:
  // 1-59: low (showing value as they are being set, etc...)
  // 60-69: steps (to check if/when something goes wrong)
  // 70-100: special (to indentify something specific)
  var mindebug = 0;
  var maxdebug = 0;
  if (value >= mindebug && value <= maxdebug) {
    alert(message);
  }
}

function afterLoad() {
  return true;
}
