sonntagausgang,
Вариант...
<!DOCTYPE HTML>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="http://sonntag.besaba.com/style.css">
<script>
document.onclick = function (e) {
var target = e && e.target || event.srcElement;
if (target.className == "addSub") {
var parent = target.parentNode.parentNode;
indx = parent.rowIndex,
tds = parent.querySelectorAll('td');
for (var i = 1; i < tds.length - 1; i++) {
tds[i].rowSpan = ++tds[i].rowSpan
}
var tbody = parent.parentNode;
var tr = tbody.insertRow(++indx);
var td = tr.insertCell(0);
td.colSpan = "4";
td.innerHTML = "<span class='deleteSub'>[-]</span>";
while (--indx) {
td = tbody.rows[indx].cells[0]
if (td.className == "day") break;
}
td.rowSpan = ++td.rowSpan
};
if (target.className == "deleteSub") {
var parent = target.parentNode.parentNode;
indx = parent.rowIndex;
var tbody = parent.parentNode;
var tr = tbody.deleteRow(indx);
var flag = true;
while (indx) {
tr = tbody.rows[--indx];
if (tr.cells[0].className == "hiddenTd" && flag) {
flag = false;
tr.cells[1].rowSpan = --tr.cells[1].rowSpan
tr.cells[2].rowSpan = --tr.cells[2].rowSpan
};
if (tr.cells[0].className == "day") break;
}
tr.cells[0].rowSpan = --tr.cells[0].rowSpan
};
}
</script>
</head>
<body>
<table border="1" id="table"><tr>
<td>День</td>
<td>№</td>
<td>Начало</td>
<td>Подгруп</td>
</tr>
<tr>
<td rowspan="6" class="day">Понедельник</td>
</tr>
<tr>
<td class="hiddenTd"></td>
<td >1</td>
<td >9:00</td>
<td>
<span class="addSub" style="display: inline;">[+]</span>
</td>
</tr>
<tr>
<td class="hiddenTd"></td>
<td>2</td>
<td>10:45</td>
<td>
<span class="addSub" style="display: inline;">[+]</span>
</td>
</tr>
<tr>
<td class="hiddenTd"></td>
<td>3</td>
<td>13:10</td>
<td>
<span class="addSub" style="display: inline;">[+]</span>
</td>
</tr>
<tr>
<td class="hiddenTd"></td>
<td>4</td>
<td>14:55</td>
<td>
<span class="addSub" style="display: inline;">[+]</span>
</td>
</tr>
<tr>
<td class="hiddenTd"></td>
<td>5</td>
<td>16:20</td>
<td>
<span class="addSub" style="display: inline;">[+]</span>
</td>
</tr>
<tr>
<td rowspan="6" class="day">Вторник</td>
</tr>
<tr>
<td class="hiddenTd"></td>
<td >1</td>
<td >9:00</td>
<td>
<span class="addSub" style="display: inline;">[+]</span>
</td>
</tr>
<tr>
<td class="hiddenTd"></td>
<td>2</td>
<td>10:45</td>
<td>
<span class="addSub" style="display: inline;">[+]</span>
</td>
</tr>
<tr>
<td class="hiddenTd"></td>
<td>3</td>
<td>13:10</td>
<td>
<span class="addSub" style="display: inline;">[+]</span>
</td>
</tr>
<tr>
<td class="hiddenTd"></td>
<td>4</td>
<td>14:55</td>
<td>
<span class="addSub" style="display: inline;">[+]</span>
</td>
</tr>
<tr>
<td class="hiddenTd"></td>
<td>5</td>
<td>16:20</td>
<td>
<span class="addSub" style="display: inline;">[+]</span>
</td>
</tr>
</table>
</body>
</html>