always keep the window in the center when move the scroll bar
<p>I am trying to built a window located in the center of the screen and when I scroll down it will always be in the center, I have tried the follwing code:</p>

<pre><code>  &lt;style&gt;
  #Window {
 display: none;
 text-align: center;
 border: 1px solid #333;
  position:absolute;
  width: 200px;
  height: 80px;
  z-index:9999;
  background:#fff;
  border-radius: 5px;
  padding: 10px;
     }
  &lt;/style&gt;

  &lt;script&gt;
      $("#window").css('top', 200);
     $("#window").css('left', winW/2- $("#window").width());
   $(window).scroll(function () { 

         var winH = $(window).height();
          setTimeout( function(){
   $('#alertWindow').animate({'top':winH/2-$("#window").height()/2},200);
 }, 1000);
      });     
  &lt;/script&gt;

 &lt;div id="window"&gt;this is scroll window&lt;/div&gt;
</code></pre>

<p>The problem is that when I scroll down, the window moves to the center at the first time which works, but when I scroll again, it won't keep moving to the center, I think the scroll function is only called once, how can I keep the window move constantly to the center of the creen  when I scroll down or up, any one could help me with that, sorry if I did present the whole code.</p>
