<?xml version="1.0" encoding="windows-1251"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="html" version="1.0" encoding="windows-1251" omit-xml-declaration="no" indent="no" media-type="text/html"/>
	<!-- Administrator section layout stylesheet -->
	<xsl:include href="layout.xsl"/>

	<!-- Variable for page title -->
	<xsl:variable name="page-title"><xsl:value-of select="//page/content/Messages/Title"/></xsl:variable>

	<!-- Applying root template -->
	<xsl:template match="/"><xsl:apply-templates/></xsl:template>

	<!-- Page content -->
	<xsl:template match="content">
		<script language="JavaScript">
			function ChangePage(page) {
				document.adminForm.elements['page'].value = page;
				document.adminForm.submit();
			}
			
			function changeOrder(orderField, orderDirection) {
				document.adminForm.elements['orderField'].value = orderField;
				document.adminForm.elements['orderDirection'].value = orderDirection;
				document.adminForm.submit();
			}
		</script>

<table><tr>
<xsl:call-template name="StandartButton">
	<xsl:with-param name="description" select="//content/Messages/Add" />
	<xsl:with-param name="src">ico_add_peop_group.gif</xsl:with-param>
	<xsl:with-param name="action">admin_group.php</xsl:with-param>
</xsl:call-template>
</tr></table><br/>
		
<xsl:call-template name="DefaultFormTemplate">
<xsl:with-param name="FormBody" select="Form/row[@name='search']"/>
<xsl:with-param name="FormTitle" select="//page/content/Messages/GlobalSearchTitle"/>
<xsl:with-param name="BottomError">1</xsl:with-param>
</xsl:call-template>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td><p class="heading1"><b><xsl:value-of select="//page/content/Messages/List"/></b></p></td></tr>
<tr><td><img src="images/pix.gif" width="1" height="7"/></td></tr>
<xsl:choose>
<xsl:when test="adminGroupsList/row">
<tr>
	<td bgcolor="#3D5E74">
	<table border="0" cellpadding="4" cellspacing="1" width="100%">
	<tr bgcolor="#587AAE">
		<td width="100%"><p class="navigation"><a class="navigation" href="admin_groups.php"><xsl:attribute name="OnClick">changeOrder('Name', <xsl:choose><xsl:when test="OrderField='Name' and OrderDirection=1">0</xsl:when><xsl:otherwise>1</xsl:otherwise></xsl:choose>); return false;</xsl:attribute><xsl:value-of select="//page/content/Messages/Name"/></a></p></td>
		<td align="center"><p class="navigation"><xsl:value-of select="//page/content/Messages/GlobalOptions"/></p></td>
	</tr>
	<xsl:apply-templates select="adminGroupsList/row" />
	</table>
	</td>
</tr>
<tr><td><img src="images/pix.gif" width="1" height="5"/></td></tr>		
<tr>
	<td align="center"><xsl:apply-templates select="adminGroupsList/pager"/></td>
</tr>
<tr><td><img src="images/pix.gif" width="1" height="5"/></td></tr>
</xsl:when>
<xsl:otherwise>
<tr><td><p class="error"><xsl:value-of select="//page/content/Messages/NoList"/></p></td></tr>
</xsl:otherwise>
</xsl:choose>
</table>
</xsl:template>
	
<xsl:template match="adminGroupsList/row">
<tr>
<xsl:attribute name="bgcolor">
<xsl:choose>
	<xsl:when test="position() mod 2 = 0">#F7F7F7</xsl:when>
	<xsl:otherwise>#FFFFFF</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
	<td><p class="tableElements"><xsl:value-of select="Name"/></p></td>
	<td><xsl:call-template name="StandartOptions"><xsl:with-param name="EditLink">admin_group.php</xsl:with-param><xsl:with-param name="Id" select="Id"/></xsl:call-template></td>
</tr>
</xsl:template>

	<xsl:template match="Form/row[@name='search']">
	<form action="admins.php" name="adminForm" method="post">
	<input type="hidden" name="page" value="{Page}"/>
	<input type="hidden" name="orderField" value="{OrderField}"/>
	<input type="hidden" name="orderDirection" value="{OrderDirection}"/>
	</form>
	</xsl:template>
</xsl:stylesheet>
