Browser Window Height and Width


I’m working on a site for a client :

When the contact button is clicked, the contact pane is scrolled downwards.

However, for lower screen resolutions or when the browser’s window is being resized, the contact pane is not shown completely.

I got this little javascript which assigns the browser’s measurements to 2 variables :

<script language="JavaScript">
var winW = 630, winH = 460;
if (parseInt(navigator.appVersion)>3) {
 if (navigator.appName=="Netscape") {
  winW = window.innerWidth;
  winH = window.innerHeight;
 if (navigator.appName.indexOf("Microsoft")!=-1) {
  winW = document.body.offsetWidth;
  winH = document.body.offsetHeight;

How can I pass these variables to Flash?

Also, I’ld want Flash to know when the browser is being resized, so the contact pane can be repositioned if necessary.

Bottomline : I need these two variables in Flash and I want Flash to ‘listen’ to them - to know if they change …

Thnx in advance,