function matchColumns(id, num)
{  
	var maxHeight = 0;
	// find the maximum height of all the feature boxes
	for(i = 0; i < num; i++)
	{
		tempID = id + i;
		e = document.getElementById(tempID);
		h = getDivHeight(e);
		maxHeight = Math.max(h, maxHeight);
	}
	// set all the feature boxes to the max height
	for(i = 0; i < num; i++)
	{
		tempID = id + i;
		e = document.getElementById(tempID);
		e.style.height = maxHeight + 'px';
	}
}

function getDivHeight(d)
{
	var divHeight;
   	if(d.offsetHeight) { divHeight=d.offsetHeight; }
  	else if(d.style.pixelHeight){ divHeight=d.style.pixelHeight;}
  	return divHeight;
} 

function checkLoad()
{
	//if (window.onLoad)
	if(document.getElementById('numFeatures'))
	{
		var numFeatures = parseInt(document.getElementById("numFeatures").innerHTML);
		matchColumns('feature', 6);
	} else {
		setTimeout('checkLoad()', 500);
	}
}

checkLoad();



