How to find 3rd part of location pathname?
<p>I want to get 'second' in the following sample web address. </p>

<p><a href="http://www.mywebsite.com/first/sedond/third.html" rel="nofollow">http://www.mywebsite.com/first/sedond/third.html</a></p>

<p>"first" can be any length. i.e. contact, images etc</p>

<p>If I use document.location.pathname, I get "/first/sedond/third.html".
If I use document.location.pathname[1], I get "f".</p>

<p>How can I get "first" part by using document.location.pathname?</p>

<p>Thanks in advance.</p>
