javascript crossbrowser determine if user scrolld to the bottom of page
<p>Hello how could i get in <strong>Javascript</strong> <em>(no Jquery)</em> an alert when the user got to the bottom of the page?
i tried based on another example here something like this but no success.</p>

<pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
&lt;title&gt;Untitled Document&lt;/title&gt;

&lt;/head&gt;

&lt;body&gt;

&lt;div  id="bla" style="width:145px;"&gt;

 long text here

&lt;/div&gt;
&lt;script type="text/javascript"&gt;
var obj = document.getElementById("bla");
debugger;

if( obj.scrollTop == (obj.scrollHeight - obj.offsetHeight))
{
    alert("down");
};

&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
