<?xml version="1.0" encoding="ISO-8859-15"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xslc="http://xslcomponents.org/TR/WD-xslc" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
	<xsl:import href="../../xslc.xsl"/>
	<xsl:import href="../../Common.xsl"/>
	<xsl:template match="/">
		<xsl:apply-templates select="document"/>
	</xsl:template>
	<xsl:template name="string-replace-all">
		<xsl:param name="text"/>
		<xsl:param name="replace"/>
		<xsl:param name="by"/>
		<xsl:choose>
			<xsl:when test="$text = '' or $replace = ''or not($replace)">
				<!-- Prevent this routine from hanging -->
				<xsl:value-of select="$text"/>
			</xsl:when>
			<xsl:when test="contains($text, $replace)">
				<xsl:value-of select="substring-before($text,$replace)"/>
				<xsl:value-of select="$by"/>
				<xsl:call-template name="string-replace-all">
					<xsl:with-param name="text" select="substring-after($text,$replace)"/>
					<xsl:with-param name="replace" select="$replace"/>
					<xsl:with-param name="by" select="$by"/>
				</xsl:call-template>
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="$text"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template match="document">
		<xsl:call-template name="xslc:Page">
			<xsl:with-param name="OutputPartialFrame">
				<xsl:if test="/document/OutParams/XMLC_ShowTop='0'">0</xsl:if>
				<xsl:if test="/document/OutParams/XMLC_ShowTop!='0'">1</xsl:if>
			</xsl:with-param>
			<xsl:with-param name="Head">
				<META HTTP-EQUIV="imagetoolbar" CONTENT="no"/>
				<script language="javascript">// ==========================================================================
