New javascript version of DND1