JS "Shelf"

So I’m using this shelfing system… and it’s workin how it should and but I was wondering if anyone would be so kind to help me figure out how to make it so
(a) it’s initial state is set to a specified height (which I can sorta do)
(b) when it expands it expands to the full-height
© when it collapses it collapses back down to the initial height

http://www.monfx.com/journal/2006/08/01/sliding-ajax-shelf-the-code-behind-the-mask/

Would be great if anyone can help out.