var showNews = true;
function calcHeight()
{
  //find the height of the internal page
  var the_height=14+document.getElementById('the_iframe').contentWindow.document.body.scrollHeight;

  //change the height of the iframe
  document.getElementById('the_iframe').height=
      the_height;
}


$(window).resize(function() {
  getBackground();
});

$(document).ready(function(){
	
	getBackground();
	
});
function getBackground()
{
	var height = document.body.offsetHeight;
	var width = document.body.offsetWidth;
	if($(document.body).width()<980)
	{
		//$(document.body).width(980);
	}
	var headerHeight = $('#header').height();

	if(showNews)
	{
		$('#newsBG').css('top',(headerHeight+10)+'px');
		$('#news').css('top',headerHeight+'px');
	}
	else
	{
		$('#newsBG').css('display','none');
		$('#news').css('display','none');
	}
	if ($.browser.msie)
	{
		if($('#mainContent').height()<700)
		{
			$('#mainContent').height(700);
		}
	}
	else
	{
		$('#mainContent').height($('#mainContent').outerHeight()+125);
	}
	$('#sidebar1').height($('#mainContent').outerHeight());
	ByRei_jScroller2.add(document.getElementById('scroller'),'up');
	$('#news').css('position','absolute');
	var bottom = $(document.body).width()/1280*150;
	bottom = ($(document.body).width()<980)?115:bottom;
	$('#footerFilmId').height(bottom);
	$('#headerFilmId').height(bottom);
	/*var offset = $('#inContent').offset();
	//$('#newContent').css('position','relative');
	$('#newContent').css('top',offset.top);
	$('#newContent').css('left',offset.left);
	$('#newContent').css('right','280');
	//$('#newContent').offset({left: offset.left, top: offset.top, bottom: offset.bottom, right: offset.right});
	$('#newContent').html($('#inContent').html());
	$('#inContent').html('');*/
	if($.browser.msie)
	{
		$('#footer').css('top', '-30px');
		$('#sidebar1').css('margin-top','-2px');
	}
}
