// Resize Divs

function getPreviousDiv(el) {
	while (el.tagName != 'DIV')
		el = el.previousSibling;
	return el;
}

function calcBoxHeight(ele) {
	korrekturfaktor = 0;
	aktObj = document.getElementById(ele);
	if (aktObj == null) return;
	divList = aktObj.getElementsByTagName('div');
	ergList = new Array();
	for (i=0; i<divList.length; i++)
		if (divList[i].className.indexOf('calcHeightChild')!=-1) ergList.push(divList[i]);
	ergHeight = 0;
	for (i=0; i<ergList.length; i++) 
		if (ergList[i].scrollHeight > ergHeight)
			ergHeight = ergList[i].scrollHeight + korrekturfaktor;
	for (i=0; i<ergList.length; i++)
		ergList[i].style.height = ergHeight+'px';
}

