Added JavaScript to handle check all checkboxes