Javascript - UrlParts in javascript