Write a JavaScript program for an HTML form containing checkboxes that enables the user to check or uncheck all boxes.