lol ho fatto tutto un po di fretta

cmq ho risolto, era una boiata bastava dare l'id alle immagini (adesso posto tutto il codice a chi iservisse)


scusatemi ancora, soprattutto per il pvt




pagina index.html:


qui richiamiamo 10 menu


<script language="javascript" src="js/divscomparsa.js"></script>

</head>
<body>
<div id="pg_main_div" align="center">
<div id="pg_header" class="pg_header" align="center">[img]img/el/citta.jpg[/img]
</div>
<div id="pg_corpo" align="justify">
<div id="barra">
<table width="100%" border="0" cellspacing="4" cellpadding="0">
<tr>
<td width="26" height="17">[img]img/el/Piccole/expand_btn.jpg[/img]</td>
<td width="17"></td>
<td width="69" class="alttext1">Slot 1</td>
<td width="129" class="alttext1">Vuoto</td>
<td width="151" class="alttext1"></td>
<td width="40" align="right">[img]img/el/Piccole/top_btn.jpg[/img]</td>
</tr>
</table>
</div>
<div class="expanded" id="menu1">
prova

prova

prova

</div>
<div id="barra">
<table width="100%" border="0" cellspacing="4" cellpadding="0">
<tr>
<td width="26" height="17">[img]img/el/Piccole/expand_btn.jpg[/img]</td>
<td width="18"></td>
<td width="70" class="alttext1">Slot 2 </td>
<td width="131" class="alttext1">Caserma</td>
<td width="147" class="alttext1">Livello 01 </td>
<td width="40">[img]img/el/Piccole/top_btn.jpg[/img]</td>
</tr>
</table>
</div>
<div class="expanded" id="menu2">
prova

prova

prova

prova
</div>
<div id="barra">
<table width="100%" border="0" cellspacing="4" cellpadding="0">
<tr>
<td width="26" height="17">[img]img/el/Piccole/expand_btn.jpg[/img]</td>
<td width="18"></td>
<td width="70" class="alttext1">Slot 3 </td>
<td width="131" class="alttext1">Fabbro</td>
<td width="147" class="alttext1">Livello 01 </td>
<td width="40">[img]img/el/Piccole/top_btn.jpg[/img]</td>
</tr>
</table>
</div>
<div class="expanded" id="menu3">
prova

prova

prova

prova
</div>
<div id="barra">
<table width="100%" border="0" cellspacing="4" cellpadding="0">
<tr>
<td width="26" height="17">[img]img/el/Piccole/expand_btn.jpg[/img]</td>
<td width="18"></td>
<td width="70" class="alttext1">Slot 4 </td>
<td width="131" class="alttext1">Fabbro</td>
<td width="147" class="alttext1">Livello 01 </td>
<td width="40">[img]img/el/Piccole/top_btn.jpg[/img]</td>
</tr>
</table>
</div>
<div class="expanded" id="menu4">
prova

prova

prova

prova
</div>
<div id="barra">
<table width="100%" border="0" cellspacing="4" cellpadding="0">
<tr>
<td width="26" height="17">[img]img/el/Piccole/expand_btn.jpg[/img]</td>
<td width="18"></td>
<td width="70" class="alttext1">Slot 5 </td>
<td width="131" class="alttext1">Fabbro</td>
<td width="147" class="alttext1">Livello 01 </td>
<td width="40">[img]img/el/Piccole/top_btn.jpg[/img]</td>
</tr>
</table>
</div>
<div class="expanded" id="menu5">
prova

prova

prova

prova
</div>
<div id="barra">
<table width="100%" border="0" cellspacing="4" cellpadding="0">
<tr>
<td width="26" height="17">[img]img/el/Piccole/expand_btn.jpg[/img]</td>
<td width="18"></td>
<td width="70" class="alttext1">Slot 6 </td>
<td width="131" class="alttext1">Fabbro</td>
<td width="147" class="alttext1">Livello 01 </td>
<td width="40">[img]img/el/Piccole/top_btn.jpg[/img]</td>
</tr>
</table>
</div>
<div class="expanded" id="menu6">
prova

prova

prova

prova
</div>
<div id="barra">
<table width="100%" border="0" cellspacing="4" cellpadding="0">
<tr>
<td width="26" height="17">[img]img/el/Piccole/expand_btn.jpg[/img]</td>
<td width="18"></td>
<td width="70" class="alttext1">Slot 7 </td>
<td width="131" class="alttext1">Fabbro</td>
<td width="147" class="alttext1">Livello 01 </td>
<td width="40">[img]img/el/Piccole/top_btn.jpg[/img]</td>
</tr>
</table>
</div>
<div class="expanded" id="menu7">
prova

prova

prova

prova
</div>
<div id="barra">
<table width="100%" border="0" cellspacing="4" cellpadding="0">
<tr>
<td width="26" height="17">[img]img/el/Piccole/expand_btn.jpg[/img]</td>
<td width="18"></td>
<td width="70" class="alttext1">Slot 8 </td>
<td width="131" class="alttext1">Fabbro</td>
<td width="147" class="alttext1">Livello 01 </td>
<td width="40">[img]img/el/Piccole/top_btn.jpg[/img]</td>
</tr>
</table>
</div>
<div class="expanded" id="menu8">
prova

prova

prova

prova
</div>
<div id="barra">
<table width="100%" border="0" cellspacing="4" cellpadding="0">
<tr>
<td width="26" height="17">[img]img/el/Piccole/expand_btn.jpg[/img]</td>
<td width="18"></td>
<td width="70" class="alttext1">Slot 9 </td>
<td width="131" class="alttext1">Fabbro</td>
<td width="147" class="alttext1">Livello 01 </td>
<td width="40">[img]img/el/Piccole/top_btn.jpg[/img]</td>
</tr>
</table>
</div>
<div class="expanded" id="menu9">
prova

prova

prova

prova
</div>
<div id="barra">
<table width="100%" border="0" cellspacing="4" cellpadding="0">
<tr>
<td width="26" height="17">[img]img/el/Piccole/expand_btn.jpg[/img]</td>
<td width="18"></td>
<td width="70" class="alttext1">Slot 10 </td>
<td width="131" class="alttext1">Fabbro</td>
<td width="147" class="alttext1">Livello 01 </td>
<td width="40">[img]img/el/Piccole/top_btn.jpg[/img]</td>
</tr>
</table>
</div>
<div class="expanded" id="menu10">
prova

prova

prova

prova
</div>
</div>
</div>
</body>
</html>



pagina divscomparsa qui mettiamo i 2 script che servono

1 per far sparire il div e l'altro per cambiare l'immagine del menu per intenderci il classico + o -

var wImage = false;
function OClick(menu,img){
wImage = !wImage;
immagine=document.getElementById(img).src
if (wImage == true) {document.immagine="img/el/Piccole/contract_btn.jpg";}
if (wImage == false) {document.immagine="img/el/Piccole/expand_btn.jpg";}
espanso = mostraMenu(menu);
return espanso;
}

function mostraMenu(menuCorrente) {
if (document.getElementById) {
questoMenu = document.getElementById(menuCorrente).style
if (questoMenu.display == "block") {
questoMenu.display = "none"
}
else
{
questoMenu.display = "block"
}
return false
}
else
{
return true
}
}