SOS: Calling JavaScript Function from Flash to return a value

Hello!

I would like to call a JavaScript Function stored in <head> tag of HTML from Flash.

I would like it to execute the whole function and return the value. I am unable to decipher how to do it.

I am putting all the code below.

The JavaScript Function in HTML:
<script>
var buildInfo="";
var name="";
var majorVersion="";
var minorVersion="";
var label="";
var buildName="";
function getBuildInfo(){debugger;
var theUrl = pxReqURI+ “?pyActivity=@baseclass.GetXMLAboutScreen”;
var strBuildInfoXML = httpRequestAsynch(theUrl);
var objXml = new ActiveXObject(“microsoft.xmldom”);
objXml.async = false;
objXml.loadXML(strBuildInfoXML);
buildInfo = objXml.selectSingleNode("//aboutInfo");
name = buildInfo.selectSingleNode(“name”).text;
majorVersion = buildInfo.selectSingleNode(“majorVersion”).text;
minorVersion = buildInfo.selectSingleNode(“minorVersion”).text;
label = buildInfo.selectSingleNode(“label”).text;
buildName = buildInfo.selectSingleNode(“buildName”).text;
}
</script>

The Code I used in Flash:
onClipEvent (load) {
getURL(“javascript:getBuildInfo(’”"’)");
txt.HTMLtext=name+" “+majorversion+”."+minorversion+" “+label+”<br>"+buildname;
}

What I want to do is take the values generated from JavaScript and display them in Flash, but it doesnot seem to work.

Please help me out… need this code solved badly today… Your help will be highly regarded