<% switch (PageType)
{
case PageTypes.MainPage:
case PageTypes.MainCategoryPage:
case PageTypes.SubCategoryPage:%>
<%
break;
case PageTypes.ProductPage:%>

<%if (HasValidProduct)
{ %>
<% if (FirstImage != null && string.IsNullOrEmpty(FirstImage.Embed))
{
int thumbWidth = 600;
int thumbHeight = 400;
System.Drawing.Image Imagem = System.Drawing.Image.FromFile(Server.MapPath(FirstImage.ImageSource));
int srcWidth = Imagem.Width;
int srcHeight = Imagem.Height;
thumbWidth = (thumbHeight * srcWidth) / srcHeight;
if (thumbWidth > 600)
{
thumbWidth = 600;
thumbHeight = (thumbWidth * srcHeight) / srcWidth;
}
%>
<%=FirstImage.Title%><%=FirstImage.Description%>
<%}
else
{ %>
<%=FirstImage.Embed.Replace("||", "<").Replace("_|_", ">")%>
<%} %>
<% int i=0;
foreach (Definitions.ImageInfo image in Product.ImageList)
{
%>
<% if (string.IsNullOrEmpty(image.Embed))
{
int thumbWidth = 600;
int thumbHeight = 400;
System.Drawing.Image Imagem = System.Drawing.Image.FromFile(Server.MapPath(image.ImageSource));
int srcWidth = Imagem.Width;
int srcHeight = Imagem.Height;
thumbWidth = (thumbHeight * srcWidth) / srcHeight;
if (thumbWidth > 600)
{
thumbWidth = 600;
thumbHeight = (thumbWidth * srcHeight) / srcWidth;
}
%>
<%=image.Title%><%=image.Description%>
<%}
else
{ %>
<%=image.Embed.Replace("||", "<").Replace("_|_", ">")%>
<%} %>
<% i++;
} %>
<%foreach (Definitions.ImageInfo image in Product.ImageList)
{ %>
-
" class="image0">
<% } %>
<%=Content%>
<%}
else Response.Write(@"
"); %>