/********************************
 *
 * $LastChangedDate: 2008-04-09 15:51:49 -0400 (Wed, 09 Apr 2008) $
 * $LastChangedBy: ozacharias $
 *
 ********************************/

function initAutoSizeHeights()
{
	var adjustmentSections = document.getElementsByClassName('autoSizeHeight');
	if (adjustmentSections.length > 0)
	{
		autoSizeHeights(adjustmentSections);
	}
}

function autoSizeHeights(adjustmentSections)
{
	for (i = 0; i < adjustmentSections.length; i++)
	{
		var tallestHeight = 0;
		var subSections = adjustmentSections[i].getElementsByTagName('li');

		for (j = 0; j < subSections.length; j++)
		{	 
			var content = Element.getElementsByClassName(subSections[j], 'content')[0];
			
			if (content.scrollHeight > tallestHeight)
			{
				tallestHeight = content.getHeight();
			}
		}
		
		for (j = 0; j < subSections.length; j++)
		{
			var content = subSections[j].getElementsByClassName('content')[0];
			content.style.height = tallestHeight + 'px';
		}
	}
}