<?php

if(!$_GET['id']) { $_GET['id'] = "cafe"; }

$gallery = $_GET['id'];

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The Garage Cafe</title>
<link href="style.css" rel="stylesheet" type="text/css" />

<script src="prototype-1.6.0.2.js" type="text/javascript"> </script>


<script language="javascript" type="text/javascript">

function show_popup(img_path)
{
	$('gallery_image').src = img_path;
}



</script>


</head>

<body>

<div id="container">
	<div id="header_left"></div>
	<div class="frame">
   	  	<div id="header_centre"></div>
      	<div id="menu">
      		<a href="cafe.html"><div id="coffee_shop"></div></a>
        	<a href="cottage.html"><div id="cottage"></div></a>
            <a href="art_gallery.html"><div id="art_gallery"></div></a>
            <a href="about_us.html"><div id="about_us"></div></a>
			<a href="photos.php"><div id="photos_sel"></div></a>
        </div>
		<div id="left_menu">
			<a href="photos.php?id=cafe">
				<img <? if(strcmp($gallery, "cafe") == 0) echo "class=\"selected\""; ?> src="layout/lm_cafe.jpg" /></a>
				
			<a href="photos.php?id=cottage">
				<img <? if(strcmp($gallery, "cottage") == 0) echo "class=\"selected\""; ?> src="layout/lm_cottage.jpg" /></a>
				
			<a href="photos.php?id=art_gallery">
				<img <? if(strcmp($gallery, "art_gallery") == 0) echo "class=\"selected\""; ?> src="layout/lm_art_gallery.jpg" /></a>
				
			<a href="photos.php?id=other">
				<img <? if(strcmp($gallery, "other") == 0) echo "class=\"selected\""; ?> src="layout/lm_other.jpg" /></a>
		</div>
        <div id="content">
        	<div class="gallery">
				<div style="text-align:center; margin-left:auto; margin-right:auto;">
					<? $index = 0; 
					   for($index = 1; $index < 8; $index++)
					   {
					   		$thumb_path = "galleries/" . $gallery . "/thumbs/" . $gallery . $index . "_thumb.jpg";
					   		$pic_path = "galleries/" . $gallery . "/" . $gallery . $index . ".jpg";
					   
					   		?>
						<div class="thumbnail">
							<a href="javascript:;"> 
								<img src="<? echo $thumb_path; ?>" onclick="show_popup('<? echo $pic_path; ?>')" />
							</a>
						</div>	
						
					<? } ?>				

					<br class="clear_float" />
				</div>
				<br class="clear_float" />
				<div style="text-align:center; margin-top:30px">
					<img id="gallery_image" src="<?  echo "galleries/" . $gallery . "/" . $gallery . "1.jpg";?>" />
				</div>
			</div>
			
        </div>
    </div>
   	<div id="header_right"></div>
    <br class="clear_float" />
</div>

<div id="footer">
	<div id="footer_pic"></div>
</div>


</body>
</html>
