Select all/ deselect all functionality using jQuery
selectAll = function(name) {
var $el = $('[name="'+ name +'"]');
$el.filter(':checkbox').attr('checked', 'checked');
$el.filter('select').children('option').attr('selected', 'selected');
}
deselectAll = function(name) {
var $el = $('[name="'+ name +'"]');
$el.filter(':checkbox').removeAttr('checked');
$el.filter('select').children('option').removeAttr('selected');
}