display div according to scrolbar location
<p>I want to display a pop up window (div) using jquery animate ('top' and 'left' according to the user loaction )</p>

<p>I want this popup (top position)  to be display according to the user location in the page(if the user scroll down the page ,the poup will be display in the user's location on this page)</p>

<p>I tried to take the mouse coordinates,in firefox it works fine, since the location of the mouse is absolote to the top of the screen,but in IE the coordinate of the mouse is relative to the top of the screen where the user's location is.</p>

<p>this is the code for taking the mouse coordinate </p>

<pre><code>function getMouseXY(e) {

if (IE) { // grab the x-y pos.s if browser is IE
tempX = event.clientX + document.body.scrollLeft;

tempY = event.clientY + document.body.scrollTop;

} else { // grab the x-y pos.s if browser is NS
tempX = e.pageX;
tempY = e.pageY;
}
// catch possible negative values in NS4
if (tempX &lt; 0) { tempX = 0 }
if (tempY &lt; 0) { tempY = 0 }
</code></pre>

<p>}</p>

<p>How can I use the animate top and left, relative to the user location in IE?</p>

<p>Thanks for any help</p>
