Forum Moderators: open
I don't consider a quick redirect to be a form of cloaking, but it is definitely proscribed by Google. They don't like it a bit.
There are ways to obfuscate the JavaScript, but Google is getting a lot smarting about figuring that sort of thing out, and if they ever have an editor take a look at the page it will be immediately obvious as spam.