Have you ever noticed that Slashdot has a cool little feature that lets you adjust your comment threshold to filter out down-modded comments? When you scroll to the top of the page, it stays in one place, but as you continue scrolling down, it eventually switches to a fixed position and stays on your screen. (Check out an example here.)
So, my question is, how can I achieve the same effect of having a menu stay in one place when scrolled up and switch to a fixed position as the user scrolls down? I know that it will involve a combination of CSS and javascript. I'm not necessarily looking for a complete code example, but rather an explanation of the steps my code will need to take. Can you help me out?