";
					
					
				}
			
			if(!$vid_id)
				$vidList .= "
No Videos Available | ";
			
			$vidList .= "";
			
		}
	else 
		$vidList = '
';
	
	$sql = "SELECT * FROM video_galleries ORDER BY name ASC";
	$result = mysql_query($sql);
	while($row=mysql_fetch_array($result))
		{
			$id = $row["id"];
			$name = $row["name"];
			
			$galleryList .= "$name";
		}
$pageTitle="Photography Gallery";
include("../includes/header.php");
include("../includes/lightbox.php");
?>
	
		
			
			
			
			Click the gallery you want to view from the list below.
			
			
			
			
			handle . "\n";
				echo "Path: " . $d->path . "\n";
				*/
				while (false !== ($entry = $d->read())) {
				   $gs[] = $entry;
				}
				$d->close();
				
				
				/* find all the gallery directories in the galleries directory*/
				for ($i = 0; $i < sizeof($gs); $i++){
					if (preg_match("/[g][0-9]+/", $gs[$i])){
						$gss[] = $gs[$i];
					}
				}
				
				
				/* output links to the galleries */
				for ($i = 0; $i < sizeof($gss); $i++){
					//echo $i . ": " . $gss[$i]." ";
					$title = file_get_contents($_SERVER['DOCUMENT_ROOT']."/galleries/".$gss[$i]."/title.txt");
					
					$titleArray[] = $title;
					$folderArray[] = $gss[$i];
					
				}
				
			array_multisort($titleArray,$folderArray);	
			
			for($n=0;$n".$titleArray[$n]."";
				}	
				
			?>
			 
			 
			Video
			
		 | 
		
		=$vidList?>
		 |