JavaScript movemaker