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(); };  
		}  
	}  
}

addLoadListener(equalCol);  
// addLoadListener(anotherFuntion);  

function equalCol() {
	var colArray = new Array(["main",0],["sidebar",0]);
	// make the column depths match so they have full-height attributes (bg colors, etc):
	for (var i=0; i<colArray.length; i++) {
		// everyone expresses their natural column heights:
		document.getElementById(colArray[i][0]).style.height = "100%";
		// detect natural column heights in px and store in the array:
		colArray[i][1] = document.getElementById(colArray[i][0]).offsetHeight;
	}
	// determine tallest column in the array:
	var tallCol = Math.max(colArray[0][1],colArray[1][1]);
	// make all columns the height of the tallest column:
	for (var i=0; i<colArray.length; i++) {
		if (document.getElementById(colArray[i][0]).offsetHeight == tallCol) {
			var fullCol = document.getElementById(colArray[i][0]);
		}
		document.getElementById(colArray[i][0]).style.height = tallCol + "px";
	}
	fullCol.style.height = "100%"
}
