J2ME implementation in JavaScript