merge table rows by javascript