in reply to OT: Javascript redirects

Your title says "Java", but later on you talk about "JS", so I figure you want a JavaScript example. Funny ... Google showed me this URL rather easy. And it seems it's like what you want :)

Update: changed the title, now that the original post makes more sense.
--
B10m