<input type="checkbox" name="test" value="" onchange = "if ( this.checked ) {this.nextElementSibling.checked = true;} else {this.nextElementSibling.checked = false;}" /><input type="checkbox" name="test1" value="" />
<input type="checkbox" name="test" value="" onchange = "this.nextElementSibling.checked = this.checked;" /><input type="checkbox" name="test1" value="" />