How to parse a query string using Javascript

So at my job, our Google Appliance server needed a reboot, and was going to run fsck on its next startup. This would take anywhere from 5 minutes to 6 hours. So I had to write a quick script to live in the Google Appliance server's spot during this outage which would redirect all searches to Google and put in the text 'site:www.example.com'.

There was a great article on how to parse query variables from a URL over at a blog called Idealog.

Just figured I'd post a link-back since I found it so useful :) Thanks, Jeff!