dudas con una galería

[email protected]
Newsgroups php.general.es
Message-ID <[email protected]>
Hola amigos, tengo una galería de fotos y necesito que cuando la se vea la
foto grande, la correspondiente en pequeño tenga una clase activa. No se
como llegar con un valor para comparar si la pequeña pulsada y la grande
son las mismas. Seguro que alguien puede ayudarme y de antemano gracias.

Les adjunto el código correspondiente.

 <div id="gallery">
 <?
if ($foto1!='')
						{
						?>
							<img id="foto" class="left" src="imagenes/inmuebles/<? echo
"$foto1" ?>" alt="<? echo "$ref" ?>" width="632" height="450"/>
						<?
                        }
						else
						{
						?>
                        	<img src="imagenes/inmuebles/thumb_nofoto.gif"
alt="<? echo "$ref" ?>" width="632" height="450"/>
						<?
                        }
						?>
                        <ul class="lst_visor">
                        <?
                        if ($foto1!='')
						{
						?>
							<li class="active"><a href="#" title="ver foto"><img id="foto"
src="imagenes/inmuebles/<? echo "$foto1" ?>" alt="ver foto" width="125"
height="90"
onclick="document.getElementById('foto').src=this.src"/></a></li>
						<?
                        }
						else
						{
						?>
                        	<li class="active"><a href="#" title="ver
foto"><img id="foto" src="imagenes/inmuebles/thumb_nofoto.gif" alt="ver
foto" width="125" height="90"
onclick="document.getElementById('foto').src=this.src"/></a></li>
						<?
                        }
						if ($foto2!='')
						{
						?>
							<li class="active"><a href="#" title="ver foto"><img id="foto"
src="imagenes/inmuebles/<? echo "$foto2" ?>" alt="ver foto" width="125"
height="90"
onclick="document.getElementById('foto').src=this.src"/></a></li>
						<?
                        }
						else
						{
						?>
                        	<li class="active"><a href="#" title="ver
foto"><img id="foto" src="imagenes/inmuebles/thumb_nofoto.gif" alt="ver
foto" width="125" height="90"
onclick="document.getElementById('foto').src=this.src"/></a></li>
						<?
                        }
						if ($foto3!='')
						{
						?>
							<li class="active"><a href="#" title="ver foto"><img id="foto"
src="imagenes/inmuebles/<? echo "$foto3" ?>" alt="ver foto" width="125"
height="90"
onclick="document.getElementById('foto').src=this.src"/></a></li>
						<?
                        }
						else
						{
						?>
                        	<li class="active"><a href="#" title="ver
foto"><img id="foto" src="imagenes/inmuebles/thumb_nofoto.gif" alt="ver
foto" width="125" height="90"
onclick="document.getElementById('foto').src=this.src"/></a></li>
						<?
                        }
						if ($foto4!='')
						{
						?>
							<li class="active"><a href="#" title="ver foto"><img id="foto"
src="imagenes/inmuebles/<? echo "$foto4" ?>" alt="ver foto" width="125"
height="90"
onclick="document.getElementById('foto').src=this.src"/></a></li>
						<?
                        }
						else
						{
						?>
                        	<li class="active"><a href="#" title="ver
foto"><img id="foto" src="imagenes/inmuebles/thumb_nofoto.gif" alt="ver
foto" width="125" height="90"
onclick="document.getElementById('foto').src=this.src"/></a></li>
						<?
                        }
						if ($foto5!='')
						{
						?>
							<li class="active"><a href="#" title="ver foto"><img id="foto"
src="imagenes/inmuebles/<? echo "$foto5" ?>" alt="ver foto" width="125"
height="90"
onclick="document.getElementById('foto').src=this.src"/></a></li>
						<?
                        }
						else
						{
						?>
                        	<li class="active"><a href="#" title="ver
foto"><img id="foto" src="imagenes/inmuebles/thumb_nofoto.gif" alt="ver
foto" width="125" height="90"
onclick="document.getElementById('foto').src=this.src"/></a></li>
						<?
                        }
						?>
                        
                        </ul>
                     </div>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.