Uri and query string manipulation in javascript.