ported to jquery cgi for report error
more js code from dashobard proted to prototype