<!--#include file="CNCASPPageManager_GalleriesBrowse.inc" -->

<%
'************************************************************************************
' File:		/NR/System/WBC/Internals/WBCFuncPages/Cross-Browser/ResourceBrowser/
'			Management/ResourceGalleries.asp
' Author:	Microsoft Corporation.
' Purpose:	Display a list of resources galleries.  Entry point will be the
'			the Console UI. Exit pt is ResourceGallery.asp
'
' Query String Parameters:
'   IDS_QPARAM_GALLERY_GUID: Specifies Resource Gallery to expand to (for TreeView only)
'
'*************************************************************************************

' we can only run in unpublished mode
if AutoSession.IsModeUnpublished = false then
	Response.End
end if

' ---- Initialize the ASPPageManager
Dim g_pASPPageManager
Set g_pASPPageManager = New CNCASPPageManager_GalleriesBrowse
Call g_pASPPageManager.InitManager()

%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="expires" content="-1">
	<meta name="Author" content="Microsoft Corporation.">
	<meta name="Description" content="Display a list of resource galleries">
	<meta name="robots" content="NOINDEX,NOFOLLOW">
	<meta http-equiv="Content-Type" content="text/html;charset=<%= g_pASPPageManager.Charset %>">
	<title><%= IDS_UI_BROWSER_TITLE %></title>

	<% Call EmbedWBCHeadSection %>
</head>

<body <%= IDS_BODYSETTING %> class="WBC_styclsTextColor0">

<form>

<table height="90%" width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr valign=top >
		<td>
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
				<!-- Show the Main Header -->
				<tr class="WBC_styclsBackground1">
					<td align=right><img border=0 src="<%=IDS_PATH_IMAGE_LOGO %>"></td>
					<td width=100% valign="middle"  class="WBC_styclsHeaderText">
						<%= IDS_UI_RESOURCE_MANAGER %>
					</td>
					<td><img src="<%=IDS_TRANSPARENT_GIF%>"
								width="<%= C_INT_MAIN_MARGIN %>" height="<%=C_INT_HEADER_HEIGHT%>" border="0"></td>
				</tr>

				<!-- Show the Sub Header -->
				<tr class="WBC_styclsBackground2">
					<td><img src="<%=IDS_TRANSPARENT_GIF%>"
						width="15" height="<%=C_INT_SUBHEAD_HEIGHT%>" border="0"></td>
					<td height="25" class="WBC_styclsSubheadText">
						<%= IDS_UI_SEL_RESOURCE_GALLERY %></td>
					<td><img src="<%=IDS_TRANSPARENT_GIF%>"
						width="15" height="<%=C_INT_SUBHEAD_HEIGHT%>" border="0"></td>
				</tr>
				<tr>
					<td colspan=3><img src="<%=IDS_TRANSPARENT_GIF%>"
						width="15" height="<%=C_INT_MAIN_SPACING%>" border="0"></td>
				</tr>

				<!-- Set the margin width for the rest of the page -->
				<tr>
					<td rowspan="999"><img src="<%=IDS_TRANSPARENT_GIF%>"
								width="<%= C_INT_MAIN_MARGIN %>" height="1" border="0"></td>
					<td><img src="<%=IDS_TRANSPARENT_GIF%>"
								width="100%" height="1" border="0"></td>
					<td rowspan="999"><img src="<%=IDS_TRANSPARENT_GIF%>"
								width="<%= C_INT_MAIN_MARGIN %>" height="1" border="0"></td>
				</tr>

				<!-- Write the "View As Tree" or "View as List" link -->
				<tr>
					<td class="WBC_styclsTextColor0"><% Call g_pASPPageManager.ViewStateControl.DisplayStateControl() %></td>
				</tr>
				<tr>
					<td colspan=3><img src="<%=IDS_TRANSPARENT_GIF%>"
						width="15" height="<%= C_INT_MAIN_SPACING %>" border="0"></td>
				</tr>

			<%	If (g_pASPPageManager.ViewStateControl.CurrentState = IDS_STATE_VIEWAS_LIST) Then %>

				<!-- Display info about subset being shown and the PagingConfigControl -->
				<tr>
					<td width="100%" align="right">
						<table width=100% border=0 cellspacing=0 cellpadding=0>
							<tr>
								<td width=50% align=left  class="WBC_styclsTextColor0">
									<%=  IDS_UI_ITEMS  %> <b> <%= g_pASPPageManager.GridStartItem %> - <%= g_pASPPageManager.GridEndItem %>  </b><%=IDS_UI_OF%> <b><%= g_pASPPageManager.ResourceGalleries.Count %></b>
								</td>
								<td width=50% align=right class="WBC_styclsTextColor0">
									<%=IDS_UI_ITEMS_PER_PAGE%>&nbsp;
									<% Call g_pASPPageManager.GridPagingConfigControl.DisplayPagingConfigControl() %>
								</td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td><img src="<%=IDS_TRANSPARENT_GIF%>"
							width="15" height="<%=C_INT_XSMALL_SPACING%>" border="0"></td>
				</tr>

			<% End If %>

				<!-- Display Separator -->
				<tr>
					<td class="WBC_styclsBackground1"><img src="<%=IDS_TRANSPARENT_GIF%>"
																	width="15" height="<%=C_INT_SEPARATOR_HEIGHT%>"></td>
				</tr>
				<tr>
					<td><img src="<%=IDS_TRANSPARENT_GIF%>"
							width="15" height="<%= C_INT_MAIN_SPACING %>" border="0"></td>
				</tr>

				<!-- Show the Resource Galleries as Tree or List -->
				<tr>
					<td>
						<%
							If (g_pASPPageManager.ViewStateControl.CurrentState = IDS_STATE_VIEWAS_TREE) Then
								Call g_pASPPageManager.TreeControl.DisplayTree()
							Else
								Call g_pASPPageManager.GridControl.DisplayGrid()
							End If
						%>
					</td>
				</tr>

			</table>
		</td>
	</tr>

</table>

<!--  Write the paging links when it's View is List -->
<%	If (g_pASPPageManager.ViewStateControl.CurrentState = IDS_STATE_VIEWAS_LIST) Then %>

	<table height="10%" width="100%" border="0" cellspacing="0" cellpadding="0">
		<tr valign=top>
			<td align=center class="WBC_styclsTextColor0">
				<%	Call g_pASPPageManager.GridPagingControl.DisplayPagingLinks %>
			</td>
		</tr>
	</table>

<%	End If %>

</form>

</body>

</html>