All right there's a lot of things that are probably causing you problems here. First of all, you say it's running the function automatically without sending any arguments. If you look at the code you posted, after the function definition, it executes the line
which does exactly that: runs the function without any arguments. If you don't want the function to execute automatically, either change the line to read document.write(vType) and put it in the function instead of return vType; or else just remove it and call the function when you need it with
using whatever arguments you want to give the function.
Also your code you specified...
should have src= in front of "EngMenu.js" and should be like this:
The language attribute of the script tag has been replaced by the type attribute; it is still supported but if you are going to write your code according to the newest specs you should use the type attribute instead. Eventually you may find that the language attribute is dropped altogether and it would be better if all of your pages already used the type attribute.