<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:output method="html"
    indent="yes"
    omit-xml-declaration="yes"
    encoding="utf-8"
    doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
    doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" />
  <xsl:template match="/d">
    <html>
      <head>
        <title>Parcours - HOKA LES TEMPLIERS - LiveTrail®</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="pragma" content="no-cache"/>
  <meta http-equiv="cache-control" content="no-cache, must-revalidate"/>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
  <link rel="stylesheet" type="text/css" media="screen" href="js/theme-ui/ui.all.css"/>
  <link rel="stylesheet" type="text/css" media="screen" href="st.css?v=20240403"/>
  <link rel="stylesheet" type="text/css" media="screen" href="style.css?y=2025-3"/>
  <link rel="icon" type="image/png" href="im/favicon.png" />
  <!--[if IE]>
  <link rel="shortcut icon" type="image/x-icon" href="im/favicon.ico" />
  <![endif]-->
  	<script type="text/javascript">
		var isIframeMode=false;
	</script>
		<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript" src="js/mob_swipe.js"></script>
	<script type="text/javascript" src="js/raphael.js"></script>
	<script type="text/javascript" src="js/aplweb.scrollbars.js"></script>
	<script type="text/javascript" src="js/jquery-ui.js"></script>
	<script type="text/javascript" src="js/util.js?v20231003"></script>
	<script type="text/javascript" src="js/jquery.countdown.js"></script>
	<script type="text/javascript" src="js/httpReq.js"></script>
	  <script type="text/javascript" src="js/gm.js"></script>
    
<!-- Google tag (gtag.js) -->
<script async="1" src="https://www.googletagmanager.com/gtag/js?id=G-TK9N9GRYWX"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'G-TK9N9GRYWX');
</script>

<!-- Google tag (gtag.js) -->
<script async="1" type="text/javascript" src="https://www.googletagmanager.com/gtag/js?id=G-9B5975ZT9G"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'G-9B5975ZT9G');
</script>
<script type="text/javascript">
  
	/* Hotjar */
	(function(h,o,t,j,a,r){
		h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
		h._hjSettings={hjid:2201953,hjsv:6};
		a=o.getElementsByTagName('head')[0];
		r=o.createElement('script');r.async=1;
		r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
		a.appendChild(r);
	})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');

</script>
</head>
<body>
	<script type="text/javascript">
	!function(f,b,e,v,n,t,s)
	{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
	n.callMethod.apply(n,arguments):n.queue.push(arguments)};
	if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
	n.queue=[];t=b.createElement(e);t.async=!0;
	t.src=v;s=b.getElementsByTagName(e)[0];
	s.parentNode.insertBefore(t,s)}(window, document,'script', 'https://connect.facebook.net/en_US/fbevents.js');
	fbq('init', '176863753641136');
		fbq('track', 'PageView');
