Send Var from URL onLoad

I’m driving myself nuts with this one

How do I send a variable from the url (eg www.exmplesite.com/loadlocation.php?variable=home) to an embedded swf in that php?

In other words, how do I get the embedded swf to load the variable from the URL. It needs to pass it, which I’m trying to accomplish via Javascript. I just can’t figure it out.

Any ideas?