function setColHeights() {
	//only do this stuff if the DOM is accessible
	if (document.getElementById) {
		var cols = new Array();

		var c1 = document.getElementById("sidebar");
		if (c1) cols[cols.length] = c1;
		var c2 = document.getElementById("content");
		if (c2) cols[cols.length] = c2;

		//determine the maximum height of all columns
		var maxHeight = 0;
		for (var i=0; i<cols.length; i++) {
			if (cols[i].offsetHeight > maxHeight) maxHeight = cols[i].offsetHeight;
		}
		
		//set all columns to the maximum height
		for (var i=0; i<cols.length; i++) {
			cols[i].style.height = maxHeight + 'px';

//tip found online to re-check the new heights and adjust if wrong due to height/padding problem
			if (cols[i].offsetHeight > maxHeight) {
				cols[i].style.height = (maxHeight - (cols[i].offsetHeight - maxHeight)) + 'px';
			}
		}
	}
}

window.onload = function() {
	setColHeights();
}

window.onresize = function() {
	setColHeights();
}
