Ah. Yes, I was afraid of that. Thanks, Otto42, for the info.
Hm... it's obviously not working in some browsers, though (for me in particular, it was FF 2 and IE6 for which I tested)... guess we need to dig deeper.
There's definitely something wrong, but my solution is not ideal - it's a dirty hack to make it work for some browsers. I'm certainly open to suggestions as to how to fix the manual parsing (instead of using the COOKIE array)... need to do more diagnosing...