function skin_grow_cms_page_columns(num_columns, col_ids) {
  var setHeight = function(el, val) { el.style.height = val ? val + 'px' : ''; },
    absOffY = function(el) { return el.absoluteOffset()[1]; },
    contentEl = $('content'),
    col1El = $('col1'),
    innerColEls = col_ids.collect(function(c) { return $('col_'+num_columns+'_'+c); });
  
  if(innerColEls.include(null))
    innerColEls = [];
  
  setHeight(col1El);
  setHeight(contentEl);
  innerColEls.each(function(c) { setHeight(c); });
  
  if(innerColEls.length > 0) {
    var height = innerColEls.collect(function(c) { return c.getHeight(); }).max();
    innerColEls.each(function(c) { setHeight(c, height); });
  }
  
  var bodyHeight = $(document.body).getHeight(),
    viewportHeight = document.viewport.getHeight(),
    col1Height = col1El.getHeight();
  
  if(viewportHeight >= bodyHeight || viewportHeight < col1Height + absOffY(col1El)) {
    var contentHeight = contentEl.getHeight(),
      pad = bodyHeight - contentHeight;
    setHeight(contentEl, [col1Height, viewportHeight - pad, contentHeight].max());
  }
  setHeight(col1El, contentEl.getHeight() + absOffY(contentEl) - absOffY(col1El));
  
  return false;
}

function skin_grow_message_columns() {
  var cols = new Hash();
  cols.set('col2',null);
  var divs = ['annc_list','dropbox_list','message_list','grades_list'];
  while(cols.get('col2') == null) {
    if(divs.length > 0) {
      cols.set('col2', $(divs.shift()));
    } else {
      return false;
    }
  }
  if($('col1')) { cols.set('col1', $('col1')); }
  
  try {
    cols.get('col2').style.height = '';    
    var height = document.viewport.getHeight() - 100;
    height -= cols.get('col2').cumulativeOffset()[1];
  } catch(err) {}
  cols.each(function(pair) {
    try {
      pair.value.style.height = '';
      col_height = pair.value.getHeight();
      if(!Object.isUndefined(cols.get('col1'))) {
        col_height += pair.value.cumulativeOffset()[1] - cols.get('col1').cumulativeOffset()[1];
      }
      height = (col_height > height ? col_height : height);
    } catch(err) {}
  });
  try {
    if(!Object.isUndefined(cols.get('col1'))) {	$(cols.get('col1')).style.height = height + 60 + 'px'; }
  	cols.get('col2').style.height = height + 0 + 'px';
	
  	if(Prototype.Browser.IE && Prototype.BrowserVersion<7) {
  	  height += 150;
  	  if(cols.get('col2').id == 'dropbox_list') { height += 20; }
  	  $('content').style.height = height + 'px';
  	}
  } catch(err) {}
}
