private void dockPogWindow()
    {
        if (!b_pogWindowDocked) // dock the pog window
        {
            if (pogWindow != null)
            {
                pogWindow.setVisible(false); // hide the undocked window
            }

            pogWindow.getContentPane().remove(m_pogsTabbedPane);
            // remove panels depending on whether the chat window is docked or undocked
            if (b_chatWindowDocked)
            {
                GametableFrame.getGametableFrame().getContentPane().remove(m_mapChatSplitPane);
            }
            else
            {
                GametableFrame.getGametableFrame().getContentPane().remove(m_canvasPane);
            }
            // re-add the panels
            GametableFrame.getGametableFrame().getContentPane().validate();
            GametableFrame.getGametableFrame().getContentPane().validate();
            GametableFrame.getGametableFrame().m_mapPogSplitPane.add(m_pogsTabbedPane, JSplitPane.LEFT);
            if (b_chatWindowDocked)
            {
                GametableFrame.getGametableFrame().m_mapPogSplitPane.add(m_mapChatSplitPane, JSplitPane.RIGHT);
            }
            else
            {
                GametableFrame.getGametableFrame().m_mapPogSplitPane.add(m_canvasPane, JSplitPane.RIGHT);
            }
            GametableFrame.getGametableFrame().getContentPane().add(m_mapPogSplitPane, BorderLayout.CENTER);
            GametableFrame.getGametableFrame().getContentPane().validate();
            repaint();

            b_pogWindowDocked = true;
        }
        else // undock the pog window
        {
            if (pogWindow == null) // create a window for the undocked panel
            {
                pogWindow = new JFrame();
                pogWindow.setTitle("Pog Window");
                pogWindow.setSize(195, 500);
                pogWindow.setLocation(0, 80);
                pogWindow.setFocusable(true);
                pogWindow.setAlwaysOnTop(false);
            }
            pogWindow.setJMenuBar(getNewWindowMenuBar());

            // remove and add panels depending on wether the chat panel is docked or undocked
            GametableFrame.getGametableFrame().getContentPane().remove(m_mapPogSplitPane);
            if (b_chatWindowDocked)
            {
                GametableFrame.getGametableFrame().getContentPane().remove(m_mapChatSplitPane);
            }
            else
            {
                GametableFrame.getGametableFrame().getContentPane().remove(m_canvasPane);
            }
            GametableFrame.getGametableFrame().getContentPane().validate();
            if (b_chatWindowDocked)
            {
                GametableFrame.getGametableFrame().getContentPane().add(m_mapChatSplitPane, BorderLayout.CENTER);                
            }
            else
            {
                GametableFrame.getGametableFrame().getContentPane().add(m_canvasPane, BorderLayout.CENTER);
            }
            GametableFrame.getGametableFrame().getContentPane().validate();
            repaint();
            pogWindow.getContentPane().add(m_pogsTabbedPane);
            pogWindow.setVisible(true);

            b_pogWindowDocked = false;
        }
    }