parse querystring with javascript

at some point in time i had to parse a querystring with js. so i named it after PHP’s parse_url() of course, split it at the &, and returned an array.

here’s how you would call it assuming you had a querystring variable named “id”: