<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:output method="html" indent="no"/>
<xsl:strip-space elements="*"/>
	<!--MENU-->
	<xsl:template match="MENU" mode="top">
		<xsl:apply-templates select="MENU-ITEM"  mode="top"/>
	</xsl:template>

	<!--MENU-ITEM-->
	<xsl:template match="MENU-ITEM"  mode="top">
   		<xsl:choose>
        <xsl:when test="MENU-ITEM[@ID=/LAYOUT/@ID] or @ID=/LAYOUT/@ID">
			
<!-- menu with link -->
<td width="15" align="right" valign="bottom" class="icon" style="background-image: url('images/menu_line2.gif');background-position: left bottom;background-repeat: repeat-x;"><img src="images/bullet.gif"/></td>
                        <td align="left" valign="bottom" class="menutable" style="background-image: url('images/menu_line2.gif');background-position: left bottom;background-repeat: repeat-x;"><a href="{@HREF}" class="menua"><xsl:value-of select="@TITLE" disable-output-escaping="yes"/></a></td>
                        <td width="1" style="background-image: url('images/menu_line.gif'); background-position: bottom; background-repeat: no-repeat;"><div style="height:1px;width:1px;"></div></td>
<!--end-->
			  
			
            </xsl:when>
            
            <xsl:otherwise>
			
<!-- menu click link -->			
<td width="15" align="right" valign="bottom" class="icon" style="background-image: url('images/menu_line2.gif');background-position: left bottom;background-repeat: repeat-x;"><img src="images/bullet.gif"/></td>
                        <td align="left" valign="bottom" class="menutable" style="background-image: url('images/menu_line2.gif');background-position: left bottom;background-repeat: repeat-x;"><a href="{@HREF}" class="menu"><xsl:value-of select="@TITLE" disable-output-escaping="yes"/></a></td>
                        <td width="1" style="background-image: url('images/menu_line.gif'); background-position: bottom; background-repeat: no-repeat;"><div style="height:1px;width:1px;"></div></td>
<!--end-->
			  
			  
        </xsl:otherwise>
		</xsl:choose>
        <xsl:if test="position()!=last()">
<!-- menu no last-->  		
<!--end-->		
		</xsl:if>
	</xsl:template>	

</xsl:stylesheet>
