A javascript fuzzy logic controller implementation