Loading js vars into flash

[color=navy]hello i got this for my js:[/color]

 
SCRIPT LANGUAGE=JavaScript>
<!--
document.write ("width="+screen.width+"height="screen.height)
//-->
</SCRIPT> 

[color=navy]and i have this in the Actions of a movie clip inside the swf[/color]

 
onClipEvent (load) {
 _root.navigation._alpha=0;
}
onClipEvent (enterFrame) {
 loadText = new LoadVars();
 loadText.load("main.html");
 loadText.onLoad = function() {
 height.text = this.heightY;
 }
 _root.navigation._y = this.heightY - 100;
}

whats this supposed to do? well, its suppose to get the current height of the window and then sending the var to the swf, after it to movieclip inside the swf should get the vars from the html document and to start the var “heightY”, it is not working, so i tried this:

 
<SCRIPT LANGUAGE=JavaScript>
<!--
   var htmlY = (!document.all)?
 window.innerHeight:document.documentElement.offsetHeight;
 document.myFlash.SetVariable('navY', htmlY)
 window.document.myFlash.SetVariable("navY", htmlY)
//-->
</SCRIPT> 

and also this:

<SCRIPT LANGUAGE=JavaScript>
<!--
   var htmlY = document.write.screen.height
   document.myFlash.SetVariable('navY', 'screen.height')
   window.document.myFlash.SetVariable("navY", sendText)
//-->
</SCRIPT> 

so, the code for the movie clip would look like this:

 
onClipEvent (enterFrame) {
 _root.navigation._y = navY-100;
 }

not working…

could someone be so patient and kind of helping me out? ^^’

I’ve been working on this for a while, and i have too much coke and coffee on my veins right now x.x

i beg of you, in the name of flash, help me… u.u