Nada tiene que ver en este asunto javascript. La unidad del height ponla en porcentaje (%) y al bloque le asignas la propiedad position: absolute;
Código CSS:
Ver original#lateral{
width: 18%;
background-color: #ffffcc;
padding: 1%;
overflow: auto;
height: 50%;
float: left;
position: absolute;
}