</script>
<noscript>
	<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=176863753641136&amp;ev=PageView&amp;noscript=1" />
	</noscript>
		<xsl:for-each select="courses/c">
			<script type="text/javascript" src="data/gmData_{@id}.js?v=3"></script>
		</xsl:for-each>
		<link rel="stylesheet" href="js/leaflet.css" />
		<script src="js/leaflet.js"></script>
							<script src="js/leaflet-layers/IGN.js"></script>
				<script src="js/leaflet-layers/OSM.js"></script>
		<script src="js/leaflet-layers/TileLayer.collection.js"></script>
				<script type="text/javascript" src="js/parcours.js" />
		<script type="text/javascript">
			<xsl:for-each select="courses/c">
				<xsl:variable name="_cc" select="@id"/>
				var pts_<xsl:value-of select="@id"/>=[
				<xsl:variable name="pts" select="/d/points[@course = $_cc]/pt" />
				<xsl:for-each select="$pts">
					<xsl:variable name="_idpt" select="@idpt"/>
					<xsl:variable name="pospt" select="position()"/>
					<xsl:if test="$pospt&gt;1">,</xsl:if>
					  {marker:'',idpt:'<xsl:value-of select="@idpt"/>',kmt:'<xsl:call-template name="fmt-f"><xsl:with-param name="v" select="10 * ((@km div 10))" /><xsl:with-param name="format" select="'0.0'"/></xsl:call-template> km',kmp:'<xsl:choose><xsl:when test="$pospt&gt;1"><xsl:call-template name="fmt-f"><xsl:with-param name="v" select="10 * (((@km - $pts[$pospt - 1]/@km) div 10))" /><xsl:with-param name="format" select="'0.0'"/></xsl:call-template></xsl:when><xsl:otherwise>0</xsl:otherwise></xsl:choose> km',dt:'<xsl:call-template name="fmt-i"><xsl:with-param name="v" select="@d"/></xsl:call-template> m',dnegt:'<xsl:call-template name="fmt-i"><xsl:with-param name="v" select="(@d - (@a - $pts[1]/@a))"/></xsl:call-template> m',dp:'<xsl:choose><xsl:when test="$pospt&gt;1"><xsl:call-template name="fmt-i"><xsl:with-param name="v" select="(@d - $pts[$pospt - 1]/@d)"/></xsl:call-template></xsl:when><xsl:otherwise>0</xsl:otherwise></xsl:choose> m',p:"<xsl:value-of select="$pts[$pospt - 1]/@n"/>",a:'<xsl:call-template name="fmt-i"><xsl:with-param name="v" select="@a"/></xsl:call-template> m',n:"<xsl:value-of select="@n"/>",lon:'<xsl:value-of select="@lon"/>',lat:'<xsl:value-of select="@lat"/>',meet:'<xsl:value-of select="@meet"/>',hp:'<xsl:value-of select="@hp"/>',hd:'<xsl:value-of select="@hd"/>',b:'<xsl:value-of select="@b"/>'}
				</xsl:for-each>
				];
			</xsl:for-each>

							var key={
					ign:"2xyxfx0ztk5667ii7kc82eh3"
				};
			
			var traces=new Object();
			var carte=null;
			var globBound=[];
			var markerPos=null;
			function initMap(){
				<xsl:for-each select="courses/c">
					initMap_<xsl:value-of select="@id"/>();
				</xsl:for-each>
				setTimeout('igm_ter()',1000);
			}

			function igm_ter(){
				carte=L.map('map').setView([47, 2], 10);
				var lstlayers=L.TileLayer.collection();
				L.Util.extend(lstlayers, {
                                        "Relief": new L.tileLayer('https://api.mapbox.com/v4/mapbox.run-bike-hike/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibGl2ZXRyYWlsIiwiYSI6ImNpcWtzbDNldTAwMXRpd20ya2IzbDkzbGsifQ.5010elnnks4oVBZ5x8DuXw', {minZoom: 8, maxZoom: 22, attribution: '©<a href="https://www.mapbox.com/about/maps/" target="_blank">Mapbox</a> | ©<a href="http://openstreetmap.org" target="_blank">OpenStreetMap</a>'})
                                });
				L.Util.extend(lstlayers, {
					"Satellite": new L.tileLayer('https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v9/tiles/256/{z}/{x}/{y}?access_token=pk.eyJ1IjoibGl2ZXRyYWlsIiwiYSI6ImNpcWtzbDNldTAwMXRpd20ya2IzbDkzbGsifQ.5010elnnks4oVBZ5x8DuXw', {minZoom: 8, maxZoom: 22, attribution: '©<a href="https://www.mapbox.com/about/maps/" target="_blank">Mapbox</a> | ©<a href="http://openstreetmap.org" target="_blank">OpenStreetMap</a> | ©<a href="https://www.digitalglobe.com/" target="_blank">DigitalGlobe</a>'})
				});
								new L.Control.Layers(lstlayers).addTo(carte);
				new L.Control.Scale({imperial:false}).addTo(carte);
								carte.addLayer(lstlayers["OSM"]);

				<xsl:for-each select="courses/c">
					var col=$("._<xsl:value-of select="@id"/>").css("color");
					traces["<xsl:value-of select="@id"/>"]=initOneMap(p_<xsl:value-of select="@id"/>,col,pts_<xsl:value-of select="@id"/>,"<xsl:value-of select="@id"/>");
					globBound=globBound.concat(p_<xsl:value-of select="@id"/>);
				</xsl:for-each>

				var bounds = new L.LatLngBounds(globBound);
				carte.fitBounds(bounds);

				markerPos=new L.Marker(carte.getCenter());


				changeCourse();
			}
		</script>
          <div id="main" >
	<div id="bandeau" ></div>
		<div id="lg" >
	<label>LANGUE	&#160;</label>
	<span class="sel" title="Français">FR</span>		|	<a href="javascript:setCookie('langue_affich','_en');unsetCookie('homeTip');unsetCookie('runnerTip');location.reload(true);" title="English">EN</a>		|	<a href="javascript:setCookie('langue_affich','_es');unsetCookie('homeTip');unsetCookie('runnerTip');location.reload(true);" title="Español">ES</a>		|	<a href="javascript:setCookie('langue_affich','_it');unsetCookie('homeTip');unsetCookie('runnerTip');location.reload(true);" title="Italiano">IT</a>		|	<a href="javascript:setCookie('langue_affich','_de');unsetCookie('homeTip');unsetCookie('runnerTip');location.reload(true);" title="Deutsch">DE</a>				</div>
	<div id="main2"  >
		<table id="tmenu">
	  <thead>
		<tr>
		  		  <td width="200">
			<form class="rech" name="recherch" method="POST" style="margin:0;white-space:nowrap;" action="coureur.php" onsubmit="return getValue(document.recherch.rech)!='';">
			  <input type="text" name="rech" value="{@rech}" onfocus="this.select();"/>
			  <input type="submit" value="" class="btnfd"/>
			</form>
		  </td>
		  <td><span><a href="./">Accueil</a></span></td>
		  <td style="cursor:pointer" onclick="dispMenu();"><div>Infos</div></td>
		  <td style="cursor:pointer" onclick="dispMenu();"><div>Coureurs</div></td>
		  <td style="cursor:pointer" onclick="dispMenu();"><div>Suivis</div></td>
		  		  			  <td style="text-align:right;width:180px;">
								<span><a href="javascript:winlog()">S'identifier...</a></span>
							  </td>
			  		</tr>
	  </thead>
	  <tbody>
		<tr id="tbmenu" style="display:none" >
		  <td><div id="menulogo">&#160;</div></td>
		  <td>
			&#160;		  </td>
		  <td>
			<ul>
			  <li><a href="stats.php">Stat.</a></li>			  <li class="sel"><a href="parcours.php">Parcours</a></li>			</ul>
		  </td>
		  <td>
			<ul>
			  <li><a href="coureur.php">Fiche coureur</a></li>
			  <li><a href="favoris.php">Mes coureurs favoris</a></li>
			  <li><a href="lstfavoris.php">Liste des favoris</a></li>			  <li><a href="compare.php">Comparaison de coureurs</a></li>			  			  <li><a href="gps.php">Suivi GPS ou prédictif</a></li>			  					<li><a href="lstCoureurs.php">Liste des coureurs</a></li>
				  					<li><a href="lstPartants.php">Liste des partants</a></li>
								</ul>
		  </td>
		  <td>
			<ul>
			  <li><a href="teteCourse.php">Tête de course</a></li>			  <li><a href="prochains.php">Prochains arrivants</a></li>			  <li><a href="passages.php">Tableau des passages</a></li>			  <li><a href="classement.php">Classements</a></li>			  			  			  <li><a href="classementPoint.php">Classements par point</a></li>			  			  			  <li><a href="tabAbd.php">Tableau Abandons</a></li>			  			  			  <li>&#160;</li>
			</ul>
		  </td>
		  <td>&#160;</td>		</tr>
	  </tbody>
	</table>
			<div id="poplogin" title="S'identifier..." style="display:none" >
		  <form id="FormLog" name="FormLog" method="post" onsubmit="return false;" >
			<div>Amis organisateurs, identifiez-vous pour accéder à vos services réservés.<br/>Amis spectateurs, le suivi de course est en libre accès : pas besoin de vous identifier...<br/></div>
			<div><span>Login : </span><input type="text" name="login" value="" maxlength="256" size="20"/></div>
			<div><span>Mot de passe : </span><input type="password" name="pass" maxlength="256" size="15"/></div>
			<label><input name="keepConn" value="1" type="checkbox" checked="checked"/>Rester connecté</label>
			<div id="btnUser"><input type="submit" value="Valider" onclick="setUser();"/></div>
		  </form>
		</div>
			<div id="layhelprech" class="helper" style="display:none" >
	  <div class="br">
		<strong>RECHERCHE PAR :</strong><br/>&#160; - Le <strong>dossard</strong> d'un coureur<br/>    &#160; - Le <strong>nom</strong> d'un coureur, d'une équipe, ou d'un club<br/>    &#160; - Le <strong>prénom</strong> d'un coureur<br/>	  </div>
	</div>
		<style>
	.v3link {
		display:block;
		width: 99%;
		margin: auto;
		text-align:center;
		font-family: Calibri, "DejaVu Sans Condensed", Roboto, Arial, Verdana, sans-serif;
		font-weight: 400;
		font-size: 1rem;
		line-height: 1.5;
		color: #568498;
		text-decoration: none;
		text-transform: uppercase;
		background-color: white;
		border: 2px solid #568498;
		border-top: none;
		border-radius: 0px 0px 10px 10px;
		cursor: pointer;
		padding: 8px 0px 4px 0px;
	}
	.v3link:hover {
		color: black;
		text-decoration: underline;
	}
	</style>
	<a href="https://templiers.v3.livetrail.net/fr/2025" class="v3link">Découvrez la nouvelle version LiveTrail v3 &gt;</a>
	          <div id="gtete">
	<div id="ictete"/>
	<h1>Parcours		</h1>
	<xsl:if test="count(courses/c) &gt; 0">		<script type="text/javascript">
			<xsl:if test="@export != ''">
				function expTo(mode) {
					<xsl:if test="count(courses/c) &gt; 0">
						if($("#chxCourse").val()=="") {
							alert("Veuillez choisir une course pour obtenir le fichier.");
							return;
						}
					</xsl:if>
					<xsl:if test="count(cat/c) &gt; 0">
						if($("#chxCat").val()=="") {
							alert("Veuillez choisir une catégorie pour obtenir le fichier.");
							return;
						}
					</xsl:if>
					<xsl:if test="count(pts/p) &gt; 0">
						if($("#chxPt").val()=="") {
							alert("Veuillez choisir un point pour obtenir le fichier.");
							return;
						}
					</xsl:if>
					<xsl:if test="count(etp/e) &gt; 0">
						if($("#chxEtp").val()=="") {
							alert("Veuillez choisir une étape pour obtenir le fichier.");
							return;
						}
					</xsl:if>
					document.Chx.target="_blank";
					document.Chx.mode.value=mode;
					document.Chx.submit();
					document.Chx.target="";
					document.Chx.mode.value="";
				}
			</xsl:if>
			<xsl:if test="count(cat/c) &gt; 0">
				var _allcats={};
				<xsl:for-each select="courses/c">
					<xsl:variable name="selcatcourse" select="@id"/>
					_allcats["<xsl:value-of select="@id"/>"]=[''
						<xsl:for-each select="/d/cat/c">
							<xsl:if test="$selcatcourse = 'T' or (string(@c) = '' and (string(@id)='scratch' or string(@id)='all')) or contains(@c, concat('|',$selcatcourse,'|'))">
								,{id:"<xsl:value-of select="@id"/>", n:"<xsl:call-template name="getCategName">
											<xsl:with-param name="id" select="@id" />
											<xsl:with-param name="n" select="@n" />
										</xsl:call-template><xsl:if test="string(@descat)!=''"> (<xsl:value-of select="string(@descat)"/>)</xsl:if>", sel:"<xsl:value-of select="string(@sel)"/>" }
							</xsl:if>
						</xsl:for-each>
					];
				</xsl:for-each>
			</xsl:if>
			<xsl:if test="count(etp/e) &gt; 0">
				var _alletps={};
				<xsl:for-each select="courses/c">
					<xsl:variable name="seletpcourse" select="@id"/>
					_alletps["<xsl:value-of select="@id"/>"]=[''
						<xsl:for-each select="/d/etp/e">
							<xsl:if test="$seletpcourse = 'T' or string(@c) = '' or @c=$seletpcourse">
								,{id:"<xsl:value-of select="@id"/>", n:"<xsl:value-of select="@n"/>", sel:"<xsl:value-of select="string(@sel)"/>"}
							</xsl:if>
						</xsl:for-each>
					];
				</xsl:for-each>
			</xsl:if>
			<xsl:if test="count(pts/p) &gt; 0">
				var _allpts={};
				<xsl:for-each select="courses/c">
					<xsl:variable name="selptscourse" select="@id"/>
					_allpts["<xsl:value-of select="@id"/>"]=[''
						<xsl:for-each select="/d/pts/p">
							<xsl:if test="$selptscourse = 'T' or contains(@c, concat('|',$selptscourse,'|'))">
								,{id:"<xsl:value-of select="@idpt"/>", n:"<xsl:value-of select="@n"/>", sel:"<xsl:value-of select="string(@sel)"/>", sel2:"<xsl:value-of select="string(@sel2)"/>"}
							</xsl:if>
						</xsl:for-each>
					];
				</xsl:for-each>
			</xsl:if>
			<xsl:if test="count(pays/p) &gt; 0">
				var _allpays={};
				<xsl:for-each select="courses/c">
					<xsl:variable name="selpayscourse" select="@id"/>
					_allpays["<xsl:value-of select="@id"/>"]=[''
						<xsl:for-each select="/d/pays/p">
							<xsl:variable name="selpayspays" select="@id"/>
							<xsl:if test="$selpayscourse = 'T' or contains(@c, concat('|',$selpayscourse,'|'))">
								,{id:"<xsl:value-of select="@id"/>", n:"<xsl:choose>
										<xsl:when test="$selpayspays='all'">Toutes les nationalités</xsl:when>
										<xsl:otherwise>
											<xsl:value-of select="@n"/>
										</xsl:otherwise></xsl:choose>", sel:"<xsl:value-of select="string(@sel)"/>"}
							</xsl:if>
						</xsl:for-each>
					];
				</xsl:for-each>
			</xsl:if>
		</script>
		<form name="Chx" id="Chx" method="POST">
			<div style="float:left;min-width:300px;">
				<xsl:if test="count(courses/c) &gt; 0">
				<div class="chx">
					<div>Choisir la course</div>
					<xsl:choose>
						<xsl:when test="count(courses/c[string(@id)!='T'])&gt;1">
							<select id="chxCourse" name="course">
								<xsl:choose>
									<xsl:when test="count(cat/c) &gt; 0 and count(pts/p) &gt; 0 and count(pays/p) &gt; 0"><xsl:attribute name="onchange">selCat();selPts();selPays();</xsl:attribute></xsl:when>
									<xsl:when test="count(cat/c) &gt; 0 and count(etp/e) &gt; 0 and count(pays/p) &gt; 0"><xsl:attribute name="onchange">selCat();selEtp();selPays();</xsl:attribute></xsl:when>
									<xsl:when test="count(cat/c) &gt; 0 and count(pays/p) &gt; 0"><xsl:attribute name="onchange">selCat();selPays();</xsl:attribute></xsl:when>
									<xsl:when test="count(pts/p) &gt; 0 and count(pays/p) &gt; 0"><xsl:attribute name="onchange">selPts();selPays();</xsl:attribute></xsl:when>
									<xsl:when test="count(etp/e) &gt; 0 and count(pays/p) &gt; 0"><xsl:attribute name="onchange">selEtp();selPays();</xsl:attribute></xsl:when>
									<xsl:when test="count(cat/c) &gt; 0 and count(etp/e) &gt; 0"><xsl:attribute name="onchange">selCat();selEtp();</xsl:attribute></xsl:when>
									<xsl:when test="count(cat/c) &gt; 0 and count(pts/p) &gt; 0"><xsl:attribute name="onchange">selCat();selPts();</xsl:attribute></xsl:when>
									<xsl:when test="count(cat/c) &gt; 0"><xsl:attribute name="onchange">selCat();</xsl:attribute></xsl:when>
									<xsl:when test="count(pays/p) &gt; 0"><xsl:attribute name="onchange">selPays();</xsl:attribute></xsl:when>
									<xsl:when test="count(pts/p) &gt; 0"><xsl:attribute name="onchange">selPts();</xsl:attribute></xsl:when>
									<xsl:when test="count(etp/e) &gt; 0"><xsl:attribute name="onchange">selEtp();</xsl:attribute></xsl:when>
								</xsl:choose>
								<xsl:if test="string(courses/c[1]/@id) != 'T'">
									<option value="">-</option>
								</xsl:if>
								<xsl:for-each select="courses/c">
									<xsl:choose>
										<xsl:when test="string(@id) = 'T'">
											<option value="T">
												<xsl:if test="string(@sel) = '1'"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if>
												Toutes les courses											</option>
										</xsl:when>
										<xsl:otherwise><option value="{@id}"><xsl:if test="string(@sel) = '1'"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if><xsl:value-of select="@nc"/></option></xsl:otherwise>
									</xsl:choose>
								</xsl:for-each>
							</select>
						</xsl:when>
						<xsl:otherwise>
							<input type="hidden" id="chxCourse" name="course" value="{courses/c[string(@id)!='T'][1]/@id}"/>
							<xsl:value-of select="courses/c[string(@id)!='T'][1]/@nc"/>
						</xsl:otherwise>
					</xsl:choose>
					<span style="display:block;position:relative;">
						<a href="javascript:keepMem();" class="keep" id="keeplink">&gt; Garder mes choix en mémoire</a>
						<span id="keepok" class="keep">&gt; Choix mémorisés... &lt;</span>
					</span>
				</div>
				</xsl:if>
				<xsl:if test="count(cat/c) &gt; 0">
					<div class="chx">
						<div>Choisir la catégorie</div>
						<select id="chxCat" name="cat"></select>
					</div>
				</xsl:if>
				<xsl:if test="count(etp/e) &gt; 0">
					<div class="chx">
						<div>Choisir l'étape</div>
						<select id="chxEtp" name="etp"></select>
					</div>
				</xsl:if>
				<xsl:if test="count(pts/p) &gt; 0">
					<div class="chx">
						<div>
							Choisir le point							<xsl:if test="string(pts/@pt2) = '1'">&#160;1</xsl:if>
						</div>
						<select id="chxPt" name="pt">
							<xsl:if test="string(pts/@pt2) = '1'">
								<xsl:attribute name="onchange">
									if(this.selectedIndex&gt;this.form.pt2.selectedIndex) this.form.pt2.selectedIndex=this.selectedIndex;
								</xsl:attribute>
							</xsl:if>
						</select>
					</div>
				</xsl:if>
				<xsl:if test="count(pays/p) &gt; 0">
					<div class="chx">
						<div>Choisir la nationalité CIO</div>
						<select id="chxPays" name="pays">
												</select>
					</div>
				</xsl:if>
				<xsl:if test="string(pts/@pt2) = '1'">
					<div class="chx">
						<div>
							Choisir le point 2
						</div>
						<select name="pt2" id="chxPt2">
							<xsl:attribute name="onchange">
								if(this.selectedIndex&lt;this.form.pt.selectedIndex) this.form.pt.selectedIndex=this.selectedIndex;
							</xsl:attribute>
						</select>
					</div>
				</xsl:if>
				<xsl:if test="string(@fromto) = '1'">
					<div class="chx">
						<div>
							Afficher les coureurs						</div>
						<p>
							du &#160;<input type="text" id="chxFrom" name="from" value="{string(@from)}" maxlength="6" style="width:35px;"/>e							&#160;au &#160;<input type="text" id="chxTo" name="to" value="{string(@to)}" maxlength="6" style="width:35px;"/>e						</p>
					</div>
				</xsl:if>
				<xsl:if test="string(@byhour) != ''">
					<div class="chx">
						<div>
							Afficher en						</div>
						<p>
							<label>
								<input type="radio" name="byhour" id="chxByhour0" value="0">
									<xsl:if test="string(@byhour)!='1'"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if>
								</input>
								Temps							</label><br/>
							<label>
								<input type="radio" name="byhour" id="chxByhour1" value="1">
									<xsl:if test="string(@byhour)='1'"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if>
								</input>
								Heures							</label>
						</p>
					</div>
				</xsl:if>
								<div style="clear:both;text-align:right;padding-top:10px;">
					<a class="btn" style="padding-left:40px; text-align:right;">
						<xsl:attribute name="href">
							<xsl:choose>
								<xsl:when test="string(courses/@submit) = ''">javascript:document.Chx.submit();</xsl:when>
								<xsl:otherwise>javascript:<xsl:value-of select="string(courses/@submit)"/></xsl:otherwise>
							</xsl:choose>
						</xsl:attribute>
						Valider					</a>
				</div>
			</div>
							<xsl:if test="@export != ''">
					<input type="hidden" name="mode" value=""/>
					<div style="float:right;margin-right:10px;">
						<div class="chx" style="float:right;width:auto;max-width:150px;text-align:right;">
							<div>Télécharger au format</div>
							<p>
								<xsl:if test="contains(@export,'pdf')"><a href="javascript:expTo('pdf')">PDF</a> | </xsl:if>
															</p>
							<xsl:if test="contains(@export,'lotpdf') and count(cat/c) &gt; 0">
								<div style="float:right;width:auto;margin-top:8px;">
									<a href="javascript:" onclick="$('#lotpdfCourse').val($('#chxCourse').val());$('#lotpdfEtp').val($('#chxEtp').val());$('#lotpdfModetemps').val($('.custom input[name=modetemps]:checked').val());$('#popLotpdf').dialog('open');return false;">Téléchargement Multi-PDF</a>
								</div>
							</xsl:if>
							<xsl:if test="contains(@export,'pdfwithinter') ">
								<div style="clear:both;float:right;width:auto;margin-top:8px;">
									<input type="hidden" value="" name="dispCP" />
									Avec Intermédiaires : <a href="javascript:addInter('html')" >View</a>, <a href="javascript:addInter('pdf')" >PDF</a><xsl:if test="contains(@export,'xlswithinter') ">, <a href="javascript:addInter('xls')" >XLS</a></xsl:if>
								</div>
							</xsl:if>
							<xsl:if test="contains(@export,'totalxls')">
								<div style="clear:both;float:right;width:auto;margin-top:8px;">
									<a href="javascript:expTo('totalxls')">Téléchargement Total Excel</a>
								</div>
							</xsl:if>
						</div>
					</div>
				</xsl:if>
							<xsl:if test="count(pub)&gt;0">
				<div style="float:right;margin-right:10px;width:350px;padding:10px 10px 0 0;">
					<xsl:copy-of select="pub/child::node()"/>
				</div>
			</xsl:if>
		</form>
	</xsl:if></div>
<xsl:if test="contains(@export,'lotpdf') and count(cat/c) &gt; 0">
	<div class="pop" id="popLotpdf" title="Téléchargement Multi-PDF">
		<div style="text-align:center">
			<form name="lotpdf" target="_blank" method="post" onsubmit="$('#popLotpdf').dialog('close');">
				<input type="hidden" name="mode" value="lotpdf"/>
				<input type="hidden" name="course" id="lotpdfCourse" value=""/>
				<input type="hidden" name="etp" id="lotpdfEtp" value=""/>
				<input type="hidden" name="modetemps" id="lotpdfModetemps" value=""/>
				<table border="1" id="catlotpdf">
				</table>
				<input type="submit" value="Valider"/>
			</form>
		</div>
	</div>
</xsl:if>
<div id="endgtete"></div>
          <div id="content">
			<input type="hidden" id="msgCarteKo" value="Veuillez d'abord choisir la course afin de pouvoir afficher les détails du point de contrôle..." />
			<div id="map" class="vue"></div>
			<div style="font-size:14px;font-weight:bold" >
				<xsl:for-each select="courses/c">
					<span class="_{@id}" ><xsl:value-of select="@n"/>&#160;&#160;</span>
				</xsl:for-each>
			</div>
			<br/>
			<div id="profil">
				<div style="height:80px" ></div>
				<div id="infosProfilFlech"></div>
				<div id="infosProfil" style="display:none" >
			  <table data="details_pass" class="sumup up rmargin">
				<tr>
					<th>Dist. depuis le départ</th>
					<td data="kmt" ></td>
				</tr>
				<tr>
					<th><input type="hidden" data="n-1km" value="Dist. depuis " /><label data="n-1km"></label></th>
					<td data="kmp" ></td>
				</tr>
				<tr>
					<th>D+ depuis le départ</th>
					<td data="dt" ></td>
				</tr>
				<tr>
					<th><input type="hidden" data="n-1d" value="D+ depuis " /><label data="n-1d"></label></th>
					<td data="dp" ></td>
				</tr>
				<tr>
					<th>Elevation Loss</th>
					<td data="dnegt" ></td>
				</tr>
			  </table>
			  <table class="sumup up">
				<tr>
					<th>Altitude</th>
					<td data="a" ></td>
				</tr>
				<tr>
					<th>Premiers</th>
					<td data="hp" ></td>
				</tr>
				<tr>
					<th>Derniers</th>
					<td data="hd" ></td>
				</tr>
				<tr>
					<th>Barrière</th>
					<td data="b" ></td>
				</tr>
			  </table>
			  <div class="title" ></div>
			</div>
			<xsl:for-each select="courses/c">
				<xsl:variable name="__cc" select="@id"/>
				 <div class="profil" id="profil_{$__cc}" style="position:relative">
				  <img src="images/profil_{@id}.png?v=3" border="0" onmousemove="mouseMove(event, this,pla_{@id},plo_{@id});" />
				  <xsl:variable name="_pts" select="/d/points[@course = $__cc]/pt" />
				  <xsl:for-each select="$_pts">
						<div data="{@idpt}|{$__cc}" style="top:{number(@py)}%;left:{number(@px)}%;transform:translate(-7px,-7px);">
						<xsl:attribute name="class">
						  <xsl:choose>
							<xsl:when test="@meet = 1">_<xsl:value-of select="$__cc"/> pts meet</xsl:when>
							<xsl:otherwise>_<xsl:value-of select="$__cc"/> pts </xsl:otherwise>
						   </xsl:choose>
						</xsl:attribute>
					  </div>
				  </xsl:for-each>
				</div>
			</xsl:for-each>
			</div>
			<br/><i>Astuce : déplacez la souris sur le profil, le curseur se déplace aussi sur la carte...</i><br/>
          </div>
          <xsl:if test="count(/d/error)&gt;0 and string(/d/@rech)=''">
<div id="content"><h3>Une erreur est survenue :
<xsl:copy-of select="/d/error/child::node()"/>
</h3></div>
</xsl:if>
				  <div id="parten">
			<span class="l"></span>
			<div>PARTENAIRES</div>
			<img src="images/parten_horiz.jpg"/>
			<span class="r"></span>
		  </div>
				<div id="botmain">
						<div style="float:right;">
				Powered by <a href="https://livetrail.net" target="_blank"><img style="position:relative; top:3px;" src="im/miniLogo.png"/></a>&#160;
			</div>
			<a href="reclam.php">Contact</a>		</div>
	</div>
</div>
      </body>
    </html>
  </xsl:template>

  <!-- Renvoie le nom d'une categ potentiellement générique -->
<xsl:template name="getCategName">
	<xsl:param name="id"/>
	<xsl:param name="n"/>
	<xsl:choose>
		<xsl:when test="string($id)='scratch'">Scratch</xsl:when>
		<xsl:when test="string($id)='scratchH'">Scratch Hommes</xsl:when>
		<xsl:when test="string($id)='scratchF'">Scratch Femmes</xsl:when>
		<xsl:when test="string($id)='scratchMx'">Equipes Mixtes</xsl:when>
		<xsl:when test="string($id)='all'">Toutes catégories</xsl:when>
		<xsl:when test="string($id)='onlyH'">Hommes</xsl:when>
		<xsl:when test="string($id)='onlyF'">Femmes</xsl:when>
		<xsl:when test="string($id)='Mx'">Equipes Mixtes</xsl:when>
		<xsl:when test="string($id)='H'">Equipes Hommes</xsl:when>
		<xsl:when test="string($id)='F'">Equipes Femmes</xsl:when>
		
		<xsl:when test="string($n)!=''"><xsl:value-of select="$n"/></xsl:when>
		<xsl:otherwise><xsl:value-of select="$id"/></xsl:otherwise>
	</xsl:choose>
</xsl:template>

<!-- Format de time avec jour/heure Jr. hh:mm -->
<xsl:template name="fmt-dtjt">
    <xsl:param name="j"/>
    <xsl:param name="t"/>
    <xsl:choose>
      <xsl:when test="$j=1">Lu</xsl:when>
      <xsl:when test="$j=2">Ma</xsl:when>
      <xsl:when test="$j=3">Me</xsl:when>
      <xsl:when test="$j=4">Je</xsl:when>
      <xsl:when test="$j=5">Ve</xsl:when>
      <xsl:when test="$j=6">Sa</xsl:when>
      <xsl:when test="$j=7">Di</xsl:when>
    </xsl:choose>. <xsl:value-of select="concat(substring-before($t,':'),':',substring-before(substring-after($t,':'),':'))" />
  </xsl:template>
  
  <!-- Format de date jj/mm/aaaa -->
  <xsl:template name="fmt-d">
    <xsl:param name="d"/>
    <xsl:value-of select="substring-after(substring-after($d,'-'),'-')" />/<xsl:value-of select="substring-before(substring-after($d,'-'),'-')" />/<xsl:value-of select="substring-before($d,'-')" />
  </xsl:template>
  <!-- Format de datetime jj/mm/aaaa hh:mm:ss -->
  <xsl:template name="fmt-dt">
    <xsl:param name="dt"/>
    <xsl:value-of select="substring-after(substring-after(substring-before($dt,' '),'-'),'-')" />/<xsl:value-of select="substring-before(substring-after($dt,'-'),'-')" />/<xsl:value-of select="substring-before($dt,'-')" /><xsl:text> </xsl:text>
    <xsl:value-of select="substring-after($dt,' ')" />
  </xsl:template>
  
  <!-- Format de nombre -->
  <xsl:template name="fmt-f">
    <xsl:param name="v"/>
    <xsl:param name="format"/>
    <xsl:variable name="fmt"><xsl:choose><xsl:when test="string($format)=''">#,##0</xsl:when><xsl:otherwise><xsl:value-of select="$format"/></xsl:otherwise></xsl:choose></xsl:variable>
    <xsl:choose>
		<xsl:when test="string($v) = 'Infinity'">-</xsl:when>
					<xsl:otherwise><xsl:value-of select="translate(translate(format-number($v, $fmt),',',' '),'.',',')" /></xsl:otherwise>
		    </xsl:choose>
  </xsl:template>

  <xsl:template name="fmt-i">
	<xsl:param name="v"/>
			<xsl:value-of select="translate(format-number($v, '#,##0'), ',', ' ')" />
	  </xsl:template>

<!-- convertit un temps en secondes en hh:mm -->
  <xsl:template name="sec2time">
    <xsl:param name="sec"/>
    <xsl:if test="$sec&lt;0">-</xsl:if><xsl:value-of select="format-number(floor(($sec*($sec&gt;=0)-$sec*($sec&lt;0)) div 3600), '0')" />:<xsl:value-of select="format-number(floor((($sec*($sec&gt;=0)-$sec*($sec&lt;0)) mod 3600) div 60), '00')" />
  </xsl:template>
  
  <xsl:template name="sec2timefull">
    <xsl:param name="sec"/>
    <xsl:if test="$sec&lt;0">-</xsl:if><xsl:value-of select="format-number(floor(($sec*($sec&gt;=0)-$sec*($sec&lt;0)) div 3600), '0')" />:<xsl:value-of select="format-number(floor((($sec*($sec&gt;=0)-$sec*($sec&lt;0)) mod 3600) div 60), '00')" />:<xsl:value-of select="format-number($sec mod 60, '00')" />
  </xsl:template>

<!-- convertit un temps numérique en heures en hh:mm:ss -->
<xsl:template name="hour2time">
    <xsl:param name="h"/>
	<xsl:choose>
    <xsl:when test="$h&lt;0">-</xsl:when>
	<xsl:otherwise>
		<xsl:value-of select="format-number(floor($h), '00')" />:<xsl:value-of select="format-number(floor( ($h - floor($h))*60 ), '00')" />:<xsl:value-of select="format-number(round( ($h*60 - floor($h*60))*60 ), '00')" />
	</xsl:otherwise>
	</xsl:choose>
  </xsl:template>
  
<!-- convertit un temps en minutes en mm:ss -->  
  <xsl:template name="minutes2pace">
    <xsl:param name="minutes"/>
    <xsl:if test="$minutes&lt;0">-</xsl:if><xsl:value-of select="format-number(floor($minutes), '00')" />:<xsl:value-of select="format-number(round(($minutes - floor($minutes)) * 60), '00')" />
  </xsl:template>

  
  <xsl:template name="calc-vit">
    <xsl:param name="dist"/>
    <xsl:param name="tps"/>
    <xsl:param name="pace"/>
	<xsl:choose>
		<xsl:when test="string($pace)='1'">
			<xsl:call-template name="minutes2pace">
				<xsl:with-param name="minutes" select="60 div (($dist) div $tps)"/>
			</xsl:call-template>
		</xsl:when>
		<xsl:when test="string($pace)='2'">
			<xsl:call-template name="minutes2pace">
				<xsl:with-param name="minutes" select="60 div ((10 * $dist) div $tps)"/>
			</xsl:call-template>
		</xsl:when>
		<xsl:otherwise>
			<xsl:call-template name="fmt-f">
				<xsl:with-param name="v" select="($dist) div $tps"/>
				<xsl:with-param name="format" select="'0.00'"/>
			</xsl:call-template>
		</xsl:otherwise>
	</xsl:choose>
  </xsl:template>
  

</xsl:stylesheet>
