{{assign var=galleryid value=$smarty.get.gallery|addslashes}}
{{getCollectionByCategory CollectionID=80 ColumnID=ID Value=$galleryid OrderColumn=ID var=Galleries}}
{{assign var=Gallery value=$Galleries[0]}}
{{assign var=fileNameToUse value='/photo-gallery.html'}}
{{getCollectionByCategory CollectionID=80 ColumnID=3 Value='on' OrderColumn=2 var=AllGalleries}}
{{if $Galleries|@count eq 0}}
	{{assign var=Gallery value=$AllGalleries[0]}}
{{/if}}
{{if $Gallery.Collection_80_3 neq 'on'}}{{urlredirect page='/notfound.html'}}{{/if}}
{{assign var='PageTitle' value=$Gallery.Collection_80_1}} {{assign var='PageTitle' value=$PageTitle|concat:' - Photo Galleries '}}{{setPage var=Collection_17_2 value=$PageTitle}} 
{{assign var=fileNameToUse value='/photo-gallery.html'}}
<div id="leftside">
<div id="smarty_plugin">{{getcontent id=12}}</div>
</div>
<div id="contentalt">
	<h1>{{$Gallery.Collection_80_1}}</h1>
    	
		{{getCollectionByCategory CollectionID=81 ColumnID=5 Value=$Gallery.Collection_80_ID OrderColumn=1 var=table}}
		{{if $table|@count eq 0}}
			<h2>There are no pictures into this category</h2>
		{{else}}
		{{assign var=tableCollectionID value=81}}
		{{assign var=Tnail value='Collection_'|concat:$tableCollectionID|concat:'_'|concat:3}}
		{{assign var=Image value='Collection_'|concat:$tableCollectionID|concat:'_'|concat:3}}
		{{assign var=Alt   value='Collection_'|concat:$tableCollectionID|concat:'_'|concat:4}}
		{{assign var=ID   value='Collection_'|concat:$tableCollectionID|concat:'_ID'}}
		<div id="photogallery">
		<div id="main_gallery_image"></div>
		
		<table cellpadding="0" cellspacing="0" border="0" class="imageListContainer"><tr valign="top">
		<td><span id="scrollLeft" class="arrow"><</span></td>
		<td>
		<div id="galleryscroller">
		<ul class="gallerylist" >
		{{foreach from=$table item=v key=k name=n}}
		<li {{if $smarty.foreach.n.first}}class="active"{{/if}}><img src="{{$v.$Image}}" alt="{{$v.$Alt|replace:'"':'"'}}" title="{{$v.$Alt|replace:'"':'"'}}"></li>
		{{/foreach}}
		</ul>
		</div>
		</td>
		<td><span id="scrollRight" class="arrow">></span></td>
		</tr></table>
		</div>
		<div id="galleryslideshow">View Slideshow</div>
		{{/if}}
		
  
</div>