The javascript method definitely scales better than an extra request to the server.
Is this foo.com site related to your cookie situation with a foo.com site discussed at https://openacs.org/bboard/q-and-a-fetch-msg.tcl?msg_id=0005yk&topic_id=11&topic=OpenACS?
I'm curious if a javascript generated top-frame works with the cookie issue for IE. Please post for doc reasons... as I'm sure that frames and javascript issues will become more popular as ACS does too.