// JavaScript Document function setEqualHeight(columns) { var tallestcolumn = 0; columns.each( function() { currentHeight = $(this).height(); if(currentHeight > tallestcolumn) { tallestcolumn = currentHeight; } } ); columns.height(tallestcolumn); } function FitToContent(id, minHeight, maxHeight){ var text = id && id.style ? id : document.getElementById(id); if(!text) return; text.style.height = minHeight + "px"; var adjustedHeight = text.clientHeight; if(!maxHeight||maxHeight>adjustedHeight){ adjustedHeight = Math.max(text.scrollHeight, adjustedHeight); if ( maxHeight ) adjustedHeight = Math.min(maxHeight, adjustedHeight); if ( adjustedHeight > text.clientHeight ) text.style.height = adjustedHeight + "px"; } }