Воспользовался FireBug-ом..
Все заработало!!!
Ура!!
Вот результат:
<Script language="JavaScript" type="text/javascript">
function getElementsByClass(searchClass, node, tag)
{
var classElements = new Array();
if (node == null)
node = document;
if (tag == null)
tag = '*';
var els = node.getElementsByTagName(tag);
var elsLen = els.length - 1;
var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)");
for (i = 0, j = 0; i <= elsLen; i++)
if (pattern.test(els[i].className))
{
classElements[j] = els[i];
j++;
}
return classElements;
}
function OpenClose(CName)
{
var Elements = getElementsByClass(CName, document, "tr");
var ElementsLength = Elements.length - 1;
for (i = 0; i <= ElementsLength; i++)
if (Elements[i].style.display == "")
{
Elements[i].style.display = "none";
}
else
{
Elements[i].style.display = "";
}
}
</Script>
<table border='1' width='100%'>
<tr bgcolor='red'>
<td width='33%'>111</td>
<td width='34%'>222</td>
<td width='33%'>333</td>
</tr>
<tr>
<td colspan='3' class="SpoilerTop1" onClick="OpenClose('SpoilerBox1');">123</td>
</tr>
<tr class="SpoilerBox1" style="display:none" bgcolor='blue'>
<td>111</td>
<td>222</td>
<td>333</td>
</tr>
<tr class="SpoilerBox1" style="display:none" bgcolor='blue'>
<td>111</td>
<td>222</td>
<td>333</td>
</tr>
<tr>
<td colspan='3' class="SpoilerTop2" onClick="OpenClose('SpoilerBox2');">123</td>
</tr>
<tr class="SpoilerBox2" style="display:none" bgcolor='blue'>
<td>111</td>
<td>222</td>
<td>333</td>
</tr>
<tr class="SpoilerBox2" style="display:none" bgcolor='blue'>
<td>111</td>
<td>222</td>
<td>333</td>
</tr>
</table>