URI Parsing with JavaScript