vladislav.blinov,
<!DOCTYPE HTML>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
a{
margin-left: 10px
}
</style>
</head>
<body>
<table>
<tr class="date_01_07_2013"><td>01.07.2013</td></tr>
<tr class="dt01_07_2013">
<td>имя</td>
<td>фамилия</td>
</tr>
<tr class="dt01_07_2013">
<td>имя</td>
<td>фамилия</td>
</tr>
<tr class="dt01_07_2013">
<td>имя</td>
<td>фамилия</td>
</tr>
<tr class="date_31_07_2013"><td>31.07.2013</td></tr>
<tr class="dt31_07_2013">
<td>имя</td>
<td>фамилия</td>
</tr>
<tr class="dt31_07_2013">
<td>имя</td>
<td>фамилия</td>
</tr>
<tr class="dt31_07_2013">
<td>имя</td>
<td>фамилия</td>
</tr>
</table>
<script>
for (var a = document.getElementsByTagName("TR"), b = 0; b < a.length; b++) {
var d = a[b],
e = d.className;
if (/^date_/.test(e)) {
var e = e.replace("ate_", "t"),
f = document.createElement("a");
f.appendChild(document.createTextNode("\u0441\u043a\u0440\u044b\u0442\u044c"));
d.cells[0].appendChild(f);
f.href = "#";
f.onclick = function (g) {
return function () {
this.textContent = this.textContent == "\u0441\u043a\u0440\u044b\u0442\u044c" ? "\u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c" : "\u0441\u043a\u0440\u044b\u0442\u044c" ;
for (var c = 0; c < a.length; c++) g == a[c].className && (a[c].style.display = "none" != a[c].style.display ? "none" : "table-row");
return !1
}
}(e);
f.onclick()
}
};
</script>
</body>
</html>