a lottery by javascript