// JavaScript Document
// Date: September 2008
// Author: Travis Cunningham
// Description: Core Functions

function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      oldonload();
      func();
    }
  }
}
function balanceCol(){	
	//Balance Primary Columns
	if(document.getElementById('beta')){
		var alpha = document.getElementById('alpha');
		var beta = document.getElementById('beta');
		var betaInner = document.getElementById('beta-inner');
		//Height variables
		var alphaHeight = alpha.offsetHeight;
		var betaHeight = beta.offsetHeight;
		//Balance
		if(betaHeight<alphaHeight){
			var remainderOfCol = alphaHeight - betaHeight;
			beta.style.height = remainderOfCol + betaHeight + 'px'
		}
		//Extend second widget to max width
		var widgets = betaInner.getElementsByTagName('div');
		if(widgets[0].className == "topRail2")
			return true;
		widgets[1].style.padding = 20 + 'px';
		widgets[1].style.width = 279 + 'px';
	}
}