An URL utility for javascript