JavaScript code for PE problem 327 added.