if its a client side script, you can just use wind...
# suitescript
r
if its a client side script, you can just use window.location