function showDemo ( curDiv, maxHeight ) {
	var height = document.getElementById(curDiv).offsetHeight;
	if ( height < maxHeight ) var direction = "add";
	if ( height >= maxHeight ) var direction = "sub";
	growshrink = setInterval ( "changeHeight( \"" + curDiv + "\", \"" + direction + "\", " + maxHeight + ")", 15 ) ;
}

function changeHeight ( theDiv, dir, maxH ) {
	var targetDiv = document.getElementById(theDiv);
	var height = targetDiv.offsetHeight;
	if ( height < maxH && dir == "add" ) {
		if ( ( height + 5 ) > maxH ) {
			targetDiv.style.height = maxH + "px";
		} else {
			targetDiv.style.height = ( height + 5 ) + "px";
		}
	} else if ( height > 0 && dir == "sub" ) {
		if ( ( height - 5 ) < 0 ) {
			targetDiv.style.height = "0px";
		} else {
			targetDiv.style.height = ( height - 5 ) + "px";	
		}
	} else {
		
		clearInterval ( growshrink ) ;	
	}
}
