How to pass query variables to swfobject?

Hi, please help me with this issue:
How can I pass the query variable string like this:

http://www.mysite.com/index.html?var1=value&anothervar=value&other=value

into swfoject:

<script type="text/javascript">
   var so = new SWFObject("movie.swf", "mymovie", "400", "200", "8", "#336699");
   so.addVariable("variable1", getQueryParamValue("variable1")); // This is static which doesn't help, I want it to be dynamic!!!
   so.write("flashcontent");
</script>

‘addVariable’ is a static method and it doesn’t help when users add dynamic query string in the url. I want a solution to pass every value of the query string to ‘addVariable’ dynamically.
How can I do that?
Thanks!!!