function addLoadEvent(func) { var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function() { oldonload(); func(); } } } // Changes the height of the main column so that it matches the right column when // the right column is taller. var fixHeight = function () { setTimeout(function () { var content = document.getElementById("content"); var rightColumn = document.getElementById("right-column"); var rightColHeight, contentHeight; if (rightColumn) { rightColHeight = document.getElementById("right-column").offsetHeight; contentHeight = content.offsetHeight; if (rightColHeight > contentHeight) { content.style.height = rightColHeight + "px"; } } }, 100); }; if (window.addEventListener) { window.addEventListener("load", fixHeight, false); } else { window.attachEvent("onload", fixHeight); }