set height div javascript
<p>I'm adjusting the height of the box with no problems, now I would like to adjust the height of the box grabbing the top handle and adjust height but upwards. What would be a good way of doing this? thanks </p>

<p>(current downwards code)</p>

<pre><code>var mY = event.clientY; 
var originalHeight = parseInt(document.getElementById('somediv').style.height);

if(click == 1){ // down
            var sY = event.clientY; 
            var finalHeight = originalHeight +sY-mY;
            document.getElementById('somediv').style.height=finalHeight + 'px';
}else{ // up
    resize upwards instead of downwards....
}
</code></pre>
