Hi --
If you want to use JavaScript, you'll probably have to change the form's programming language first. Under Tools/Form Options select Programming in the left hand pane. You can change the form template code to JScript, VBScript, C#, etc.
To open the Script Editor (or VSTA if you choose to use C# or VB), look under Tools/Programming. If you are not commited to JScript, I would really strongly encourage you to try managed code, particularly C#. You can find more examples of InfoPath 2007 programming for C# than VB, and VSTA is a good tool to work in.