//Función para obtener columnas del mismo ancho
// by Paul@YellowPencil.com and Scott@YellowPencil.com
// feel free to delete all comments except for the above credit
function setTall(columnsIds) {
	if (document.getElementById) {
		//the div's array contains references to each column's div element.  
		//Inicia modif: Ricardo Montoya
		var divs = new Array();
		//fills the divs array with the columns ID's we want to make same height
		for (var i = 0; i < columnsIds.length; i++) {
			//valida que exista el elemento antes de agregarlo al arreglo de divs
			if(document.getElementById(columnsIds[i])) {
				divs[i] = document.getElementById(columnsIds[i]);
			}
		}
	//	var divs = new Array(document.getElementById('center'), document.getElementById('right'), document.getElementById('left'));
		//Fin: modif Ricardo A Montoya
		// Let's determine the maximum height out of all columns specified
		var maxHeight = 0;
		for (var i = 0; i < divs.length; i++) {
			if (divs[i].offsetHeight > maxHeight) maxHeight = divs[i].offsetHeight;
		}
		
		// Let's set all columns to that maximum height
		for (var i = 0; i < divs.length; i++) {
			divs[i].style.height = maxHeight + 'px';
			//window.alert(divs[i]+"="+ divs[i].style.height);
			// Now, if the browser's 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!  So it works in Safari AND in IE 5.x
			//if(document.compatMode == "BackCompat") { //Aplica para IE
				if (divs[i].offsetHeight > maxHeight) {
					divs[i].style.height = (maxHeight - (divs[i].offsetHeight - maxHeight)) + 'px';
				}
			//}
		}
	}
}
