Пенсионер,
смутно вас понимаю ...
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Название</title>
<style type="text/css">
.sub {
visibility: hidden;
display: none;
}
</style>
<script>
function CLOP(subName) {
var el = document.getElementById(subName),
img = document.getElementById("img" + subName);
if (el.style.visibility != "visible") {
el.style.visibility = "visible";
el.style.display = "list-item"
img.src = "opened.gif"
} else {
el.style.visibility = "hidden";
el.style.display = "none"
img.src = "closed.gif"
}
}
function CLO(subName) {
var el = document.getElementById(subName),
img = document.getElementById("img" + subName);
if (el.style.visibility != "hidden") {
el.style.visibility = "hidden";
el.style.display = "none"
img.src = "closed.gif"
}
}
</script>
</head>
<body>
Текст1.(<img src="closed.gif" id="imgsub00" onclick="CLOP('sub00')"> Текст2.
<table border="1" width="100%" class="sub" id="sub00">
<tr>
<td>Текст3.
<br>
<img src="opened.gif" onclick="CLO('sub00')">
</td>
</tr>
</table>
</body>
</html>