Java and JavaScript are two entirely different things. JavaScript is a scripting language for the internet, Java is a full-fledged interpreted programming language for all kinds of programs. JavaScript is an unfortunate misnomer.
Why don't you post the source code of the script here and tell us what the problem is?