JComments JavaScript test optimization.

JavaScript code moved to template header. Result sets via cookies.