// JavaScript Document
var d = document;
// sets of columns to balance
// note: I don't know that it makes a diff, but it
// seems safest to balance the sets from innermost
// to outermost...
var columnSets = new Array(
	// new Array( "column1", "column2" ),
	new Array( "c1", "c2", "c3" )			 
);
function setHeight() {
	// loop over the array of column sets to balance
	for( i=0; i<columnSets.length; i++ ){
		// get the heights
		var box =  columnSets[i];
		var h = 0;
		for(x=0;x<box.length;x++){
			if( d.getElementById(box[x]) ){
				div = d.getElementById(box[x]);
				// unset height and scrollHeight
				div.style.height = "auto";
				div.style.scrollHeight = "auto";
				// determine the tallest div
				test_h = div.offsetHeight;
				// alert( box[x] + ": " + test_h );
				if( test_h > h ){
					h = test_h;
				}
			}
		}
		// set the height of all divs to the tallest
		for(x=0;x<box.length;x++){
			if( d.getElementById(box[x]) ){
				div = d.getElementById(box[x]);
				div.style.height = h +"px"; 
				div.style.scrollHeight = h +"px";
			}
		}		
	} // end loop over columnSets
	// zero the margins and padding on the footer
	/* d.getElementById("footer").style.margin = "0";
	d.getElementById("footer").style.padding = "0"; */
}

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

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