Yeah, you have a prob - read your logic:
If I have clicked the mouse,
If panel is inactive set it to active
If I have clicked the mouse,
If panel is active (which it now is!) make it inactive.
Try setting up your logic using an ELSE clause:
If I have clicked the mouse,
If panel is inactive set it to active
ELSE
set it to inactive
It seems from the above code that you will be ok to run with this, but if not let me know and I'll code it for you!
Hope this helps!
"You get what everyone gets, you get a lifetime!" - Death, The Sandman Library
First you Dream, then you ... - Neil Gaiman, 2001