Javascript applet engine