<?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">
	<xsl:import href="../../xslc.xsl"/>
	<xsl:import href="../../Common.xsl"/>
	<xsl:template match="/">
		<xsl:apply-templates select="document"/>
	</xsl:template>
	<xsl:template match="document">
		<xsl:param name="RecordCount" select="@ListFactS/RowCount"/>
		<xsl:call-template name="xslc:Page">
			<xsl:with-param name="DisplayTabControl">0</xsl:with-param>
			<xsl:with-param name="BodyAttributes">
				<Attributes onload="checkTopLevel();"/>
			</xsl:with-param>
			<xsl:with-param name="DisplayToolbar">
				<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="DisplayTabs">0</xsl:with-param>
			<xsl:with-param name="DisplayActionMenu">
				<xsl:if test="/document/OutParams/AmMode='0'">2</xsl:if>
				<xsl:if test="/document/OutParams/AmMode!='0'">1</xsl:if>
			</xsl:with-param>
			<xsl:with-param name="ActionMenu">
				<xsl:call-template name="xslc:VOActionPanelUser">
					<xsl:with-param name="Expanded">1</xsl:with-param>
					<xsl:with-param name="Dark">1</xsl:with-param>
					<xsl:with-param name="Name">FiltAffichage</xsl:with-param>
					<xsl:with-param name="Title">
						<xsl:value-of select="/document/ListFiltersS/ListFilters[idAffichage=/document/OutParams/AffSel]/FilterName"/>
					</xsl:with-param>
					<xsl:with-param name="TitleActionReset">
						<!--Filtre sur période seulement si "Tous VO" ou "Véhicules Livrés"-->
						<xsl:if test="/document/OutParams/AffDate='1' or (/document/OutParams/AffDest>=100 and /document/ListFiltersS/ListFilters[idAffichage=/document/OutParams/AffSel]/AttrDest='1')">
							<xsl:if test="/document/OutParams/CFDeb!='' or /document/OutParams/CFFin!='' or /document/OutParams/AffDest>=100">javascript: SetField('MainForm', 'CFFin', ''); SetField('MainForm', 'CFDeb', ''); SetField('MainForm', 'TypeAffich3',<xsl:value-of select="/document/OutParams/AffSel"/>); apLastValue = ''; goSubmit(); return false;</xsl:if>
						</xsl:if>
					</xsl:with-param>
					<xsl:with-param name="TitleActionResetAll">
						<!--il faut trouver le moyen de détecter un filtre existant...-->
						<xsl:if test="/document/OutParams/SITE!='' ">javascript: goAndSubmit('TypeAffich3','reset'); return false;</xsl:if>
					</xsl:with-param>
					<xsl:with-param name="TitleActionUser">
						<xsl:if test="/document/SelVendeurS/SelVendeur/AbbrVendeur!='' and /document/OutParams/AffSel&lt;20">javascript: goAndSubmit('TypeAffich3','vendeur'); return false;</xsl:if>
					</xsl:with-param>
					<xsl:with-param name="ImageUser">
						<xsl:if test="/document/OutParams/AffSel&lt;20">
							<xsl:if test="/document/OutParams/AffVendeur=0">goactionuser</xsl:if>
							<xsl:if test="/document/OutParams/AffVendeur!=0">goactionall</xsl:if>
						</xsl:if>
					</xsl:with-param>
					<xsl:with-param name="Content">
						<form name="idzDateForm">
							<table>
								<tr>
									<td colspan="2" align="right" style="font-size:10px">Spécifiez les dates : <a href="." onclick="SetField('MainForm', 'CFFin', GetField('idzDateForm', 'DATEFieldFin')); 
