There's no such thing as "JAVA script." Pop-up ads are written in the "JavaScript" language, which is run directly by the client (not the Java VM) and is not related to Sun's Java in any way. JavaScript was originally called "LiveScript", but for some reason Netscape decided to confuse millions of people for years to come by giving the language a name that implied it was something that it wasn't.
Blame Netscape for the name. If you don't like JavaScript, blame both Netscape and Microsoft for including it in their browsers.