Type /fstack into your chat frame and then mouseover the button. This will tell you the name of the button. (Type /fstack again to turn this feature off.) Then use this button name as the parent to the kgPanel you wish to show/hide along with it.
No script needed.