Converting Calypso to Javascript

Changed summariser.php to summariser.js and changed it line-by-line.
Attempt #1 - untested.
Changed the demo code. Fixed to partially work.

Still lots of bugs
Working condition

Working decently, with small changes (like taking care of decimal
points)