Hi Chaps

Hold tight, here's my problem and i'd welcome any suggestions!

I'm determining the screen resolution of users in javascript. Depending upon what resolution they have, the dimensions of the resulting flash movie I want them to view will be different.

I have 2 javascript variables flashWidth and flashHeight. I need them to be embedded into the html file where it specifies the flash movie properties:

 WIDTH="flashWidth Variable" HEIGHT="flashHeight Variable"
How do I put these two variables into the flash html code? do i put the entire flash html code within a document.write() command? even if so, how do i then place the flashWidth & flashHeight variables into that code since i'm already within the <embed> tag defining the flash movie. Nesting a <script> tag within that I dont think will work?

Any suggestions would be most welcome.