javascript checkbox select all

Here is the javascript code for checking all the checkboxes inside an html document.