addLoadListener(sidelongBanners);

function sidelongBanners() {

	var myLeftColumn = document.getElementById("l_c");
	var myRightColumn = document.getElementById("r_c");
	var myCenterColumn = document.getElementById("c_c");

	var myLeftHeight = myLeftColumn.offsetHeight;
	var myRightHeight = myRightColumn.offsetHeight;
	var myCenterHeight = myCenterColumn.offsetHeight;

	if (myCenterHeight > myRightHeight) {
		myRightColumn.style.height = myCenterHeight + 263 + "px";
		myLeftColumn.style.height = myCenterHeight + 263 +  "px";
	} else {
		
	}
	
	// width
	
	var windowWidth = jQuery(window).width();
	var containerWidth = jQuery('#container').width();
	
	var bannersWidth = (windowWidth - containerWidth) / 2 - 15;
	
	if (jQuery("#l_c").width() <= bannersWidth) {
		
		jQuery("#l_c").width(bannersWidth);
		jQuery("#l_c").css('left', -bannersWidth - 15);
		
		jQuery("#r_c").width(bannersWidth);
		jQuery("#r_c").css('right', -bannersWidth - 15);
	}
	
}

function retrieveComputedStyle(element, styleProperty)
{
		var computedStyle = null;
		
		if (typeof element.currentStyle != "undefined")
		{
			computedStyle = element.currentStyle;
		}
		else
		{
			computedStyle = document.defaultView.getComputedStyle(element, null);
		}
		return computedStyle[styleProperty];
}

function addLoadListener(fn)
{
	if (typeof window.addEventListener != 'undefined')
	{
	window.addEventListener('load', fn, false);
	}
	else if (typeof document.addEventListener != 'undefined')
	{
		document.addEventListener('load', fn, false);
	}
	else if (typeof window.attachEvent != 'undefined')
	{
		window.attachEvent('onload', fn);
	}
	else
	{
		var oldfn = window.onload;
		if (typeof window.onload != 'function')
		{
		window.onload = fn;
		}
		else
		{
		window.onload = function()
		{
		oldfn();
		fn();
		};
		}
	}
}
