return folders from url
<p>I  am looking to write a piece of javascript that will do the following:</p>

<p>Look at current url and return any folders in the url ie:</p>

<p><a href="http://localhost/folder1/page.aspx" rel="nofollow">http://localhost/folder1/page.aspx</a> returns -> /folder1/</p>

<p><a href="http://localhost/page.aspx" rel="nofollow">http://localhost/page.aspx</a> returns -> /</p>

<p>Any help?</p>
