Given a string containing an absolute URL with a querystring parameter, what is the easiest way to replace the value of the parameter using JavaScript and/or MooTools?
e.g.
// Change this
'/foo/bar?frob=123456789'
// Into this
'/foo/bar?frob=abcdefg'
EDIT
The URL is not the location
of the current window. It is a variable containing a string. I just want to manipulate this string.