Trying to toggle / slide panel in page

Trying to toggle / slide panel in page

Hi there. I'm trying to make a sliding panel that a user can hide (slide to the left) and show when she chooses. The effect is demonstrated on these sites.
<ul><li><a href="http://www.atlanticbt.com" target="_blank">http://www.atlanticbt.com</a> ( toggle sliding pane by "site tools" rope at the top-right side of the page ) </li>
<li><a href="http://maps.google.com" target="_blank">maps.google.com</a> ( toggle sliding pane by chevron in the left panel ) </li></ul>
I have the beginnings of something that can slide out. And also, the content around ( to the right of ) the panel re-sizes
according to the panel's state ( see
attached file ). But I still need to be able to:
<ul><li>set a control variable to know whether to slide in or slide out </li><li>have my control ui element i) follow the panel in the slide, but also ii) remain visible for when the user wants to toggle the view</li>
</ul>
Thanks for any help
Tim
ps - also, I'm finding that the easing / animation disappeared . So now the panel just jumps from on/off. Don't know how that happened, but the problems abouve take priority. Thanks.