<?php
include ("setup.php");

echo'
<table width="150" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" >
<tr>
<td>';

$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 '

<a href="wpg.php?mod=GALERIAFOTOS&md=SLIDESHOW&supercat='.$supercat.'&cat='.$cat.'&subcat='.$subcat.'&id='.$valor["id"].'">
<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>

';

         }
      }

echo'
</td>
</tr>
</table>';

?>