function matchDivs() {	
// Get the divs id's 	
	if (document.getElementById) {	
	var argv = matchDivs.arguments;	
	var argc = argv.length;	
	var divs = new Array();	
// Make a loop to populate the array
	for (var k = 0; k < argc; k++) {		
		divs[k] = document.getElementById(argv[k]);   
}   
//Setting to 0 the maxHeight var		
	var maxHeight = 0;		
	for (var i = 0; i < divs.length; i++) { 
	//Begin loop
	// if height of a div is bigger than 0 set maxHeight to maximum height	
	if (divs[i].offsetHeight > maxHeight) maxHeight = divs[i].offsetHeight;	
	}
	// End loop		
	for (var i = 0; i < divs.length; i++) { 
	// Begin loop
	// Set the height of all divs to a same value		
   divs[i].style.height = maxHeight + 'px';			
// if height of some div is bigger than the new maxHeight 			
   if (divs[i].offsetHeight > maxHeight) { 
// Shrink divs to the same value				
	divs[i].style.height = (maxHeight - (divs[i].offsetHeight - maxHeight)) + 'px';	
}			
	if (divs[i].offsetHeight < 500) {				
	divs[i].style.height = 500 + 'px';
	}		
} 
// End loop	
	}
}
window.onload = function() {matchDivs('contenidoIzq','contenidoDer');	}
