Added basic Javascript code to compute summary results.