How do I get an id from url?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/979975/how-to-get-the-value-from-url-parameter">How to get the value from URL Parameter?</a>  </p>
</blockquote>



<p>I have a URL <a href="http://foto.site.ru/photos/5062d95d-13e8-ceb8-bb35-5891b62a3418/?id=872364876" rel="nofollow">http://foto.site.ru/photos/5062d95d-13e8-ceb8-bb35-5891b62a3418/?id=872364876</a>
And I have javascript code:</p>

<pre><code>if(sssssssssss){
  window.location = "http://site.com/s/1525";
}
else
{
    location.replace('http://site.ru/id=');
}
</code></pre>

<p>I need to feel id in ELSE section. Any ideas?</p>
