A javascript implementation of the chango