Javascript and action script buttons

Ok Im trying to use flash to call up a java script window I have two buttons to open 2 different windows on the same page but the problem is for some reason only one link is opened by the two buttons. Each button opens the montage link any help as to why the mogo button dosn’t open the right link? Below is all my code

<----------My flash code for the buttons----------->

on (press) {
getURL(“javascript: makeNewWindow() ;if (montage !=null) montage.focus();”);
}

on (press) {
getURL(“javascript: makeNewWindow() ;if (mogo !=null) mogo.focus();”);
}

<-----My Java Script in the page Head----------->

<script LANGUAGE=“Javascript”>
<!-- Beginning of JavaScript -
function makeNewWindow() {
mogo=
window.open(‘http://www.angelfire.com/ab7/starfield/mogo_300k.mov’,‘MotionGraphics’,'resizable,height=400,width=200,scrollbars=yes,top=60,left=60’)
newWindow.focus()
}
function makeNewWindow() {
montage=
window.open(‘http://www.angelfire.com/ab7/starfield/montage_300k.mov’,‘Montage’,'resizable,height=400,width=200,scrollbars=yes,top=60,left=60’)
newWindow.focus()
}

// - End of JavaScript - -->
</SCRIPT>

Both javascript functions are named the same. Make the second one something like makeNewWindow2 and call that from flash instead.

I thought the javascript had to be in the <head> tags of the page. I’ll try putting it in the flash thanks.

or you mean just rename on in flash…

No, the javascript needs to be in the page. The problem is that you named both javascript functions the same- you need to rename one.