SetField('MainForm', 'CFDeb', GetField('idzDateForm', 'DATEFieldDeb')); 
goAndSubmit('TypeAffich3','slider'); return false;">
											<img border="0" alt="appliquez le filtre selon la date de document" src="{$XMLC_PictosPath}ico_run.gif"/>
										</a>
									</td>
								</tr>
								<tr id="idzDateInputDeb" style="display: block;">
									<td width="45px" align="right">début :</td>
									<td>
										<input type="text" style="text-align:center;" size="12" name="DATEFieldDeb" onBlur="verifdate('idzDateForm', 'DATEFieldDeb');" maxlength="10" value="{/document/OutParams/CFDeb}" onkeypress="return handleKeyPress(event);"/> - <a href="." onclick="PopCalendar('CalendarDeb', 'DATEFieldDeb', 'idzDateForm'); return false;">
											<img border="0" alt="Choisissez une date de Début" src="{$XMLC_PictosPath}ico_planning.gif"/>
										</a>
										<iframe border="0" frameborder="0" marginheight="0" marginwidth="0" id="CalendarDeb" name="CalendarDeb" scrolling="no" src="{$XMLC_Portal}blank.htm" style="position: absolute; display: none; z-index:1000;"/>
									</td>
								</tr>
								<tr id="idzDateInputFin" style="display: block;">
									<td width="45px" align="right"> fin :</td>
									<td>
										<input type="text" style="text-align:center;" size="12" name="DATEFieldFin" onBlur="verifdate('idzDateForm', 'DATEFieldFin');" maxlength="10" value="{/document/OutParams/CFFin}" onkeypress="return handleKeyPress(event);"/> - <a href="." onclick="PopCalendar('CalendarFin', 'DATEFieldFin', 'idzDateForm'); return false;">
											<img border="0" alt="Choisissez une date de Fin" src="{$XMLC_PictosPath}ico_planning.gif"/>
										</a>
										<iframe border="0" frameborder="0" marginheight="0" marginwidth="0" id="CalendarFin" name="CalendarFin" scrolling="no" src="{$XMLC_Portal}blank.htm" style="position: absolute; display: none; z-index:1000;"/>
									</td>
								</tr>
							</table>
						</form>
					</xsl:with-param>
				</xsl:call-template>
				<xsl:call-template name="xslc:VOActionPanel">
					<xsl:with-param name="Expanded">1</xsl:with-param>
					<xsl:with-param name="Dark">1</xsl:with-param>
					<xsl:with-param name="Name">FiltSite</xsl:with-param>
					<xsl:with-param name="Title">
						<xsl:if test="/document/OutParams/SITE=''">Site</xsl:if>
						<xsl:if test="/document/OutParams/SITE!=''">
							<xsl:value-of select="/document/VOutParams/lSiteS/nbSite"/>
						</xsl:if>
					</xsl:with-param>
					<xsl:with-param name="TitleActionReset">
						<xsl:if test="/document/OutParams/SITE!=''">javascript: goAndSubmit('SITE3','top'); return false;</xsl:if>
					</xsl:with-param>
					<xsl:with-param name="Content">
						<table cellpadding="2" cellspacing="0">
							<xsl:for-each select="/document/ListSITES/ListSITE">
								<xsl:sort select="Site"/>
								<xsl:variable name="apInfo">
									<xsl:value-of select="Site"/>
								</xsl:variable>
								<xsl:variable name="apSelect">
									<xsl:if test="Selected='1'">apRowSelected</xsl:if>
									<xsl:if test="Selected!='1'">apLink</xsl:if>
								</xsl:variable>
								<xsl:variable name="apOver">
									<xsl:if test="Selected='1'">ap2RowSelected</xsl:if>
									<xsl:if test="Selected!='1'">apRowSelected</xsl:if>
								</xsl:variable>
								<xsl:variable name="apAttr">
									<xsl:if test="Selected='1'">color:#3f3dfd; </xsl:if>
									<xsl:if test="Selected!='1'">color:#145aa2; </xsl:if>
								</xsl:variable>
								<tr>
									<td class="{$apSelect}" onmouseover="oldClass=this.className; this.className='{$apOver}';" onmouseout="this.className=oldClass;" onclick="javascript: goAndSubmit('SITE3','{$apInfo}'); return false;" style="margin-left:8px; {$apAttr} width:200px; ">
										<xsl:if test="Selected='1'">
											<img src="{$XMLC_PictosPath}ico_run.gif"/> - </xsl:if>
										<xsl:value-of select="Site"/>
									</td>
								</tr>
							</xsl:for-each>
						</table>
					</xsl:with-param>
				</xsl:call-template>
			</xsl:with-param>
			<xsl:with-param name="Head">
				<link rel="shortcut icon" type="image/ico" href="{$XMLC_Portal}faviconP.ico"/>
				<script text="text/javascript" src="{$XMLC_Portal}js/infobulle.js"/>
				<style type="text/css">.infobulle{ 
color: #145aa2; 
position: absolute; 
visibility : hidden; 
border: 1px solid #B1DBF3; 
padding: 10px; 
font-family: Comic sans MS; 
align: center; 
font-size: 9pt; 
background-color: #dbeaf5; 
} </style>
				<META HTTP-EQUIV="imagetoolbar" CONTENT="no"/>
				<script language="javascript">
					<![CDATA[// 
// Afficher la fenêtre popup pour le calendrier XMLC_Calendar
// 
function PopCalendar(PopID, FieldName, FormName) {
  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 += '&XMLC_PopID=' + PopID;
      CalendarURL += '&XMLC_HTMLForm=' + FormName;
      CalendarURL += '&XMLC_DateValue=' + obj.value;
      Pop.src = CalendarURL;
    }
  }
}

