writing URL variables into flash embed script

Hi, I have the following two scripts.  The first retrieves a url variable, the second is the flash embed script.  I need to retrieve the "id" value from the URL string and place that in the flash embed script in two locations.  Any ideas?

<SCRIPT type=text/javascript>
function get(name) {
      var q = unescape(location.search.substring(1)).split(/[=&]/);
      for (var j=0; j<q.length; j+=2) {
            if (q[j] == name) {
                  return q[j+1];
            }
      }
      return "";
}
</SCRIPT>


<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="500" height="300">
  <!--slideshow-->
  <param name="movie" value="/content/images/slideshow/slideshow.swf">
  <param name="quality" value="high">
  <param name="wmode" value="window">
  <param name="flashvars" value="xml=/content/images/slideshow/[id from url string goes here].xml">
  <embed src="/content/images/slideshow/slideshow.swf" width="500" height="300" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="window" flashvars="xml=/content/images/slideshow/[id from url string goes here].xml"></embed>
</object>
seamusseamusAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ZvonkoSystems architectCommented:
Does this work for you:

<html>
<head>
<title>Zvonko &#42;</title>
<SCRIPT type=text/javascript>
function get(name) {
     var q = ("&"+location.search.substr(1)).split("&"+name+"=");
     if(q.length>1){
       return (q[1]+"&").split("&")[0];
     } else return "";
}
</SCRIPT>
</head>
<body>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="500" height="300">
  <!--slideshow-->
  <param name="movie" value="/content/images/slideshow/slideshow.swf">
  <param name="quality" value="high">
  <param name="wmode" value="window">
<script>
document.write('\
  <param name="flashvars" value="xml=/content/images/slideshow/'+get('id')+'.xml">\
  <embed src="/content/images/slideshow/slideshow.swf" width="500" height="300" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="window" flashvars="xml=/content/images/slideshow/'+get('id')+'.xml"></embed>');
</script>
</object>
</body>
</html>

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
seamusseamusAuthor Commented:
it didn't work exactly as you had it, but this gave me the starting point i needed to get it done... here's what worked:

<script language="JavaScript">
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http');
document.write('://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0');
document.write(',0,0" width="500" height="300">  <!--slideshow-->  <param name="movie" ');
document.write('value="/content/images/slideshow/slideshow.swf">  <param name="quality" v');
document.write('alue="high">  <param name="wmode" value="window">  <param name="flashva');
document.write('rs" value="xml=/content/images/slideshow/'+get('id')+'.xml">  <em');
document.write('bed src="/content/images/slideshow/slideshow.swf" width="500" height="300" ');
document.write('quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" ty');
document.write('pe="application/x-shockwave-flash" wmode="window" flashvars="xml=/content/i');
document.write('mages/slideshow/'+get('id')+'.xml"></embed></object>');
</script>

ZvonkoSystems architectCommented:
Thanks for feedback.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.