Mam taki skrypt
.h { display: none }
.v { display: block }
<script language="javascript" type="text/javascript"> function rozwin(co){
with(document.getElementById(co)){className=className=='h'?'v':'h';}
}
function zwin(){
with(document.getElementById('IDENTYFIKATOR')){className='h';}
with(document.getElementById('IDENTYFIKATOR1')){className='h';}
with(document.getElementById('IDENTYFIKATOR2')){className='h';}
with(document.getElementById('IDENTYFIKATOR3')){className='h';}
}
<a style="cursor: pointer" onclick="zwin();rozwin('IDENTYFIKATOR')">Tekst nr 1
</a> <div class="h" id="IDENTYFIKATOR">Treść 1
</div> <a style="cursor: pointer" onclick="zwin();rozwin('IDENTYFIKATOR1')">Teskt nr 2
</a> <div class="h" id="IDENTYFIKATOR1">Treść 2
</div> <a style="cursor: pointer" onclick="zwin();rozwin('IDENTYFIKATOR2')">Teskt nr 3
</a> <div class="h" id="IDENTYFIKATOR2">Treść 3
</div> <a style="cursor: pointer" onclick="zwin();rozwin('IDENTYFIKATOR3')">Teskt nr 4
</a> <div class="h" id="IDENTYFIKATOR3">Treść 4
</div>
troszeczkę go przerobiłem ale coś nie działa co robię nie tak

proszę o pomoc
<style type="text/css">
.h { display: none }
.v { display: block }
</style>
<script language="javascript" type="text/javascript">
function rozwin(co){
with(document.getElementById(co)){className=className=='h'?'v':'h';}
}
function zwin(){
with(document.getElementById('IDENTYFIKATOR1')){className='h';}
with(document.getElementById('IDENTYFIKATOR2')){className='h';}
with(document.getElementById('IDENTYFIKATOR3')){className='h';}
with(document.getElementById('IDENTYFIKATOR4')){className='h';}
with(document.getElementById('IDENTYFIKATOR5')){className='h';}
with(document.getElementById('IDENTYFIKATOR6')){className='h';}
}
</script>
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td class="c4"><img src="themes/default/img/pixel.gif" width="1" height="1"></td>
<td class="c1"><img src="themes/default/img/pixel.gif" width="1" height="1"></td>
</tr>
<?php
$zapytanie=sql_select("
SELECT * FROM gazetki_reklamowe_kategorie ORDER BY kat_nazwa asc
");
$podkategorie=sql_select("
SELECT * FROM gazetki_reklamowe_podkategorie
");
$strona_wys=9.85*($zapytanie[0][0]+$podkategorie[0][0])+75+140+10+173-3;
if ($zapytanie[0][0] > 0){
for ($i=1;$i<=$zapytanie[0][0];$i++){
<td class="c1">
<img src="http://igito.pl/themes/igito/img/arrow.gif" height="8" hspace="4" width="8">
</td>
<td class="c2 contentfont" width="100%">
<a style="cursor: pointer" onclick="zwin();rozwin(IDENTYFIKATOR'.$i.')"><strong>'.$zapytanie[$i][1].'</strong></a><br>
</td>
</tr> ';
$podkategorie=sql_select("
SELECT * FROM gazetki_reklamowe_podkategorie
WHERE kat_id LIKE '".$zapytanie[$i][0]."'
ORDER BY podkat_nazwa asc
");
for ($j=1;$j<=$podkategorie[0][0];$j++){
if($j == 1
){echo'<div class="h" id="IDENTYFIKATOR'.$i.'">';} $str=''.$zapytanie[$i][1].'_'.$podkategorie[$j][2].'';
$str2=''.$zapytanie[$i][0].'_'.$podkategorie[$j][0].'';
$ilosc_ogloszen=sql_select(" SELECT ogl_id FROM gazetki_reklamowe_ogloszenia WHERE ogl_kategoria='".$str2."' ");
<td class="c1">
</td>
<td class="c2 contentfont" width="100%"> <a href="gazetki_reklamowe.php?s='.tytul_ogl($str).','.$zapytanie[$i][0].','.$podkategorie[$j][0].'">'.$podkategorie[$j][2].'</a> ('.$ilosc_ogloszen[0][0].')<br /> </td>
</tr>';if
($j == $podkategorie[0
][0
]){echo'</div>';} }
}
}
?>
</table>