function toggleMyGui(%tog)
{
	if(%tog)
		canvas.pushDialog(MyGui);
	else
		canvas.popDialog(MyGui);
}
if(!$MyGuiBound)
{
	$RemapDivision[$RemapCount] = "My Gui Category";
	$RemapName[$RemapCount] = "Open My Gui";
	$RemapCmd[$RemapCount++-1] = "toggleMyGui";
	$MyGuiBound = 1;
}
K thank you,  I also have one more problem. When ever I load my gui, and try to drag it  around, the button just stays in one spot, it  doesn't move with my gui window. if I try to move it back to it's place, instead the button goes behind it.