get root URL in javascript
<p>is there a really easy way to turn document.location.href=="http://aaa.bbb.ccc.ddd.com/asdf/sadf/asdf/asdf/asdf/sadf.aspx?blah" into 'aaa.bbb.ccc.ddd.com'?</p>

<p>There's gotta be a JS function that does this reliably, but I can't find it.</p>
