modified addGroup template and CGI to use JS to jhave normal dialog behavior