<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>blank</title>
<script type="text/javascript" src="scripts/base.debug.js"></script>
<script type="text/javascript">
var allNext = function(elem) {
if (elem) {
var result = [], i = 0;
while (elem = elem.nextSibling)
if (elem.nodeType == 1) result[i++] = elem;
return result;
}
}
var sh = function() {
var elems = allNext(this), i = elems.length;
while (i) elems[--i].style.display = elems[i].style.display == 'none' ? '' : 'none';
};
window.onload = function() {
document.getElementById('t1').onclick = sh;
};
</script>
</head>
<body>
<table width="100%" cellspacing="0" cellpadding="0" border="1">
<tr id="t1">
<td>
текст1
</td>
</tr>
<tr>
<td>
текст2
</td>
</tr>
<tr>
<td>
текст3
</td>
</tr>
</table>
</body>
</html>