Eccolo... grazie mille

codice:
##################### /* FUNZIONE PER CREARE IL MENU A TENDINA */ ########################

#                                                                                        #

 ########################################
 ########################################
##########



function crea_menu(){

	global $thumbs, $immagini, $bg_cell;



//apro la directory corrente

$cartella_madre = @opendir(".");



//preparo l'indice

$indice = 1;



//dichiaro la var $_GET["id"]

if(!isset($_GET["id"])) $_GET["id"] = 1;



echo"

<table width=\"100%\" border=\"0\" bgcolor=\"$bg_cell\">

<form name=\"saibal\">

<tr>

<td align=\"center\">

<select name=\"sel_gallery\" class=\"tendina\"

onChange = \"self.location = document.saibal.sel_gallery[document.saibal.sel_gallery.selectedIndex].value;\">\n

<option value=\"$_SERVER[PHP_SELF]?id=$indice\">Scegli la galleria...</option>";



	while ($gallery = @readdir($cartella_madre)) {

	

		if(is_dir($gallery)){

			

			//esplodo il nome delle cartelle per controllare l'indice

			$num_gal = explode("_",$gallery);



				//vedo se esiste la relativa cartella thumbs

				if($num_gal[0] == $immagini && is_dir($num_gal[0]."_0".$indice."/".$thumbs."_0".$indice)){

	

//vedo se esiste il file title

if(file_exists($num_gal[0]."_0".$indice."/title.txt")) {

	

		$gallery = @file($num_gal[0]."_0".$indice."/title.txt");

		$gallery = strip_tags($gallery[0]);

		

		} else {

		

		$gallery = "Galleria ". $indice;

		

		}

		

if($_GET["id"] == $indice){

	if (($gallery=='------------------ VARIE ------------------') || ($gallery=='Africa - I Re Neri'))
		{
		$indice1 = sprintf( '%02d', $indice );
		if ($gallery=='Africa - I Re Neri')
		{
		echo "<option value=\"\">---   $gallery     ---</option>\n";
		}
		else
		{
			echo "<option value=\"\">      $gallery</option>\n";
		}
		}
	else
	{
$indice1 = sprintf( '%02d', $indice );
echo "<option value=\"$_SERVER[PHP_SELF]?id=$indice\" selected>$indice1 - $gallery</option>\n";
}

				} else {

		if (($gallery=='------------------ VARIE ------------------') || ($gallery=='Africa - I Re Neri'))
		{
		$indice2 = sprintf( '%02d', $indice );
		if ($gallery=='Africa - I Re Neri')
		{
		echo "<option value=\"\">---   $gallery    ---</option>\n";
		}
		else{
		echo "<option value=\"\">      $gallery</option>\n";
		}
		}else{			
$indice2 = sprintf( '%02d', $indice );
echo "<option value=\"$_SERVER[PHP_SELF]?id=$indice\">$indice2 - $gallery</option>\n";				
}
				

				}



			$indice++;

	

								}

	

							}

	

						}

	

closedir($cartella_madre);

	

echo"

</select>

</td>

</form>

</tr>

</table>

";

	

	}