<html>
<head>
<title>Test</title>
<script type="text/javascript">
/*
**prefix = { p_ = pointer (sozusagen^^), news_ = Beispielprefix für dieses Beispiel }
*/
function toggle(id, foo)
{
if(id.match(/\w.*?\_\d.*?\_\d+/)) {
var sp = id.split('_');
for(var i = 1; i <= sp[2]; i++) {
document.getElementById(sp[0]+"_"+sp[1]+"_"+i).style.visibility = foo == true ? "hidden" : "visible";
}
var l = document.getElementById("p_"+sp[0]+"_"+sp[1]);
l.href="javascript:toggle('"+sp[0]+"_"+sp[1]+"_"+sp[2]+"',"+(foo == true ? false : true)+");";
l.innerHTML = foo == true ? "+" : "-";
}
}
</script>
</head>
<body>
<tr><td>
<table id="news_394_5" >
<tr><td id="news_394_1">Inhalt</td></tr>
<tr><td id="news_394_2">Inhalt2</td></tr>
<tr><td id="news_394_3">Inhalt3</td></tr>
<tr><td id="news_394_4">Inhalt4</td></tr>
<tr><td id="news_394_5">Inhalt5</td></tr>
</table>
</td>
<td><a id="p_news_394" href="javascript:toggle('news_394_5',true);">-</a></td></tr>
</body></html>