sxdesign, Thanks for the help that all makes sense but it isn't passing anything. The function returns a number and I am trying to get it into Flash.

<OBJECT
ID="MySWF">
<PARAM NAME="MOVIE" VALUE="flash_home.swf?docWidth="+<script language="JavaScript">
document.write(getDocWidth());
</script>>
<EMBED
NAME="MySWF"
SRC="flash_home.swf?docWidth="+<script language="JavaScript">document.write(getDocWidth() ); </script>
swLiveConnect="true"
</EMBED>
</OBJECT>