// Afficher la fenêtre popup pour la recherche YUI
// ==========================================================================
var flagMovedYUI;
function PopSelYUI(PopID, btnID) {
  if (popObj = getObjectById(PopID)) {
    if (btnObj = getObjectById(btnID)) {
      ShowHide(PopID, 'WIDTH', 557, 'HEIGHT', 435); 
      if (flagMovedYUI!=-1) 
       { 
        flagMovedYUI=-1; 
        popObj.style.top = 15;
        popObj.style.left = GetObjectPosX(btnID)-550;
       };
      popObj.src = 'SearchVO';
    }
  }
}
// ==========================================================================
// Afficher la fenêtre popup pour l'Upload
// ==========================================================================
var flagMovedUpload;
function PopSelUpload(PopID, btnID) {
  if (popObj = getObjectById(PopID)) {
    if (btnObj = getObjectById(btnID)) {
      ShowHide(PopID, 'WIDTH', 657, 'HEIGHT', 525); 
      if (flagMovedUpload!=-1) 
       { 
        flagMovedUpload=-1; 
        popObj.style.top = 15;
        popObj.style.left = GetObjectPosX(btnID)-650;
       };
      popObj.src = 'UploadDatas';
    }
  }
}
// ==========================================================================
// Afficher la fenêtre popup pour le choix des impressions
// ==========================================================================
var flagMoved;
function PopSelReport(PopID, btnID) {
  if (popObj = getObjectById(PopID)) {
    if (btnObj = getObjectById(btnID)) {
      ShowHide(PopID, 'WIDTH', 400, 'HEIGHT', 220); 
      if (flagMoved!=-1) 
       { 
        flagMoved=-1; 
        popObj.style.top = 15;
        popObj.style.left = GetObjectPosX(btnID)-405;
       };
      popObj.src = XMLC_BaseHRef+'SelReport';
    }
  }
}</script>
				<script language="javascript">
					<![CDATA[   function oForm(oWidth, oHeight) {
      if (vidPaneID.style.display=='block') {
         vidPaneID.style.display='none';
//         vidPaneID.innerHTML=''; 
      } else {
         vidPaneID.style.display='block';
//         vidPaneID.style.width=oWidth;
//         vidPaneID.style.height=oHeight;
      }
   }]]>
					<![CDATA[   function ShowHideForm(vid) {
      if (vid.style.display=='block') {
         vid.style.display='none';
      } else {
         vid.style.display='block';
      }
   }]]>
				</script>
				<script language="javascript">
					<![CDATA[   function dragHandler(e){
      var htype='-moz-grabbing';
      if (e == null) { e = window.event; htype='move';} 
      var target = e.target != null ? e.target : e.srcElement;
      orgCursor=target.style.cursor;
      if ((target.className=='BoxFrameVD') || (target.className=='BoxFrameVN') || (target.className=='BoxFrameVO')) {
         savedTarget=target;       
         target.style.cursor=htype;
         dragOK=true;
         dragXoffset=e.clientX-parseInt(vidPaneID.style.left);
         dragYoffset=e.clientY-parseInt(vidPaneID.style.top);
         document.onmousemove=moveHandler;
         document.onmouseup=cleanup;
         return false;
      }
   }
   document.onmousedown=dragHandler;]]>
				</script>
				<script language="javascript">
					<![CDATA[   var savedTarget=null; // The target layer 
   var orgCursor=null;   // The original Cursor (mouse) Style so we can restore it
   var dragOK=false;     // True if we're allowed to move the element under mouse
   var dragXoffset=0;    // How much we've moved the element on the horozontal
   var dragYoffset=0;    // How much we've moved the element on the verticle	 
//   var vidPaneID = null;]]>
				</script>
				<script language="javascript">
					<![CDATA[// ==========================================================================
// Afficher la fenêtre popup pour la saisie des infos VO
// ==========================================================================
function PopFormAxVO(PopID, idVO) {
  if (popObj = getObjectById(PopID)) {
      popObj.src = XMLC_BaseHRef+'FormAxVO?idTVO='+idVO;
  }
}]]>
					<![CDATA[// ==========================================================================
// Afficher la fenêtre popup pour la saisie des infos VO
// ==========================================================================
function lPopFormAxVO(PopID, idVO) {
  if (popObj = getObjectById(PopID)) {
      popObj.src = XMLC_BaseHRef+'FormAxVO?idTVO='+idVO;
  }
}]]>
				</script>
				<script language="javascript">
					<![CDATA[function handleKeyPress(e) {
  var keyCode = GetEventKeyCode(e);
// sur Entrer : Valider
  if (keyCode == 13) {
    goSubmit(); return false; }
  if (keyCode == 27) {
    parent.ShowHide('SelPrint'); return false;}
//  return false;
}]]>
					<![CDATA[// 
// Valider les paramètres d'appel et lancement Submit
// 
function goSubmit() {
 if ((GetField(MainForm, 'ShowStats')=='VOLINE') && (verifdate('MainForm', 'DateREF')==false)) {
     SetFocus(getObjectById('DateREF')); return false; }
SubmitForm('MainForm'); 
}
]]>
					<![CDATA[// 
// Vérification d'une date
// 
function verifdate(FormID, FieldName) {
    var datetest = GetField(FormID, FieldName);
    var format = /^(\d{1,2}\/){2}\d{4}$/;
    if(!format.test(datetest)){ return false;}
    else{
        var date_temp = datetest.split('/');
        date_temp[1] -=1;        // On rectifie le mois car de 0 à 11 !!!
        adate = new Date();
        adate.setFullYear(date_temp[2]);
        adate.setMonth(date_temp[1]);
        adate.setDate(date_temp[0]);
        return true;
    }
}]]>// 
// Afficher la fenêtre popup pour le calendrier XMLC_Calendar
// 
function PopCalendar(PopID, FieldName) {
  if (Pop = getObjectById(PopID)) {
    if (obj = getObjectById(FieldName)) {
      ShowHide(PopID, 'WIDTH', 180, 'HEIGHT', 130); 
      aPos=GetObjectPosY(FieldName)-105;
      if (Pop.style.top != aPos) {
        Pop.style.top = aPos;
      }
      CalendarURL = XMLC_BaseHRef+'XMLC_PopupCalendar?XMLC_FieldName='+FieldName;
      CalendarURL += '&amp;XMLC_DateValue=' + obj.value;
      CalendarURL += '&amp;XMLC_PopID=' + PopID;
      Pop.src = CalendarURL;
    }
  }
}</script>
			</xsl:with-param>
			<xsl:with-param name="DisplayToolbar">
				<xsl:if test="/document/Params/XMLC_ShowTop='0'">0</xsl:if>
				<xsl:if test="/document/Params/XMLC_ShowTop!='0'">1</xsl:if>
			</xsl:with-param>
			<xsl:with-param name="DisplayTabControl">0</xsl:with-param>
			<xsl:with-param name="DisplayTabs">0</xsl:with-param>
			<xsl:with-param name="Title">A propos </xsl:with-param>
			<xsl:with-param name="ToolbarButtonsLeft">
				<ToolbarButton>
					<xsl:call-template name="ToolButtonRefresh"/>
				</ToolbarButton>
			</xsl:with-param>
			<xsl:with-param name="ToolbarButtonsRight">
				<xsl:call-template name="VOLineToolbarButtonsRight"/>
			</xsl:with-param>
			<xsl:with-param name="ActivePageName">About</xsl:with-param>
			<xsl:with-param name="Body">
				<xsl:if test="(/document/Params/XMLC_ShowTop='0') and (/document/Params/XMLC_ShowInfo='' or /document/Params/XMLC_ShowInfo='0')">
					<p>Bonjour, </p>
					<p>Veuillez trouver ci-après les rapports journaliers :</p>
					<xsl:comment>START-SUBJECTOpticar : Transferts &amp; StatistiquesEND-SUBJECT</xsl:comment>
					<xsl:comment>START-SENDTO<xsl:value-of select="/document/ListCONTACTS"/>END-SENDTO</xsl:comment>
					<xsl:if test="/document/ListCONTACT_CCS!=''">
						<xsl:comment>START-SENDCC<xsl:value-of select="/document/ListCONTACT_CCS"/>END-SENDCC</xsl:comment>
					</xsl:if>
				</xsl:if>
				<xsl:if test="(/document/Params/XMLC_ShowTop='0') and (/document/Params/XMLC_ShowInfo='1')">
					<p>Bonjour, </p>
					<p>Veuillez trouver en pièce jointe le rapport VN38</p>
					<xsl:comment>START-SUBJECTOpticar : Rapport VN38END-SUBJECT</xsl:comment>
					<xsl:comment>START-SENDTOchristophe.decroix@valautolille.comEND-SENDTO</xsl:comment>
					<xsl:comment>START-SENDCCllebleu@bluelinecompany.frEND-SENDCC</xsl:comment>
				</xsl:if>
				<xsl:if test="/document/OutParams/XMLC_ShowTop!='0'">
					<div id="vdivFormVO" class="BoxFrameVO" style="position: absolute; display: none; z-index:1000; PADDING-LEFT: 7 px; ">
						<button class="window-close" onclick="javascript: window.parent.ShowHideForm(vidPaneID);">
							<img border="0" src="{$XMLC_PictosPath}ico_closenew.gif" alt="pour quitter sans enregistrer ..."/>
						</button>Visualisation des données d'un VO <iframe id="FormVO" name="FormVO" border="0" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="{$XMLC_Portal}blank.htm" style="position: absolute; z-index:1000;PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px; "/>
					</div>
				</xsl:if>
				<xsl:call-template name="xslc:ApplicationMessages"/>
				<xsl:variable name="vDLL">
					<xsl:value-of select="/document/XMLC_Params/XMLC_ScriptName"/>/</xsl:variable>
				<xsl:variable name="vAction">
					<xsl:value-of select="/document/Aliases/bdVODLL"/>
					<xsl:value-of select="/document/XMLC_Params/XMLC_Action"/>
				</xsl:variable>
				<xsl:variable name="vPar1">
					<xsl:if test="/document/Params/vCompare='' or /document/Params/vCompare='0' ">du mois</xsl:if>
					<xsl:if test="/document/Params/vCompare='1' ">-FDM- du mois</xsl:if>
					<xsl:if test="/document/Params/vCompare='2'">-FDM- de l'année</xsl:if>
				</xsl:variable>
				<xsl:variable name="vPar2">
					<xsl:if test="/document/Params/vCompare='' or /document/Params/vCompare='0' ">du mois précédent</xsl:if>
					<xsl:if test="/document/Params/vCompare='1'">-FDM- du mois (An-1)</xsl:if>
					<xsl:if test="/document/Params/vCompare='2'">-FDM- de l'année (An-1)</xsl:if>
				</xsl:variable>
				<xsl:if test="$vDLL!=/document/Aliases/bdVODLL">
					<p align="right">Non OK, utilisez plutôt le lien suivant :<a href="{$vAction}" style="color:red">http://<xsl:value-of select="$vAction"/>
						</a>
					</p>
				</xsl:if>
				<xsl:if test="/document/Params/XMLC_ShowTop!='0'">
					<xsl:call-template name="VOZoneTab">
						<xsl:with-param name="nService">About</xsl:with-param>
					</xsl:call-template>
				</xsl:if>
				<xsl:if test="/document/Params/XMLC_ShowTop!='0' and /document/XMLC_Params/XMLC_Authenticated != '0' ">
					<form name="MainForm" method="POST" action="{/document/Aliases/FibronetDLL}About" onkeypress="return handleKeyPress(event);">
						<input type="hidden" name="ShowStats" value="{/document/Params/ShowStats}"/>
						<xsl:if test="/document/XMLC_Params/User_Agent = '0'">
						<select id="CBShowStats" style="width:200px" onchange="javascript: document.MainForm.ShowStats.value=getObjectById('CBShowStats').value; goSubmit(); return false;">
							<option value="">
								<xsl:if test="/document/Params/ShowStats=''">
									<xsl:attribute name="selected"/>
								</xsl:if>Choix type de statistiques</option>
							<option value="CARFID">
								<xsl:if test="/document/Params/ShowStats='CARFID'">
									<xsl:attribute name="selected"/>
								</xsl:if>Statistiques Carfid</option>
							<option value="PROFID">
								<xsl:if test="/document/Params/ShowStats='PROFID'">
									<xsl:attribute name="selected"/>
								</xsl:if>Statistiques Profid</option>
							<option value="VOLINE">
								<xsl:if test="/document/Params/ShowStats='VOLINE'">
									<xsl:attribute name="selected"/>
								</xsl:if>Statistiques VO.Line</option>
							<option value="ALL">
								<xsl:if test="/document/Params/ShowStats='ALL'">
									<xsl:attribute name="selected"/>
								</xsl:if>Toutes Statistiques </option>
						</select>
						</xsl:if>
						<table>
							<xsl:if test="/document/Params/ShowStats = 'VOLINE'">
								<tr>
									<td>
										<b>Statistiques :</b>
									</td>
									<td>pour le mois de : <input type="text" style="text-align:center;" size="14" name="DateREF" onBlur="verifdate('MainForm', 'DateREF');" maxlength="10" value="{/document/Params/DateREF}" onkeypress="return handleKeyPress(event);"/> - <a href="." onclick="PopCalendar('CalendarREF', 'DateREF'); return false;">
											<img border="0" alt="Choisissez une date de Référence" src="{$XMLC_PictosPath}ico_planning.gif"/>
										</a>
										<iframe border="0" frameborder="0" marginheight="0" marginwidth="0" id="CalendarREF" name="CalendarREF" scrolling="no" src="{$XMLC_Portal}blank.htm" style="position: absolute; display: none; z-index:1000;"/> - <a href="." onclick="goSubmit(); return false;">
											<img border="0" alt="afin d'afficher les statistiques" src="{$XMLC_PictosPath}ico_run.gif"/>
										</a>
									</td>
								</tr>
								<tr>
									<td/>
									<td>comparatif : <input type="hidden" name="vCompare" value="{/document/Params/vCompare}"/>
										<select id="CBCompare" style="width:200px" onchange="javascript: document.MainForm.vCompare.value=getObjectById('CBCompare').value;  goSubmit(); return false;">
											<option value="0">
												<xsl:if test="/document/Params/vCompare='' or /document/Params/vCompare='0'">
													<xsl:attribute name="selected"/>
												</xsl:if>Mois en cours / Mois précédent</option>
											<option value="1">
												<xsl:if test="/document/Params/vCompare='1'">
													<xsl:attribute name="selected"/>
												</xsl:if>Mois en cours / Mois (An-1)</option>
											<option value="2">
												<xsl:if test="/document/Params/vCompare='2'">
													<xsl:attribute name="selected"/>
												</xsl:if>Année en cours / (An-1)</option>
										</select>
									</td>
								</tr>
							</xsl:if>
						</table>
					</form>
				</xsl:if>
				<div id="zoneTOP">
					<xsl:if test="(/document/Params/XMLC_ShowInfo='' or /document/Params/XMLC_ShowInfo='0')">
						<xsl:if test="(/document/Params/ShowStats = 'ALL' or /document/Params/ShowStats = '')">
							<p>
								<b>Exports vers Annonceurs:</b>
								<table>
									<xsl:for-each select="MARQUES">
										<xsl:variable name="stStyle">
											<xsl:choose>
												<xsl:when test="position() mod 2 = 0">background: #f8f8f8; </xsl:when>
												<xsl:otherwise>background: #ffffff; </xsl:otherwise>
											</xsl:choose>
										</xsl:variable>
										<xsl:variable name="stValue">
											<xsl:choose>
												<xsl:when test="(FlagErr != '0')"> font-style:italic; color:red;</xsl:when>
											</xsl:choose>
										</xsl:variable>
										<xsl:variable name="vCode">
											<xsl:value-of select="Code"/>
										</xsl:variable>
										<xsl:variable name="nbA">
											<xsl:value-of select="count(/document/AnnonceursS/Annonceurs[CodeAnnonceur=$vCode])"/>
										</xsl:variable>
										<xsl:variable name="txtFileDiags">
											<xsl:call-template name="string-replace-all">
												<xsl:with-param name="text">
													<xsl:value-of select="NFileDiags"/>
	</xsl:with-param>
	<xsl:with-param name="replace">, </xsl:with-param>
												<xsl:with-param name="by">&#13;&#10;&#160;</xsl:with-param>
											</xsl:call-template>
										</xsl:variable>
										<tr style="{$stStyle}">
											<td width="100px" style="{$stValue}">
												<xsl:for-each select="/document/AnnonceursS/Annonceurs[CodeAnnonceur=$vCode]">
													<xsl:if test="InfoAnnonceur!=''">
														<xsl:variable name="vURL">
															<xsl:value-of select="URLAnnonceur"/>
															<xsl:if test="FiltreAnnonceur!=''">
																<xsl:value-of select="FiltreAnnonceur"/>
																<xsl:value-of select="/document/XMLC_WeekNumber"/>
															</xsl:if>
														</xsl:variable>
														<xsl:if test="$nbA&gt;1 and InfoAnnonceur!=LibelleAnnonceur">
															<xsl:value-of select="InfoAnnonceur"/>
														</xsl:if>
														<xsl:if test="$nbA=1 or InfoAnnonceur=LibelleAnnonceur">
															<a href="{$vURL}" target="_blank" style="{$stValue}">
																<xsl:value-of select="InfoAnnonceur"/>
															</a>
														</xsl:if>
													</xsl:if>
												</xsl:for-each>
											</td>
											<td width="600px" style="{$stValue}">
												<xsl:if test="$nbA&gt;1">
													<xsl:for-each select="/document/AnnonceursS/Annonceurs">
														<xsl:if test="CodeAnnonceur=$vCode and InfoAnnonceur!=LibelleAnnonceur">
															<xsl:variable name="vURL">
																<xsl:value-of select="URLAnnonceur"/>
																<xsl:if test="FiltreAnnonceur!=''">
																	<xsl:value-of select="FiltreAnnonceur"/>
																	<xsl:value-of select="/document/XMLC_WeekNumber"/>
																</xsl:if>
															</xsl:variable>
															<xsl:if test="$nbA&gt;1">  -  </xsl:if>
															<nobr>
																<a href="{$vURL}" target="_blank" style="{$stValue}">
																	<xsl:value-of select="LibelleAnnonceur"/>
																</a>
															</nobr>
														</xsl:if>
													</xsl:for-each>
													<br/>
												</xsl:if>
												<xsl:if test="(/document/XMLC_Params/XMLC_Administrator = '1') and (/document/XMLC_Params/XMLC_Authenticated != '0')">
													<xsl:for-each select="/document/AnnonceursS/Annonceurs">
														<xsl:if test="CodeAnnonceur=$vCode and EmailAnnonceur!=''">
															<xsl:variable name="vMail">
																<xsl:value-of select="EmailAnnonceur"/>
															</xsl:variable>
															<a href="mailto:{$vMail}">
																<xsl:value-of select="EmailAnnonceur"/>
															</a>
															<br/>
														</xsl:if>
													</xsl:for-each>
												</xsl:if>
												<xsl:value-of select="$txtFileDiags"/>
											</td>
										</tr>
									</xsl:for-each>
								</table>
							</p>
						</xsl:if>
						<xsl:if test="(/document/Params/RequestAddr='127.0.0.1') or ((/document/XMLC_Params/XMLC_Authenticated != '0') and (/document/Params/ShowStats = 'ALL' or /document/Params/ShowStats = 'VOLINE' ))">
							<p>
								<b>Statistiques Véhicules :</b>
								<table>
									<tr/>
									<tr style="background: #dddddd; ">
										<td align="right" width="100px"/>
										<td style="color:black" align="center" width="80px">dans la base</td>
										<td style="color:black" align="center">stock </td>
										<td style="color:black" align="center" width="80px">à diffuser</td>
										<td style="color:blue" align="center" width="80px">vente <xsl:value-of select="$vPar1"/>
										</td>
										<td style="color:black" align="center" width="80px">vente <xsl:value-of select="$vPar2"/>
										</td>
										<td style="color:blue" align="center">détails <xsl:value-of select="$vPar1"/>
										</td>
										<td style="color:black" align="center">détails <xsl:value-of select="$vPar2"/>
										</td>
									</tr>
									<xsl:for-each select="VOStat">
										<xsl:variable name="stBlue">color:blue</xsl:variable>
										<xsl:variable name="stBlack">
											<xsl:choose>
												<xsl:when test="isOK=0">color:red; </xsl:when>
												<xsl:otherwise>color:black;</xsl:otherwise>
											</xsl:choose>
										</xsl:variable>
										<xsl:variable name="stStyle">
											<xsl:if test="Site='Tous Sites'">background: #dddddd; </xsl:if>
											<xsl:if test="Site!='Tous Sites'">
												<xsl:choose>
													<xsl:when test="position() mod 2 = 0">background: #f8f8f8; </xsl:when>
													<xsl:otherwise>background: #ffffff; </xsl:otherwise>
												</xsl:choose>
											</xsl:if>
										</xsl:variable>
										<xsl:variable name="sTestIMa">
											<xsl:if test="not (substring(Site, string-length(Site)-1, 2) = IMa)">1</xsl:if>
											<xsl:if test="(substring(Site, string-length(Site)-1, 2) = IMa)">0</xsl:if>
										</xsl:variable>
										<xsl:if test="Site=''"/>
										<xsl:if test="Site!=''">
											<tr style="{$stStyle}">
												<td style="{$stBlack}">
													<xsl:value-of select="Site"/>
													<xsl:if test="IMa!='' and IMa!='xxVW' and ($sTestIMa='1')">-<xsl:value-of select="IMa"/>
													</xsl:if>
												</td>
												<td align="center" style="{$stBlack}">
													<xsl:if test="NB!='0'">
														<xsl:value-of select="NB"/>
														<xsl:if test="TypeVO='1'"> VO</xsl:if>
														<xsl:if test="TypeVO='2'"> VN</xsl:if>
														<xsl:if test="TypeVO='3'"> VD</xsl:if>
													</xsl:if>
												</td>
												<td align="center" style="{$stBlack}">
													<xsl:if test="VSVN!='0'">
														<xsl:value-of select="VSVN"/> VN, </xsl:if>
													<xsl:if test="VSVD!='0'">
														<xsl:value-of select="VSVD"/> VD, </xsl:if>
													<xsl:if test="VSPar!='0'">
														<xsl:value-of select="VSPar"/>p, </xsl:if>
													<xsl:if test="VSMar!='0'">
														<xsl:value-of select="VSMar"/>m, </xsl:if>
													<xsl:if test="VSVHU!='0'">
														<xsl:value-of select="VSVHU"/>v, </xsl:if>
													<xsl:if test="VSGrp!='0'">
														<xsl:value-of select="VSGrp"/>g, </xsl:if>
													<xsl:if test="VSAut!='0'">
														<xsl:value-of select="VSAut"/>a, </xsl:if>
												</td>
												<td align="center" style="{$stBlack}">
													<xsl:if test="VDif!='0'">
														<xsl:value-of select="VDif"/>
														<xsl:if test="TypeVO='1'"> VO</xsl:if>
														<xsl:if test="TypeVO='2'"> VD</xsl:if>
														<xsl:if test="TypeVO='3'"> VD</xsl:if>
													</xsl:if>
												</td>
												<td align="center" style="{$stBlue}">
													<xsl:if test="VOM!='0'">
														<xsl:value-of select="VOM"/>
														<xsl:if test="TypeVO='1'"> VO</xsl:if>
														<xsl:if test="TypeVO='2'"> VN</xsl:if>
														<xsl:if test="TypeVO='3'"> VD</xsl:if>
													</xsl:if>
												</td>
												<td align="center" style="{$stBlack}">
													<xsl:if test="VOMP!='0'">
														<xsl:value-of select="VOMP"/>
														<xsl:if test="TypeVO='1'"> VO</xsl:if>
														<xsl:if test="TypeVO='2'"> VN</xsl:if>
														<xsl:if test="TypeVO='3'"> VD</xsl:if>
													</xsl:if>
												</td>
												<td align="center" style="{$stBlue}">
													<xsl:if test="VOMPar!='0'">
														<xsl:value-of select="VOMPar"/>p, </xsl:if>
													<xsl:if test="VOMMar!='0'">
														<xsl:value-of select="VOMMar"/>m, </xsl:if>
													<xsl:if test="VOMVHU!='0'">
														<xsl:value-of select="VOMVHU"/>v, </xsl:if>
													<xsl:if test="VOMGrp!='0'">
														<xsl:value-of select="VOMGrp"/>g, </xsl:if>
													<xsl:if test="VOMAut!='0'">
														<xsl:value-of select="VOMAut"/>a, </xsl:if>
													<xsl:if test="VOMSlp!='0'">
														<xsl:value-of select="VOMSlp"/>slp, </xsl:if>
												</td>
												<td align="center" style="{$stBlack}">
													<xsl:if test="VOMParP!='0'">
														<xsl:value-of select="VOMParP"/>p, </xsl:if>
													<xsl:if test="VOMMarP!='0'">
														<xsl:value-of select="VOMMarP"/>m, </xsl:if>
													<xsl:if test="VOMVHUP!='0'">
														<xsl:value-of select="VOMVHUP"/>v, </xsl:if>
													<xsl:if test="VOMGrpP!='0' ">
														<xsl:value-of select="VOMGrpP"/>g, </xsl:if>
													<xsl:if test="VOMAutP!='0'">
														<xsl:value-of select="VOMAutP"/>a, </xsl:if>
													<xsl:if test="VOMSlpP!='0'">
														<xsl:value-of select="VOMSlpP"/>slp, </xsl:if>
												</td>
											</tr>
										</xsl:if>
									</xsl:for-each>
									<tr>
										<td colspan="8" align="right">p:Particuliers, m:Marchands, v:VHU, g:Groupe, a:Autres, slp:Sans Lien Profid</td>
									</tr>
								</table>
							</p>
						</xsl:if>
						<xsl:if test="(/document/Params/RequestAddr='127.0.0.1') or ((/document/XMLC_Params/XMLC_Authenticated != '0') and (/document/Params/ShowStats = 'ALL' or /document/Params/ShowStats = 'PROFID'))">
							<p>
								<b>Statistiques ProFid :</b>
								<table>
									<tr style="background: #dddddd; ">
										<td align="center" width="80px"/>
										<td style="color:black" align="center" width="80px">doublons Identité</td>
										<td style="color:black" align="center" width="80px">doublons Email</td>
										<td style="color:black" align="center" width="80px">doublons Mobile</td>
										<td style="color:black" align="center" width="80px">doublons Téléphone</td>
										<td style="color:black" align="center" width="80px">doublons Immatriculation</td>
										<td style="color:black" align="center" width="80px">doublons Châssis</td>
										<td style="color:blue" align="center" width="80px">Nb Fiches</td>
									</tr>
									<xsl:variable name="stBlue">color:blue</xsl:variable>
									<xsl:variable name="stBlack">color:black</xsl:variable>
									<xsl:for-each select="/document/StatsProFidS/StatsProFid">
										<xsl:variable name="stStyle">
											<xsl:if test="Site='Tous Sites'">background: #dddddd; </xsl:if>
											<xsl:if test="Site!='Tous Sites'">color:black;<xsl:choose>
													<xsl:when test="position() mod 2 = 0">background: #f8f8f8; </xsl:when>
													<xsl:otherwise>background: #ffffff; </xsl:otherwise>
												</xsl:choose>
											</xsl:if>
										</xsl:variable>
										<tr style="{$stStyle}">
											<td style="{$stBlack}">
												<xsl:value-of select="Site"/>
											</td>
											<td align="center" style="{$stBlack}">
												<xsl:value-of select="dIdentity"/>
											</td>
											<td align="center" style="{$stBlack}">
												<xsl:value-of select="dEmail"/>
											</td>
											<td align="center" style="{$stBlack}">
												<xsl:value-of select="dMobile"/>
											</td>
											<td align="center" style="{$stBlack}">
												<xsl:value-of select="dTelDom"/>
											</td>
											<td align="center" style="{$stBlack}">
												<xsl:value-of select="dVehicle"/>
											</td>
											<td align="center" style="{$stBlack}">
												<xsl:value-of select="dChassis"/>
											</td>
											<td align="center" style="{$stBlack}">
												<xsl:value-of select="cpt"/>
											</td>
										</tr>
									</xsl:for-each>
									<xsl:for-each select="/document/StatsProFidAllS/StatsProFidAll">
										<xsl:variable name="stStyle">
											<xsl:if test="Site='Tous Sites'">background: #dddddd; </xsl:if>
											<xsl:if test="Site!='Tous Sites'">color:black;<xsl:choose>
													<xsl:when test="position() mod 2 = 0">background: #f8f8f8; </xsl:when>
													<xsl:otherwise>background: #ffffff; </xsl:otherwise>
												</xsl:choose>
											</xsl:if>
										</xsl:variable>
										<tr style="{$stStyle}">
											<td style="{$stBlack}">
												<xsl:value-of select="Site"/>
											</td>
											<td align="center" style="{$stBlack}">
												<xsl:value-of select="dIdentity"/>
											</td>
											<td align="center" style="{$stBlack}">
												<xsl:value-of select="dEmail"/>
											</td>
											<td align="center" style="{$stBlack}">
												<xsl:value-of select="dMobile"/>
											</td>
											<td align="center" style="{$stBlack}">
												<xsl:value-of select="dTelDom"/>
											</td>
											<td align="center" style="{$stBlack}">
												<xsl:value-of select="dVehicle"/>
											</td>
											<td align="center" style="{$stBlack}">
												<xsl:value-of select="dChassis"/>
											</td>
											<td align="center" style="{$stBlack}">
												<xsl:value-of select="cpt"/>
											</td>
										</tr>
									</xsl:for-each>
								</table>
							</p>
						</xsl:if>
						<xsl:if test="(/document/Params/RequestAddr='127.0.0.1') or ((/document/XMLC_Params/XMLC_Authenticated != '0') and (/document/Params/ShowStats = 'ALL' or /document/Params/ShowStats = 'CARFID'))">
							<p>
								<b>Statistiques des impressions de carte assistance :</b>
								<table>
									<tr style="background: #dddddd; ">
										<td align="center" width="80px"/>
										<td style="color:black" align="center" width="80px">
											<xsl:if test="/document/CFSLabelS/CFSLabel[idTxt=1]=''">Période M1</xsl:if>
											<xsl:value-of select="/document/CFSLabelS/CFSLabel[idTxt=1]/InfoPeriod"/>
										</td>
										<td style="color:black" align="center" width="80px">
											<xsl:if test="/document/CFSLabelS/CFSLabel[idTxt=2]=''">Période M1</xsl:if>
											<xsl:value-of select="/document/CFSLabelS/CFSLabel[idTxt=2]/InfoPeriod"/>
										</td>
										<td style="color:black" align="center" width="80px">
											<xsl:if test="/document/CFSLabelS/CFSLabel[idTxt=3]=''">Période M1</xsl:if>
											<xsl:value-of select="/document/CFSLabelS/CFSLabel[idTxt=3]/InfoPeriod"/>
										</td>
										<td style="color:black" align="center" width="80px">
											<xsl:if test="/document/CFSLabelS/CFSLabel[idTxt=4]=''">Période S1</xsl:if>
											<xsl:value-of select="/document/CFSLabelS/CFSLabel[idTxt=4]/InfoPeriod"/>
										</td>
										<td style="color:black" align="center" width="80px">
											<xsl:if test="/document/CFSLabelS/CFSLabel[idTxt=5]=''">Période S1</xsl:if>
											<xsl:value-of select="/document/CFSLabelS/CFSLabel[idTxt=5]/InfoPeriod"/>
										</td>
										<td style="color:blUE" align="center" width="80px">
											<xsl:if test="/document/CFSLabelS/CFSLabel[idTxt=6]=''">Période S1</xsl:if>
											<xsl:value-of select="/document/CFSLabelS/CFSLabel[idTxt=6]/InfoPeriod"/>
										</td>
									</tr>
									<xsl:variable name="stBlue">color:blue</xsl:variable>
									<xsl:variable name="stBlack">color:black</xsl:variable>
									<xsl:variable name="stRed">color:red</xsl:variable>
									<xsl:for-each select="/document/StatsCarfidS/StatsCarfid">
										<xsl:variable name="stStyle">
											<xsl:if test="Site='Tous Sites'">background: #dddddd; </xsl:if>
											<xsl:if test="Site!='Tous Sites'">color:black;<xsl:choose>
													<xsl:when test="position() mod 2 = 0">background: #f8f8f8; </xsl:when>
													<xsl:otherwise>background: #ffffff; </xsl:otherwise>
												</xsl:choose>
											</xsl:if>
										</xsl:variable>
										<xsl:if test="(c1!='') or (c2!='') or (c3!='') or (a1!='') or (a2!='') or (a3!='') ">
											<tr style="{$stStyle}">
												<td style="{$stBlack}">
													<xsl:value-of select="Site"/>
												</td>
												<td align="center" style="{$stBlack}">
													<xsl:value-of select="c1"/>
													<xsl:if test="a1!=''">
														<xsl:if test="c1!=''">, </xsl:if>
														<span style="{$stRed}">
															<xsl:value-of select="a1"/>
														</span>
													</xsl:if>
												</td>
												<td align="center" style="{$stBlack}">
													<xsl:value-of select="c2"/>
													<xsl:if test="a2!=''">
														<xsl:if test="c2!=''">, </xsl:if>
														<span style="{$stRed}">
															<xsl:value-of select="a2"/>
														</span>
													</xsl:if>
												</td>
												<td align="center" style="{$stBlack}">
													<xsl:value-of select="c3"/>
													<xsl:if test="a3!=''">
														<xsl:if test="c3!=''">, </xsl:if>
														<span style="{$stRed}">
															<xsl:value-of select="a3"/>
														</span>
													</xsl:if>
												</td>
												<td align="center" style="{$stBlack}">
													<xsl:value-of select="c4"/>
													<xsl:if test="a4!=''">
														<xsl:if test="c4!=''">, </xsl:if>
														<span style="{$stRed}">
															<xsl:value-of select="a4"/>
														</span>
													</xsl:if>
												</td>
												<td align="center" style="{$stBlack}">
													<xsl:value-of select="c5"/>
													<xsl:if test="a5!=''">
														<xsl:if test="c5!=''">, </xsl:if>
														<span style="{$stRed}">
															<xsl:value-of select="a5"/>
														</span>
													</xsl:if>
												</td>
												<td align="center" style="{$stBlue}">
													<xsl:value-of select="c6"/>
													<xsl:if test="a6!=''">
														<xsl:if test="c6!=''">, </xsl:if>
														<span style="{$stRed}">
															<xsl:value-of select="a6"/>
														</span>
													</xsl:if>
												</td>
											</tr>
										</xsl:if>
									</xsl:for-each>
									<tr>
										<td colspan="7" align="right">m:Mois, s:Semaine, c:Carte VALAUTO assistance 365, ano: Anomalie contrôle filtre ou exclusion</td>
									</tr>
								</table>
								<b>Statistiques des captures d'impression:</b>
								<table>
									<tr style="background: #dddddd; ">
										<td align="center" width="80px"/>
										<td style="color:black" align="center" width="150px">
											<xsl:if test="/document/CFSLabelS/CFSLabel[idTxt=1]=''">Période M1</xsl:if>
											<xsl:value-of select="/document/CFSLabelS/CFSLabel[idTxt=1]/InfoPeriod"/>
										</td>
										<td style="color:black" align="center" width="150px">
											<xsl:if test="/document/CFSLabelS/CFSLabel[idTxt=2]=''">Période M1</xsl:if>
											<xsl:value-of select="/document/CFSLabelS/CFSLabel[idTxt=2]/InfoPeriod"/>
										</td>
										<td style="color:black" align="center" width="150px">
											<xsl:if test="/document/CFSLabelS/CFSLabel[idTxt=3]=''">Période M1</xsl:if>
											<xsl:value-of select="/document/CFSLabelS/CFSLabel[idTxt=3]/InfoPeriod"/>
										</td>
										<td style="color:black" align="center" width="150px">
											<xsl:if test="/document/CFSLabelS/CFSLabel[idTxt=4]=''">Période S1</xsl:if>
											<xsl:value-of select="/document/CFSLabelS/CFSLabel[idTxt=4]/InfoPeriod"/>
										</td>
										<td style="color:black" align="center" width="150px">
											<xsl:if test="/document/CFSLabelS/CFSLabel[idTxt=5]=''">Période S1</xsl:if>
											<xsl:value-of select="/document/CFSLabelS/CFSLabel[idTxt=5]/InfoPeriod"/>
										</td>
										<td style="color:blUE" align="center" width="150px">
											<xsl:if test="/document/CFSLabelS/CFSLabel[idTxt=6]=''">Période S1</xsl:if>
											<xsl:value-of select="/document/CFSLabelS/CFSLabel[idTxt=6]/InfoPeriod"/>
										</td>
									</tr>
									<xsl:variable name="stBlue">color:blue</xsl:variable>
									<xsl:variable name="stBlack">color:black</xsl:variable>
									<xsl:for-each select="/document/StatsCarfidS/StatsCarfid">
										<xsl:variable name="stStyle">
											<xsl:if test="Site='Tous Sites'">background: #dddddd; </xsl:if>
											<xsl:if test="Site!='Tous Sites'">color:black;<xsl:choose>
													<xsl:when test="position() mod 2 = 0">background: #f8f8f8; </xsl:when>
													<xsl:otherwise>background: #ffffff; </xsl:otherwise>
												</xsl:choose>
											</xsl:if>
										</xsl:variable>
										<xsl:if test="(v1!='') or (v2!='') or (v3!='') or (v4!='') or (v5!='') or (v6!='') ">
											<tr style="{$stStyle}">
												<td style="{$stBlack}">
													<xsl:value-of select="Site"/>
												</td>
												<td align="center" style="{$stBlack}">
													<xsl:value-of select="v1"/>
												</td>
												<td align="center" style="{$stBlack}">
													<xsl:value-of select="v2"/>
												</td>
												<td align="center" style="{$stBlack}">
													<xsl:value-of select="v3"/>
												</td>
												<td align="center" style="{$stBlack}">
													<xsl:value-of select="v4"/>
												</td>
												<td align="center" style="{$stBlack}">
													<xsl:value-of select="v5"/>
												</td>
												<td align="center" style="{$stBlue}">
													<xsl:value-of select="v6"/>
												</td>
											</tr>
										</xsl:if>
									</xsl:for-each>
									<tr>
										<td colspan="7" align="right">m:Mois, s:Semaine, f:Facture, n:aNnulation, v:aVoir, d:Duplicata</td>
									</tr>
								</table>
							</p>
						</xsl:if>
					</xsl:if>
					<p>
						<b>V.O.Line - Version <xsl:value-of select="/document/XMLC_DLLVersion"/> - IP : <xsl:value-of select="/document/Params/RequestAddr"/>
							<br>B.L.C. - Blue Line Company - Laurent LEBLEU - +33 6 86 28 80 07</br>
						</b>
					</p>
				</div>
				<xsl:call-template name="xslc:PoweredBy"/>
			</xsl:with-param>
		</xsl:call-template>
	</xsl:template>
</xsl:stylesheet>
