>plz guide me
1. The dayz l33t sp33k rulez are long ago, and nowadays it is only used by people who want to appear 'hip' and 'kool' -- with transverse results.
2. ... your question appears to be, "How can I write an extremely complex program in Javascript". Practice, practice, practice.
Compare it to "Photoshop is software where you can work with images. InDesign can read images. Ergo, it should be possible to write Photoshop in Javascript for InDesign. Please give me the code."