URL parsing in javascript.