jquery how to check if browser tab/window the selected is on our page?
<p>How do check if a the user has the browser's tab/window currently on our page</p>

<pre><code>function userisonourpage()
{
//do something
}
</code></pre>

<p>And when a user switches the tab/window to our page ?</p>

<pre><code>function tabswitched()
{
//dom something here too
}
</code></pre>

<p>Just like in many places u switch to the page and the title changes i know the title can be changed with : <code>document.title</code>
but dont know how to implement those functions.</p>

<p>Thanks :D</p>
