<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:php="http://php.net/xsl" exclude-result-prefixes="php">
<xsl:output indent="yes" method="xml" omit-xml-declaration="yes" encoding="UTF-8" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/>
<xsl:output method="html" indent="yes"/>
<xsl:template match="content" mode="webpagecontent">
	<div id="site">
		<boxtemplate name="head"/>
		<div id="content">
			<boxtemplate name="bloccontent"/>
		</div>
		<div id="foot">
			<boxtemplate name="foot"/>
		</div>
	</div>
	
</xsl:template>


<xsl:template match="cat | item" mode="cubemenu">
	<li class="{@uid}">
		<xsl:if test="@catselected = '1' or @finalitem = '1'">
			<xsl:attribute name="class"><xsl:value-of select="concat(@uid, ' current')" /></xsl:attribute>
		</xsl:if>
		<a class="{@uid}" href="{@mainwu}">
			<xsl:if test="@catselected = '1' or @finalitem = '1'">
				<xsl:attribute name="class"><xsl:value-of select="concat(@uid, ' current')" /></xsl:attribute>
			</xsl:if>
			
			<span class="name">
				<xsl:value-of select="@name" />
				<xsl:value-of select="./titre" />
			</span>
		</a>
		<xsl:if test="./cat and current()/@subcatmenu='1' and not(@listwu='1')">
			<ul class="{@uid}">
				<xsl:if test="@catselected = '1' or @finalitem = '1'">
					<xsl:attribute name="class"><xsl:value-of select="concat(@uid, ' current')" /></xsl:attribute>
				</xsl:if>
				<xsl:apply-templates select="./cat" mode="cubemenu" />
			</ul>
		</xsl:if>
		<xsl:if test="@listwu='1'">
			<ul class="{@uid} tototo">
				<xsl:if test="@catselected = '1' or @finalitem = '1'">
					<xsl:attribute name="class"><xsl:value-of select="concat(@uid, ' current')" /></xsl:attribute>
				</xsl:if>
				<xsl:apply-templates select="./list/item[not(@display='hidden')]" mode="cubemenu" />
			</ul>
		</xsl:if>
	</li>
</xsl:template>


<xsl:template match="item" mode="viditem">
	
	
		<xsl:variable name="vid" select="./videos/v[1]"/>
		<div class="viditem">
			<div class="col video">
				<img class="bumpbox" data-bumpbox-dim="{$vid/@vw}_{$vid/@vh}" href="BP_VID_{$vid/@vpr}_{$vid/@vid}" src="{concat($cvii,$vid/@vpr,'/rcm_103_66_vid-smlplay_A_center_center/',$vid/@vid)}" data-bumpbox-group="vidz"/>
			</div>
			<a href="{./../../@mainwu}" class="col txts">
				<div class="titre">
					<xsl:value-of select="./titre"/>
				</div>
				<div class="lieu">
					<xsl:value-of select="./lieu"/>
				</div>
				<div class="ville">
					<xsl:value-of select="./ville"/>
				</div>
				<div class="date">
					<xsl:value-of select="php:function('getDateFormated', 'd F Y' , ./date/@time)"/>
				</div>
			</a>
			<div class="cleared"/>
		</div>
	

</xsl:template>
  <xsl:template match="cat" mode="sousmenuliste">
	<a href="{concat($siteroot,@mainwu)}">
		<xsl:if test="@currentitem = '1'">
			<xsl:attribute name="class">currentitem</xsl:attribute>
		</xsl:if>
		<xsl:value-of select="@name"/>
	</a>
  </xsl:template>
  <xsl:template match="cat" mode="imgfckpage">
	<div class="simplepagecontent">
		<div class="titre"><xsl:value-of select="$ccf/@name"/></div>
		<div class="simplec">
			<xsl:if test="string-length($ccf/text/item/photo) &gt; 0">
				<div class="img" style="background-image:url({concat($siteroot,'getuserimgs/rcm_698_300/',$ccf/text/item/photo)});"/>
			
			</xsl:if>
			<div class="txt"><xsl:apply-templates select="$ccf/text/item/txt/node()"/></div>
		</div>
	</div>
  </xsl:template>
<xsl:template match="cat" mode="thumbmenuitem">
	<div class="videothumb slidebloc">
		<a href="{./@mainwu}">
			<xsl:if test="@catselected = '1'">
				<xsl:attribute name="class">current</xsl:attribute>
			</xsl:if>
			<xsl:if test="./../@id = 'films'">
				<xsl:attribute name="datafill"><xsl:value-of select="./@id"/></xsl:attribute>
				<xsl:attribute name="datado">contentslide</xsl:attribute>
				<xsl:attribute name="datacontainer">contentslidediv</xsl:attribute>
			</xsl:if>
			<xsl:choose>
				<xsl:when test="./@model = 'articlefckmodel'">
					<xsl:choose>
						<xsl:when test="./textes/item/txt//img[@ckimg='1']">
							<div class="thumbimg" style="background-image:url({concat($ci,'rcm_164_108/',./textes/item/txt//img[@ckimg='1'][1]/@srco)});"/>
						</xsl:when>
						<xsl:when test="./textes/item/txt//vidpro">
							<div class="thumbimg" style="background-image:url({concat($cvii,./textes/item/txt//vidpro[1]/@vpr,'/rcm_164_108_CIplaybtn_A_center_center/',./textes/item/txt//vidpro[1]/@vid)});"/>
						</xsl:when>
						<xsl:otherwise>
							<div class="thumbimg"><div class="txt"><xsl:apply-templates select="php:function('xslTxtLineCut', ./textes/item/txt/node(), 80, 0)/node()"/></div></div>
						</xsl:otherwise>
					</xsl:choose>
					
				</xsl:when>
				<xsl:when test="./@model = 'articlevideomodel'">
					<div class="thumbimg" style="background-image:url({concat($cvii,./textes/item/vid/v[1]/@vpr,'/rcm_164_108_CIplaybtn_A_center_center/',./textes/item/vid/v[1]/@vid)});"/>
				</xsl:when>
				<xsl:when test="./@model = 'articleimagesmodel'">
					<div class="thumbimg" style="background-image:url({concat($ci,'rcm_164_108/',./list/item[not(@display='hidden')][1]/icon/i[1])});"/>
				</xsl:when>
				<xsl:otherwise>
					<div class="thumbimg" style="background-image:url({concat($cvii,./textes/item/vid/v[1]/@vpr,'/rcm_164_108_CIplaybtn_A_center_center/',./textes/item/vid/v[1]/@vid)});"/>
				</xsl:otherwise>
			</xsl:choose>
			<div class="thumbtitle"><span><xsl:value-of select="./@name"/></span></div>
		</a>
		<xsl:if test="./../@id = 'films'">
			<span class="inv" datafill="{./@id}">
				<xsl:apply-templates select="." mode="videobloc"/>
			</span>
		</xsl:if>
	</div>
</xsl:template>
</xsl:stylesheet>
