window.onresize = setContentHeight;

function setContentHeight()
{
  var decorationHeight = $('#header').outerHeight(true) + $('#footer').outerHeight(true);
  var padding = $('#content').outerHeight(true) - $('#content').height();
  var contentHeight = $(window).height() - decorationHeight - padding;

  $('#content').css('min-height', contentHeight + 'px');

  if($('#rightColumn') && $('#help_box'))
    $('#help_box').height(contentHeight - $('#rightColumn').innerHeight() + $('#help_box').height());

  $('.flash').resize(setContentHeight);

  $('.embedded').resize(setContentHeight);
  $('.embedded').height(contentHeight);

  $('#footer').css('visibility', 'visible');

  $('.flash:first').click();
}

