I have been developing websites in ASP and VBScript for several years. However, I a planning a website that may work better if programed in a different language. I am considering a client side language to save server resources. In particular, I am trying to decide whether to use JavaScript, Java, or both. Either way I'll have to learn a new language. I want to make sure I learn the right one.

The site I am planning is "math intensive" and will compute various statistics functions. I can program these functions in JavaScript but I would also like to add graphics such a line plots and scatterplots to the website. I think Java is the eaiest way to add the graphics. Here are my questions: (1) Can I pass variables between JavaScript and Java?" (2) If yes, then how? For example, if I have JavaScript code that computes values, how would I send the values to Java for graphing? (3) would it be better to only use Java and foget the Javascript?

Thanks,
Patrick