function parse_helper(the_class) {

	if(the_class != null) {
		return the_class.split(' ');
	}
}

function equalize() {

	var divs = Array();

	// If there are no arguments to equalize, just return
	if(equalize.arguments.length < 1) return;
	
	// If there is only 1 element, assume this is a container
	// element and we must equalize all divs inside that have been
	// tagged with equalize in it's class name
	// Any divs found are pushed into an array
	if(equalize.arguments.length == 1) {
		con = window.document.getElementById(equalize.arguments[0]);
		nodes = con.getElementsByTagName('div');
		for(i=0;i<nodes.length;i++) {
			c_array = parse_helper(nodes[i].className);
			for(k=0;k<c_array.length;k++) {
				if(c_array[k] == "equalize") {
					divs.push(nodes[i]);
					break;
				}
			}
		}
	}
	
	// If there are 2 or more arguments, assume that
	// the id's for the specific divs are being fed in
	// and just push them into the array directly
	else if (equalize.arguments.length > 1) {
		for(i=0;i<equalize.arguments.length;i++) {
			divs.push(window.document.getElementById(equalize.arguments[i]));
		}
	}
	
	// Once all the Divs have been found
	// it's time to equalize them
	// This is simply done by taking the Max of the Style Height
	// or if no Style Height is available, the offsetHeight

	max_v = 0;
	if(divs.length > 1) {	
	
		// Find the Maximum Height of the given elements
		for(i=0;i<divs.length;i++)
				max_v = Math.max(max_v, divs[i].offsetHeight);
				
		// Set the divs PARENT to the maximum height
		// we need to preserve the proper offsets, thus why we 
		// need a wrapper div
		t = '';
		t = t.concat(max_v).concat('px');
		for(i=0;i<divs.length;i++) {
			divs[i].parentNode.style.height = t;
		}
	}
}

function printWindow() {
	window.print();
}