// Make all blocks (divs) on one page the same height as the tallest one (when faux columns can't be used)

function getPrimaryContentHeight(){
	//check for standards compliance
	if(!document.getElementById) return;
	if(!document.getElementsByTagName) return;
	var primaryContent = document.getElementById("primarycontent");
	// loop through all divs
	var height = primaryContent.offsetHeight; //set the highest height
	setSidebarHeight(height); // run the setHeights function for the content blocks
}

// make all divs the same height in pixels. must be run on window resize, text increase/decrease. (a ballache basically.)
function setSidebarHeight(height){
	var sidebar = document.getElementById("sidebar");
	// set heights for all browsers
	height = height;
	sidebar.style.height = height+'px'; // set height

}


addEvent(window,"load",getPrimaryContentHeight);
//$(document).ready(getPrimaryContentHeight);
