var bodyBGImage = null;
jQuery(document).ready(function() {
  RightColumn();
  var bgUrl = jQuery('#bodyColumnCenter').css('backgroundImage').replace('url("', '').replace('")', '');
  if((bgUrl.length > 0) && (bgUrl != 'none')) {
    bodyBGImage = jQuery('<img></img>').attr('src', bgUrl);
    setTimeout('BodyBGLoaded();', 10);
  }
});

function BodyBGLoaded() {
  var height = bodyBGImage.attr('height');
  if(height > 0) {
    var contentHeight = jQuery('#bodyColumnCenterContent').innerHeight();
    var measureHeight = jQuery('#bodyColumnCenter').innerHeight();
    if(measureHeight < (contentHeight + height)) {
      jQuery('#bodyColumnCenter').height(contentHeight + height);
    }
  } else {
    setTimeout('BodyBGLoaded();', 10);
  }
}

function CloseMovie() {
  jQuery('#movieFrame').remove();
}

function ShowIntro(movie) {
  var container = jQuery('#bodyBody');
  var code = '<div style="padding-left: 1px; padding-top: 20px;"><object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="480" height="272" codebase="http://www.apple.com/qtactivex/qtplugin.cab">';
  code += '<param name="SRC" value="'+movie+'">';
  code += '<param name="AUTOPLAY" value="true">';
  code += '<param name="CONTROLLER" value="false">';
  code += '<embed src="'+movie+'" width="480" height="272" autoplay="true" controller="false" pluginspace="http://www.apple.com/quicktime/download/">';
  code += '</embed>';
  code += '</object></div><img src="/x.png" style="position: absolute; top: -12px; right: -14px;" alt="Close movie" onclick="CloseMovie();" />';
  jQuery('<div id="movieFrame"></div>')
    .width(520)
    .height(312)
    .css('position', 'absolute')
    .css('background-color', '#000000')
    .css('zIndex', 29900)
    .css('top', 310)
    .css('left', parseInt(container.width() / 2) - 260)
    .html(code)
    .appendTo(container);
}
