SLameN,
<!DOCTYPE HTML>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<script type="text/javascript">
function checkAllOne(Element, checkboxName, varChecked) {
var tablinks = Element.querySelectorAll('[name="'+checkboxName+'"]');
for (var i = 0, j = tablinks.length; i < j; i++) {
tablinks[i].checked = varChecked;
}
}
</script>
</head>
<body>
<input type="checkbox" name="total" onClick="checkAllOne(this.nextElementSibling,'phone[]',this.checked)" />Выбрать все
<div id='one'>
<input type='checkbox' name='phone[]' />
<input type='checkbox' name='phone[]' />
<input type='checkbox' name='phone[]' />
</div>
<input type="checkbox" name="total" onClick="checkAllOne(this.nextElementSibling,'phone[]',this.checked)" />Выбрать все
<div id='two'>
<input type='checkbox' name='phone[]' />
<input type='checkbox' name='phone[]' />
<input type='checkbox' name='phone[]' />
</div>
</body>
</html>