// by Paul@YellowPencil.com and Scott@YellowPencil.com

function setTall(arrObj) {
	MyDivObjectArray=new Array();
	if (document.getElementById) {
		for (var i = 0; i < arrObj.length; i++) {
			tempDiv=arrObj[i];	
				MyDivObjectArray[i]=eval("document.getElementById('"+String(arrObj[i])+"');");
				//alert(MyDivObjectArray[i]);
		}

		// determine the maximum height out of all columns specified
		var maxHeight = 0;
		for (var i = 0; i < arrObj.length; i++) {
			TempDiv=MyDivObjectArray[i];
			if(TempDiv!=null) {
				if (TempDiv.offsetHeight > maxHeight) maxHeight = TempDiv.offsetHeight;
			}
		}
		
		// set all columns to maximum height
		for (var i = 0; i < arrObj.length; i++) {
			TempDiv=MyDivObjectArray[i];
			if(TempDiv!=null) {
				TempDiv.style.height = maxHeight + 'px';
				// if the browser's working in standards-compliant mode, the height property
				// sets the height excluding padding, so we figure the padding out by subtracting the
				// old maxHeight from the new offsetHeight, and compensate!
				if (TempDiv.offsetHeight > maxHeight) {
					TempDiv.style.height = (maxHeight - (TempDiv.offsetHeight - maxHeight)) + 'px';
				}
			}
		}
	}
}

var divsArray = new Array("r1c1", "r1c2");
/*window.onload = function() {
	// the divs array contains references to each column's div element
	//setTall(divsArray);
	//initLogin("username");
	//initLogin("password");
	//init();
}

window.onresize = function() {
	setTall(divsArray);
}
*/
