Update encode.js from source
Correct fix for list-calc.js

Note: Still a problem in calc.php to fix, plus add minified versions.