

function adjustDivHeights(num_cols){



	var max_height = 0;

	var cols = new Array();

	var heights = new Array();

	var divs = new Array();





	if(num_cols == 3){

		divs[0] = "leftcontent";

		divs[1] = "centercontent_three";

		divs[2] = "rightcontent";

		

	}else if(num_cols == 2){

		divs[0] = "leftcontent";

		divs[1] = "centercontent_two";

		

	}else{

		divs[0] = "centercontent_one";

	}

	



	//Get handle on divs

	for(var i=0; i < num_cols; i++){

			cols[i] = document.getElementById(divs[i]);

	}

	

	if (num_cols == 1){	

			if(cols[0].offsetHeight){

				heights[0] = cols[0].offsetHeight;

			}

			else if(cols[0].style.pixelHeight){

				heights[0] = cols[0].style.pixelHeight;

			}

			if(heights[0] < 350){

				max_height = 350;

			}



	}else if (num_cols >= 2){	

		//Get max height of three divs

		for(var j=0; j < cols.length; j++){

		

			if(cols[j].offsetHeight){

				heights[j] = cols[j].offsetHeight;

			}

			else if(cols[j].style.pixelHeight){

				heights[j] = cols[j].style.pixelHeight;

			}

			max_height = Math.max(heights[j], max_height);

		}

		

		max_height += 50;

		

		if (max_height < 350){

			max_height = 350;

		}

	

		//Equalize all divs to max div

		for(var k=0; k < divs.length; k++){

			cols[k].style.height = max_height + "px";

		}

//alert("max_height = " + max_height);	

		//Add 1px to center column for spacing

		//max_height2 = max_height + 1;

		//document.getElementById(divs[1]).style.height = max_height2 + "px";

	}
}