// 
// Vérification d'une date
// 
function verifdate(FormID, FieldName) {
    var datetest = GetField(FormID, FieldName);
    var format = /^(\d{1,2}\/){1,2}\d{1,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 !!!
        if (parseInt(date_temp[2])<100) {
          date_temp[2] = parseInt(date_temp[2]) + (parseInt(date_temp[2]) < 50) ? 2000 : 1900;
        }
        adate = new Date(date_temp[2], date_temp[1], date_temp[0]);
        if (adate.getDate()!=date_temp[0] || adate.getMonth()!=date_temp[1] || adate.getFullYear()!=date_temp[2]) {
            return false;
        } else {
            return true;
        }
    }
}]]>
					<![CDATA[var apLastValue='x';
      apNameImage='';
function VOapShowHide_dark(ID) {
  if (apLastValue!='') {
        apShowHide_dark(ID); 
    }
  apLastValue='x';
}
function VOapShowHide(ID) {
  if (apLastValue!='') {
        apShowHide(ID); 
    }
  apLastValue='x';
}
function VOShowHideActionMenu() {
  ShowHideActionMenu(); 
  goSubmit();
}

function VOapHeaderOver_dark(ID) {
  var func = getObjectById;
	func('apHeaderLabel'+ID).className = 'apHeader_over_dark';
	apHeaderImageID = func('apHeaderImage'+ID);
	apContentID = func('apContent'+ID);
	imageSource = 'collapse_over_dark';
	if (apContentID.style.display == 'none')
		imageSource = 'expand_over_dark';
	apHeaderImageID.src = XMLC_SkinPath+'actionpanel/'+imageSource+'.gif';
	apNameImage = '';
	obj = func('apHeaderImageAction'+ID);
	if (obj != null)
	  apNameImage = obj.src;
	if (apNameImage!='')
	  func('apHeaderImageAction'+ID).src = apNameImage.replace( '.gif', '_over.gif');
}

function VOapHeaderOut_dark(ID) {
  var func = getObjectById;
	func('apHeaderLabel'+ID).className = 'apHeader_dark';
	apHeaderImageID = func('apHeaderImage'+ID);
	apContentID = func('apContent'+ID);
	imageSource = 'collapse_dark';
	if (apContentID.style.display == 'none')
		imageSource = 'expand_dark';
	apHeaderImageID.src = XMLC_SkinPath+'actionpanel/'+imageSource+'.gif';
	if (apNameImage!='')
	  func('apHeaderImageAction'+ID).src = apNameImage;
}
]]>
				</script>
				<script language="javascript">
					<![CDATA[
function checkTopLevel() {
  if ((null == top) || (top == self))
   return;
alert('{$RefreshURL}');
alert(']]>{$RefreshURL}<xsl:value-of select="/document/XMLC_Params/XMLC_ScriptName"/>
					<xsl:choose>
						<xsl:when test="$XMLC_UseXMLC_Action != '1'">/</xsl:when>
						<xsl:otherwise>?XMLC_Action=</xsl:otherwise>
					</xsl:choose>
					<xsl:value-of select="/document/XMLC_Params/XMLC_Action"/>
					<xsl:if test="/document/XMLC_Params/XMLC_InputParams!=''">
						<xsl:choose>
							<xsl:when test="$XMLC_UseXMLC_Action = '1'">&amp;</xsl:when>
							<xsl:otherwise>?</xsl:otherwise>
						</xsl:choose>
						<xsl:value-of select="/document/XMLC_Params/XMLC_InputParams"/>
					</xsl:if>');
//  top.location.href = location.href;
} // checkTopLevel
</script>
				<script language="javascript">var keyPress = '0';

function getRapport(xFileCmd) {
  if (keyPress == '17') {
    keyPress = '0';
    xFileCmd=xFileCmd.replace("/action/","ReportPDF");
};
  if (keyPress != '17'){
    xFileCmd=xFileCmd.replace("/action/?rptSelect=","CarFidShowFact?cfTitle="+getObjectById('zoneParams').innerText+'&amp;');
    xFileCmd=xFileCmd.replace(";3d;","=");
};
  window.open(xFileCmd, '_blank');
}

function getRapportCA(xFileCmd) {
  if (keyPress == '17') {
keyPress = '0';
xFileCmd=xFileCmd.replace("CA21 - Récapitulatif","CA01 - Détails");
xFileCmd=xFileCmd.replace("CA22 - Récapitulatif","CA02 - Détails");
xFileCmd=xFileCmd.replace("CA23 - Récapitulatif","CA03 - Détails");
};
  window.open(xFileCmd, '_blank');
}

function goHisto(xFileCmd) {
  if (keyPress == '17') {
keyPress = '0';
};
  xFileCmd=xFileCmd.replace("/pRecap","");
  window.open(xFileCmd, '_blank');
}


function getKeyDown(e){
  keyPress = (document.all)?event.keyCode:e.keyCode;
}
document.onkeydown=getKeyDown;
</script>
				<script language="javascript">
					<![CDATA[// ==========================================================================
// Afficher la fenêtre popup pour l'affichage d'une centaine
// ==========================================================================
var flagMoved;
function PopStatsDisp(PopID, btnID,vParam,p1,p2) {
  if (popObj = getObjectById(PopID)) {
    if (btnObj = getObjectById(btnID)) {
      ShowHide(PopID, 'WIDTH', 350, 'HEIGHT', 250); 
      popObj.style.top = GetObjectPosY(btnID)-15;
      popObj.style.left = GetObjectPosX(btnID)+45;
      popObj.src = XMLC_BaseHRef+'CarfidStatsDisp?idDocs='+vParam+'&MinDocs='+p1+'&MaxDocs='+p2;
    }
  }
}

]]>
				</script>
				<script language="javascript">
					<![CDATA[function handleNumberKeyPress(e) {
  var keyCode = GetEventKeyCode(e);
  if (keyCode != 13)
    return true;
  return false;
}

function onKeyTestCR(e) {
  var aKey = window.event ? e.keyCode : e.which;
  if (aKey == 13) {
    goSubmit(); 
    }
}

]]>
					<![CDATA[// ==========================================================================
// 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', 435); 
      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', 530, 'HEIGHT', 550); 
      if (flagMoved!=-1) 
       { 
        flagMoved=-1; 
        popObj.style.top = 15;
        popObj.style.left = GetObjectPosX(btnID)-535;
        popObj.src = XMLC_BaseHRef+'SelReport?typeVO=11';
       };
    }
  }
}

]]>
				</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[// ==========================================================================
// Afficher la fenêtre popup pour le login
// ==========================================================================
function PopFormLogin(PopID) {
var posScroll =f_scrollTop();
   vidPaneID = document.getElementById('vdivFormLogin'); 
   vidPaneID.style.top=155;
   vidPaneID.style.left='55px';                    
   vidPaneID.style.align = 'center';
  ShowHideForm(vidPaneID);
  if (popObj = getObjectById(PopID)) {
     var posScroll =f_scrollTop();
      ShowHide(PopID, 'WIDTH', 650, 'HEIGHT', 480); 
      popObj.style.top = 15; 
      popObj.style.left = 0; 
      popObj.style.align = 'center';
      popObj.src = XMLC_BaseHRef+'XMLC_FormLogin';
  }
}]]>
				</script>
				<script language="javascript">
					<![CDATA[// ==========================================================================
// Afficher la fenêtre popup pour la saisie des infos ProFid
// ==========================================================================
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 ProFid
// ==========================================================================
function lPopFormAxVO(PopID, idClient) {
  args='0';
  evt = event;
 if (evt.shiftKey)
    args='1';
  if (popObj = getObjectById(PopID)) {
      popObj.src = XMLC_BaseHRef+'FormAxVO?idClient='+idClient+'&idVersion='+args;
  }
}]]>
				</script>
				<script language="javascript">
					<![CDATA[   function moveHandler(e){
      if (e == null) { e = window.event } 
      if (e.button<=1&&dragOK){
         savedTarget.style.left=e.clientX-dragXoffset+'px';
         savedTarget.style.top=e.clientY-dragYoffset+'px';
         return false;
      }
   }

   function cleanup(e) {
      document.onmousemove=null;
      document.onmouseup=null;
      savedTarget.style.cursor=orgCursor;
      dragOK=false;
   }]]>
				</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=='BoxFrameLC') || (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[// 
// Valider les paramètres d'appel et lancement Submit
// 
function goSubmit() {
  SetField('MainForm', 'AmMode',  (getObjectById('xslcActionMenu').style.display == 'none') ? '0' : '1');
  document.MainForm.submit(); 
  return false;
}
function goAndSubmit(objID, xValue) {
  if ((objID == 'ACHOIX') || (objID == 'AVALUE')) {
      if ((objID == 'ACHOIX') && (GetField('MainForm', objID)==xValue)) xValue ='';  
      SetField('MainForm', 'AmInfo', 'ACHOIX');
      SetField('MainForm', objID, xValue);  
      apLastValue = 'x';  
      goSubmit();
      return;
    }

 SetField('MainForm', 'AmInfo', objID);

  if (xValue == 'top') {
    apLastValue = '';
    SetField('MainForm', objID, '');  
    }
  if (xValue == 'vendeur') {
    apLastValue = '';
    vAff=parseInt(GetField('MainForm', 'TypeAffich3'));
    if (vAff>=100000)
      vAff = vAff % 100000;
    else
      vAff = vAff + 100000;
    if (isNaN(vAff))
      vAff = 0;
    SetField('MainForm', 'TypeAffich3', vAff);
    }
  if (xValue == 'reset'){
    apLastValue = '';
    SetField('MainForm', 'SITE3', '');
    SetField('MainForm', 'CFDeb', '');    SetField('MainForm', 'CFFin', ''); 
//    SetField('MainForm', 'ACHOIX', '0');    SetField('MainForm', 'AVALUE', ''); 
    vAff=parseInt(GetField('MainForm', 'TypeAffich3')) % 100;
    SetField('MainForm', 'TypeAffich3', vAff);
    }
  if ((xValue != 'slider') && (xValue != 'reset') && (xValue != 'top') && (xValue != 'vendeur')) {
    aPar=GetField('MainForm', objID);
    if ((aPar =='') || (objID == 'TypeAffich3') || (objID == 'cVENDEUR'))
       SetField('MainForm', objID, xValue); 
    else {
       if (aPar.search(xValue)==-1) SetField('MainForm', objID, aPar + ';' + xValue);  
       if (aPar.search(xValue)!=-1)  {
           aPar = aPar.replace(';'+xValue, '');
           aPar = aPar.replace(xValue+';', '');
           aPar = aPar.replace(xValue, '');
           SetField('MainForm', objID, aPar);  
           }
       }
    }
  goSubmit();
}]]>
				</script>
			</xsl:with-param>
			<xsl:with-param name="Title">CarFid I - <xsl:call-template name="CarfidTitle"/>
			</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">CarFid</xsl:with-param>
			<xsl:with-param name="Tabs">
				<Tab Name="ListVO">
					<a href="{/document/Aliases/bdVODLL}ListVO?">
						<img align="absmiddle" border="0" src="{$XMLC_PictosPath}ico_service.gif"/> Liste VO</a>
				</Tab>
				<Tab Name="ListVN">
					<a href="{/document/Aliases/bdVODLL}ListVN?">
						<img align="absmiddle" border="0" src="{$XMLC_PictosPath}ico_service.gif"/> Liste VN</a>
				</Tab>
				<Tab Name="About">
					<a href="{/document/Aliases/bdVODLL}About">
						<img align="absmiddle" border="0" src="{$XMLC_PictosPath}button_channels.gif"/>A propos</a>
				</Tab>
			</xsl:with-param>
			<xsl:with-param name="Body">
				<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>
				<form action="{/document/Aliases/bdVODLL}CarFidStats" name="MainForm" method="post">
					<input type="hidden" name="SITE3" value="{/document/OutParams/SITE}"/>
					<input type="hidden" name="CFDeb" value="{/document/OutParams/CFDeb}"/>
					<input type="hidden" name="CFFin" value="{/document/OutParams/CFFin}"/>
				</form>
				<div id="vdivFormVO" class="BoxFrameVN" 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 Client<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:call-template name="xslc:ApplicationMessages"/>
				<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:call-template name="VOZoneTab">
					<xsl:with-param name="nService">CarFid</xsl:with-param>
				</xsl:call-template>
				<div id="zoneTop">Statistiques CarFid du <xsl:value-of select="/document/OutParams/CFDeb"/> au <xsl:value-of select="/document/OutParams/CFFin"/>
					<xsl:if test="/document/OutParams/SITE!=''"> - Site : <xsl:value-of select="/document/VOutParams/lSiteS/oSite"/>
					</xsl:if>
				</div>
				<xsl:apply-templates select="GetStatsS"/>
				<xsl:call-template name="xslc:PoweredBy"/>
			</xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="CarfidTitle">
		<xsl:param name="vParamTextReport"/>
		<xsl:if test="(/document/OutParams/AffSel&lt;20) and (/document/SelVendeurS/SelVendeur/AbbrVendeur!='') and(/document/OutParams/AffVendeur!=0)">
			<xsl:value-of select="/document/SelVendeurS/SelVendeur/cIdent"/> - </xsl:if>
		<xsl:if test="/document/OutParams/nClient!=''">Documents pour n° Client : <xsl:value-of select="/document/OutParams/nClient"/>
		</xsl:if>
		<xsl:if test="/document/OutParams/nClient=''">
			<xsl:value-of select="/document/ListFiltersS/ListFilters[idAffichage=/document/OutParams/AffSel]/FilterName"/>
			<xsl:value-of select="$vParamTextReport"/>
			<xsl:if test="(/document/OutParams/AffDest&gt;=100) and not (/document/ListFiltersS/ListFilters[idAffichage=/document/OutParams/AffSel]/AttrDest='0') "> - <xsl:value-of select="/document/ListFiltersS/ListFilters[AttrDest=/document/OutParams/AffDest]/FilterName"/>
			</xsl:if>
		</xsl:if>
		<xsl:if test="/document/OutParams/AffDate!='0'">
			<xsl:if test="/document/OutParams/AffDate='1' and false"> relances </xsl:if>
			<xsl:if test="/document/OutParams/CFDeb!='' or /document/OutParams/CFFin!=''">
				<xsl:if test="/document/OutParams/CFDeb!='' and /document/OutParams/CFFin=''"> après le <xsl:value-of select="/document/OutParams/CFDeb"/>
				</xsl:if>
				<xsl:if test="/document/OutParams/CFDeb='' and /document/OutParams/CFFin!=''"> avant le <xsl:value-of select="/document/OutParams/CFFin"/>
				</xsl:if>
				<xsl:if test="/document/OutParams/CFDeb!='' and /document/OutParams/CFFin!=''"> du <xsl:value-of select="/document/OutParams/CFDeb"/>
					<xsl:if test="/document/OutParams/CFDeb!=/document/OutParams/CFFin"> au <xsl:value-of select="/document/OutParams/CFFin"/>
					</xsl:if>
				</xsl:if>
			</xsl:if>
		</xsl:if>
		<xsl:if test="/document/OutParams/SITE!=''"> - Site : <xsl:value-of select="/document/VOutParams/lSiteS/oSite"/>
		</xsl:if>
		<xsl:if test="/document/OutParams/CATEGORIE!=''"> - Catégorie : <xsl:value-of select="/document/VOutParams/lCategorieS/oCategorie"/>
		</xsl:if>
		<xsl:if test="/document/OutParams/ATELIER!=''"> - Atelier/Magasin : <xsl:value-of select="/document/VOutParams/lAteMagS/oAteMag"/>
		</xsl:if>
		<xsl:if test="/document/OutParams/cVENDEUR!=''"> - <xsl:value-of select="/document/ListVENDEURS/ListVENDEUR[idCom=/document/OutParams/cVENDEUR]/nVendeur"/>
		</xsl:if>
	</xsl:template>
	<!---->
	<xsl:template match="GetStatsS">
		<iframe border="1" frameborder="1" marginheight="0" marginwidth="0" id="StatsDisp" name="StatsDisp" scrolling="no" src="{$XMLC_Portal}blank.htm" style="position: absolute; display: none; z-index:1000;"/>
		<table width="720px" nowrap="nowrap" style="border-width:1px;border-color:#c8c8c8;">
			<tr style="background: #c8c8c8;">
				<td width="80px">système</td>
				<td align="center" width="60px">n° début</td>
				<td align="center" width="60px">n° fin</td>
				<td align="center" width="60px">nb</td>
				<td align="center" width="60px">filtre</td>
				<td align="center" width="100px">statut</td>
				<td align="center" width="250px">infos doublons</td>
				<td/>
			</tr>
			<xsl:apply-templates select="GetStats"/>
		</table>
	</xsl:template>
	<xsl:template match="GetStats">
		<xsl:variable name="vidDocs">
			<xsl:value-of select="idDocs"/>
		</xsl:variable>
		<xsl:variable name="vidRow">row<xsl:value-of select="idDocs"/>
		</xsl:variable>
		<xsl:variable name="vid1">
			<xsl:value-of select="MinDocs"/>
		</xsl:variable>
		<xsl:variable name="vid2">
			<xsl:value-of select="MaxDocs"/>
		</xsl:variable>
		<xsl:variable name="clValue">
			<xsl:choose>
				<xsl:when test="TypeDMS=''">clRowHeader</xsl:when>
				<xsl:otherwise>
					<xsl:choose>
						<xsl:when test="position() mod 2 = 1">clRowLight</xsl:when>
						<xsl:otherwise>clRowDark</xsl:otherwise>
					</xsl:choose>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<tr class="{$clValue}">
			<td>
				<xsl:if test="TypeDMS='1'">carbase</xsl:if>
				<xsl:if test="TypeDMS='2'">dcs</xsl:if>
			</td>
			<xsl:choose>
				<xsl:when test="TypeDMS=''">
					<td align="center" colspan="2">
						<xsl:value-of select="MaxDocs"/>
					</td>
					<td align="center">
						<xsl:value-of select="cptDocs"/>
					</td>
				</xsl:when>
				<xsl:otherwise>
					<td align="center">
						<xsl:value-of select="MinDocs"/>
					</td>
					<td align="center">
						<xsl:value-of select="MaxDocs"/>
					</td>
					<td align="center">
						<a id="{$vidRow}" name="{$vidRow}" href="." onclick="PopStatsDisp('StatsDisp', '{$vidRow}', '{$vidDocs}', '{$vid1}', '{$vid2}'); return false;">
							<xsl:value-of select="cptDocs"/>
						</a>
					</td>
				</xsl:otherwise>
			</xsl:choose>
			<td align="center">
				<xsl:if test="cptInfo!='0'">
					<xsl:value-of select="cptInfo"/>
				</xsl:if>
			</td>
			<td align="center">
				<xsl:if test="cptOK!='0'">
					<xsl:value-of select="cptOK"/>
				</xsl:if>
			</td>
			<td align="center">
				<xsl:value-of select="cptDbl"/>
			</td>
			<td/>
		</tr>
	</xsl:template>
</xsl:stylesheet>
