Imagine that you are reading a web page and you feel the need to use a calculator. You move your mouse pointer to the edge of the web page and a calculator appears from that edge. Imagine that you are reading a web page and you feel the need to put information in the message box (small form); you move your mouse pointer to the edge of the page and the message box appears. I like this scenario. If you do as well, keep reading and you'll learn how to make it a part of your web site.
So there is a possibility that you may be reading a web page; you move your mouse pointer to an edge of the window, and a windowpane of interest appears from the edge. Let us complete this scenario by saying that when you click outside the pane on the BODY element, the pane will go back into the edge.
When the mouse pointer reaches an edge, the pane should scroll by itself into the page, from the point where the mouse pointer met the edge. The scrolling should stop as soon as the end of the pane is at the edge.
When the user clicks on the BODY element outside the pane, the pane should scroll back into the edge.