var footerSection;

function checkFooter (){
	if (footerSection > 0) {
		
		footerBox = document.getElementById("f_"+footerSection);
		// Change image on the bottom
		if (footerBox) {
			newsrc	= '/images/footer_' + footerSection + '_hi';
			document.getElementById("f_"+footerSection).src = newsrc;
		}
		
		// Change color of side box
		sideBox = document.getElementById("c3-content");
		
		if (footerSection == 1) {
			sideBox.style.backgroundColor = "#D4E1DA";
		}
		else if (footerSection == 2) {
			sideBox.style.backgroundColor = "#DBD6CA";
		}
		else if (footerSection == 3) {
			sideBox.style.backgroundColor = "#F4EECF";
		}
		// Same color for section 4

	}
}

function fixLayout()
{
	var r = document.getElementById("c3-content");
	var c = document.getElementById("column2");
	
	var h = c.offsetHeight - 40;
	if (r)
	{
		r.style.height = h + "px";
	}
}

if (window.addEventListener)
	window.addEventListener("load", fixLayout, false);
else if (window.attachEvent && !window.opera)
	window.attachEvent("onload", fixLayout);
