JavaScript clone of EGA Trek