function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
	window.onload = func;
  } else {
	window.onload = function() {
	  if (oldonload) {
		oldonload();
	  }
	  func();
	}
  }
}

(function($) {
	var t;
	setHeight = function(){
		/* Set Column Heights. Runs every 5 seconds. */
		colheight = $("#box_sidebar").height();
		bodyheight = $("#home_column_left").height();
		if(!bodyheight){ bodyheight = $("#box_main").height()+44; }
		if(bodyheight>colheight){useh = bodyheight;}else{useh = colheight;}
		$("#home_column_right").height(useh);
		$("#box_sidebar").height(useh);
		
		//console.log("setHeight()");
		
		clearTimeout ( t );
		t = setTimeout ( "setHeight()", 5000 );
	}
	
	addLoadEvent(setHeight);

	
})(jQuery);
