<?php

include ("setup.php");

echo'
<div id="SlideShow">
<div id="telaSlideShow">';

$sql = "select * from galeriafotos where supercategoria = '$supercat' and categoria = '$cat' and subcategoria = '$subcat' and id = '$id'";
$result = mysql_query ($sql);
while ( $valor = mysql_fetch_array($result) )
      {
        if($result == TRUE)
        {

echo'
<div id="slideSlideShow">

<img src="images/'.$valor["foto"].'" border="0">

<br>
<font size="2">
'.$valor["textocompleto"].'
</font>
</div>';

        }

      }//end while

echo'
</div>
<div id="menuSlideShow">';

$sql = "select * from galeriafotos where supercategoria = '$supercat' and categoria = '$cat' and subcategoria = '$subcat' order by id  ASC";
$result = mysql_query ($sql);
while ( $valor = mysql_fetch_array($result) )
     {
        if($result == TRUE)
        {

echo '

<div id="itemmenuSlideShow">
<a href="index.php?mod=GALERIAFOTOS&md=SLIDESHOW&supercat='.$supercat.'&cat='.$cat.'&subcat='.$subcat.'&id='.$valor["id"].'&codi='.$codi.'">
<img src="images/'.$valor["foto"].'" width="36" height="45" border="0" onmouseout="nereidFade(this,100,10,50)"
onmouseover="nereidFade(this,60,10,30)"
style="FILTER: alpha(opacity=100)">
</a></div>';

         }
      }

echo'
</div>
</div>';


?>