I figured out my problem. I was using MooTools 1.3.2 which has a variable call this.Document which is interfering with the java applet. Since javascript is case sensitive this.document doesn't cause a conflict. For some reason that variable in javascript effects java applets. Just found some one posting a bug report about it by pure chance. I switched to MooTools 1.2.5 which doesn't have the variable and it works.