function checkAllOrders(checkall) {
    // Loop through all checkboxes in this form.
    var form_id = checkall.form.id;
    var checkboxes = jQuery('#' + form_id + ' input[type=checkbox]');
    for (var i = 0; i < checkboxes.length; i++) {
        // Is this a bulk action checkbox?
        if (checkboxes[i].name.match(/-action_checkbox$/)) {
            if (checkall.checked) {
                checkboxes[i].checked = true;
            }
            else {
                checkboxes[i].checked = false;
            }
        }
    }
    return true;
}