<?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:call-template name="xslc:Page">
			<xsl:with-param name="BodyAttributes">
				<Attributes style="background:url({$XMLC_Portal}Pictos/backframe.gif) repeat-x top left;"/>
			</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="Body">
				<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="SelVendeur">
					<xsl:value-of select="/document/OutParams/VENDEURSR"/>
				</xsl:variable>
				<xsl:variable name="lcase">abcdefghijklmnopqrstuvwxyz</xsl:variable>
				<xsl:variable name="ucase">ABCDEFGHIJKLMNOPQRSTUVWXYZ</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>
				<form name="MainForm" method="POST" action="{/document/Aliases/FibronetDLL}ReportPDF" onkeypress="return handleKeyPress(event);">
					<input type="hidden" name="rptname" value="{/document/OutParams/rptname}"/>
					<input type="hidden" name="rptselect"/>
					<input type="hidden" name="rptformat"/>
					<input type="hidden" name="SITESR" value="{/document/OutParams/SITESR}"/>
					<input type="hidden" name="EXPOSR" value="{/document/OutParams/EXPOSR}"/>
					<input type="hidden" name="MARQUESR" value="{/document/OutParams/MARQUESR}"/>
					<input type="hidden" name="MODELESR" value="{/document/OutParams/MODELESR}"/>
					<input type="hidden" name="VENDEURSR" value="{/document/OutParams/VENDEURSR}"/>
					<input type="hidden" name="RTYPESR" value="{/document/OutParams/RTYPESR}"/>
					<input type="hidden" name="FINANCEMENT" value="0"/>
					<input type="hidden" name="FiltreZ" value="0"/>
					<input type="hidden" name="SOCFINACHAT" value="0"/>
					<input type="hidden" name="PPROFIDSR" value="{/document/OutParams/PPROFIDSR}"/>
					<input type="hidden" name="CARECAPSR" value="{/document/OutParams/CARECAPSR}"/>
					<input type="hidden" name="TypeIdent" value="0"/>
					<input type="hidden" name="vMail"/>
					<input type="hidden" name="vMobile"/>
					<input type="hidden" name="idImport" value="0"/>
					<input type="hidden" name="IDCOMSR" value="{/document/OutParams/IDCOMSR}"/>
					<input type="hidden" name="STATUTSR" value="{/document/OutParams/STATUTSR}"/>
					<input type="hidden" name="PERIODESR" value="{/document/OutParams/PERIODESR}"/>
					<input type="hidden" name="ORDERSR" value="{/document/OutParams/ORDERSR}"/>
					<div id="zoneTOP">
						<table>
							<tr>
								<td align="center" colspan="2" onkeypress="return handleKeyPress(event);">
									<select id="CBSelReport" name="CBSelReport" style="width:280px" onkeypress="return handleKeyPress(event);" onchange="javascript: ShowValue(); return false;">
										<xsl:for-each select="/document/document/ReportListS/ReportList">
											<xsl:if test="idAff!='-2'">
												<option value="{idAff}">
													<xsl:if test="idAff='-1'">
														<xsl:attribute name="style">color:#A0A0A0</xsl:attribute>
													</xsl:if>
													<xsl:if test="/document/OutParams/rptname=ReportName">
														<xsl:attribute name="selected"/>
													</xsl:if>
													<xsl:value-of select="ReportName"/>
												</option>
											</xsl:if>
										</xsl:for-each>
									</select>
								</td>
							</tr>
							<tr style="height:150px;">
								<td valign="bottom">
									<table>
										<tr id="idzNbEx" style="display: none;">
											<td width="225px" colspan="2" align="right">Sélectionnez le nombre d'exemplaires lors du choix d'imprimante...</td>
										</tr>
										<tr id="idzRType" style="display: none;">
											<td width="100px" align="right">Relances :</td>
											<td>
												<select id="CBRType" name="CBRType" onchange="javascript: document.MainForm.RTYPESR.value=getObject('CBRType').value; return false;" style="width:125px" onkeypress="return handleKeyPress(event);">
													<option value="0">
														<xsl:if test="/document/OutParams/RTYPESR='' or /document/OutParams/RTYPESR='0'">
															<xsl:attribute name="selected"/>
														</xsl:if>Toutes Relances</option>
													<option value="1">
														<xsl:if test="/document/OutParams/RTYPESR='1'">
															<xsl:attribute name="selected"/>
														</xsl:if>Rel. Commerciales ou SAV</option>
													<option value="2">
														<xsl:if test="/document/OutParams/RTYPESR='2'">
															<xsl:attribute name="selected"/>
														</xsl:if>Relances Entretien</option>
												</select>
											</td>
										</tr>
										<tr id="idzTypeVO" style="display: none;">
											<td width="100px" align="right">VN ou VO:</td>
											<td>
												<select id="CBTypeVO" name="CBTypeVO" style="width:125px" onkeypress="return handleKeyPress(event);">
													<option value="0">
														<xsl:attribute name="selected"/>Tous Véhicules</option>
													<option value="2">VN seuls</option>
													<option value="1">VO seuls</option>
												</select>
											</td>
										</tr>
										<tr id="idzPeriode" style="display: none;">
											<td width="100px" align="right">Filtre :</td>
											<td>
												<select id="CBPERIODE" name="CBPERIODE" onchange="javascript: document.MainForm.PERIODESR.value=getObject('CBPERIODE').value; return false;" style="width:125px" onkeypress="return handleKeyPress(event);">
													<option value="">
														<xsl:if test="/document/OutParams/PERIODESR=''">Choix Période</xsl:if>
														<xsl:if test="/document/OutParams/PERIODESR!=''">Tous VN</xsl:if>
													</option>
													<option value="1">
														<xsl:if test="/document/OutParams/PERIODESR='1'">
															<xsl:attribute name="selected"/>
														</xsl:if>du mois en cours</option>
													<option value="2">
														<xsl:if test="/document/OutParams/PERIODESR='2'">
															<xsl:attribute name="selected"/>
														</xsl:if>à 30 jours</option>
													<option value="3">
														<xsl:if test="/document/OutParams/PERIODESR='3'">
															<xsl:attribute name="selected"/>
														</xsl:if>à 60 jours</option>
													<option value="4">
														<xsl:if test="/document/OutParams/PERIODESR='4'">
															<xsl:attribute name="selected"/>
														</xsl:if>à 90 jours</option>
												</select>
											</td>
										</tr>
										<tr id="idzSite" style="display: block;">
											<td width="100px" align="right">
												<xsl:if test="/document/OutParams/TypeVO&lt;=3">Société :</xsl:if>
												<xsl:if test="/document/OutParams/TypeVO&gt;3">Site :</xsl:if>
											</td>
											<td>
												<select id="CBSITE" name="CBSITE" style="width:125px" onchange="javascript: document.MainForm.SITESR.value=getObject('CBSITE').value; CBCommUpdate(); return false;" onkeypress="return handleKeyPress(event);">
													<xsl:if test="/document/OutParams/TypeVO&lt;=3">
														<option value="">
															<xsl:if test="/document/OutParams/SITESR=''">Choix Société</xsl:if>
															<xsl:if test="/document/OutParams/SITESR!=''">Toutes Sociétés</xsl:if>
														</option>
													</xsl:if>
													<xsl:if test="/document/OutParams/TypeVO&gt;3">
														<option value="">
															<xsl:if test="/document/OutParams/SITESR=''">Choix Site</xsl:if>
															<xsl:if test="/document/OutParams/SITESR!=''">Tous Sites</xsl:if>
														</option>
													</xsl:if>
													<xsl:for-each select="/document/ListSITES/ListSITE">
														<xsl:sort select="Site"/>
														<option value="{Site}">
															<xsl:if test="/document/OutParams/SITESR=Site">
																<xsl:attribute name="selected"/>
															</xsl:if>
															<xsl:value-of select="Site"/>
														</option>
													</xsl:for-each>
												</select>
											</td>
										</tr>
										<tr id="idzExpo" style="display: block;">
											<td width="100px" align="right">Expo :</td>
											<td>
												<select id="CBEXPO" name="CBEXPO" style="width:125px" onchange="javascript: document.MainForm.EXPOSR.value=getObject('CBEXPO').value; return false;" onkeypress="return handleKeyPress(event);">
													<option value="">
														<xsl:if test="/document/OutParams/EXPOSR=''">Choix Expo</xsl:if>
														<xsl:if test="/document/OutParams/EXPOSR!=''">Tous Expos</xsl:if>
													</option>
													<xsl:for-each select="/document/ListEXPOS/ListEXPO">
														<xsl:sort select="Expo"/>
														<option value="{Expo}">
															<xsl:if test="/document/OutParams/EXPOSR=Expo">
																<xsl:attribute name="selected"/>
															</xsl:if>
															<xsl:value-of select="Expo"/>
														</option>
													</xsl:for-each>
												</select>
											</td>
										</tr>
										<tr id="idzMarque" style="display: block;">
											<td width="100px" align="right">Marque :</td>
											<td>
												<select id="CBMARQUE" name="CBMARQUE" onchange="javascript: document.MainForm.MARQUESR.value=getObject('CBMARQUE').value; return false;" style="width:125px" onkeypress="return handleKeyPress(event);">
													<option value="">
														<xsl:if test="/document/OutParams/MARQUESR=''">Choix Marque</xsl:if>
														<xsl:if test="/document/OutParams/MARQUESR!=''">Toutes Marques</xsl:if>
													</option>
													<xsl:for-each select="/document/ListMARQUES/ListMARQUE">
														<option value="{Marque}">
															<xsl:if test="/document/OutParams/MARQUESR=Marque">
																<xsl:attribute name="selected"/>
															</xsl:if>
															<xsl:value-of select="Marque"/>
														</option>
													</xsl:for-each>
												</select>
											</td>
										</tr>
										<tr id="idzModele" style="display: block;">
											<td width="100px" align="right">Modèle :</td>
											<td>
												<select id="CBMODELE" name="CBMODELE" onchange="javascript: document.MainForm.MODELESR.value=getObject('CBMODELE').value; return false;" style="width:125px" onkeypress="return handleKeyPress(event);">
													<option value="">
														<xsl:if test="/document/OutParams/MODELESR=''">Choix Modèle</xsl:if>
														<xsl:if test="/document/OutParams/MODELESR!=''">Tous Modèles</xsl:if>
													</option>
													<xsl:for-each select="/document/ListMODELES/ListMODELE">
														<option value="{Modele}">
															<xsl:if test="translate(/document/OutParams/MODELESR,$ucase,$lcase)=translate(Modele,$ucase,$lcase)">
																<xsl:attribute name="selected"/>
															</xsl:if>
															<xsl:value-of select="Modele"/>
														</option>
													</xsl:for-each>
												</select>
											</td>
										</tr>
										<tr id="idzKMS" style="display: none;">
											<td nowrap="nowrap" width="110px" align="right">
												<select id="CBKMS" name="CBKMS" style="width:100px" onkeypress="return handleKeyPress(event);" onchange="javascript: UpdateKMS(getObject('CBKMS').value); return false;">
													<option value="0" style="color:orange">...km dernier Entretien</option>
													<option value="1" style="color:orange">KMS &lt;=</option>
													<option value="2" style="color:orange">KMS entre</option>
													<option value="3" style="color:orange">KMS &gt;=</option>
													<option value="10" style="color:orange">...Mensualité Financement</option>
													<option value="11" style="color:orange">M.Financ. &lt;=</option>
													<option value="12" style="color:orange">M.Financ. entre</option>
													<option value="13" style="color:orange">M.Financ. &gt;=</option>
												</select> :</td>
											<td nowrap="nowrap" width="190px">
												<table border="0">
													<tr id="idzKMS1" style="display: block;">
														<td>
															<input type="text" style="text-align:center;" size="8" name="vKMS0" maxlength="6" onkeypress="return handleKeyPress(event);"/> kms</td>
													</tr>
													<tr id="idzKMS2" style="display: none;">
														<td>
															<input type="text" style="text-align:center;" size="6" name="vKMS1" maxlength="6" onkeypress="return handleKeyPress(event);"/> et <input type="text" style="text-align:center;" size="6" name="vKMS2" maxlength="6" onkeypress="return handleKeyPress(event);"/> kms</td>
													</tr>
													<tr id="idzMFina1" style="display: none;">
														<td>
															<input type="text" style="text-align:center;" size="8" name="vMFina0" maxlength="6" onkeypress="return handleKeyPress(event);"/> euros</td>
													</tr>
													<tr id="idzMFina2" style="display: none;">
														<td>
															<input type="text" style="text-align:center;" size="6" name="vMFina1" maxlength="6" onkeypress="return handleKeyPress(event);"/> et <input type="text" style="text-align:center;" size="6" name="vMFina2" maxlength="6" onkeypress="return handleKeyPress(event);"/> euros</td>
													</tr>
												</table>
											</td>
										</tr>
										<tr id="idzVendeur" style="display: block;">
											<td width="100px" align="right">Vendeur :</td>
											<td>
												<select id="CBVENDEUR" name="CBVENDEUR" onchange="javascript: document.MainForm.VENDEURSR.value=getObject('CBVENDEUR').value; return false;" style="width:125px" onkeypress="return handleKeyPress(event);">
													<option value="">
														<xsl:if test="/document/OutParams/VENDEURSR=''">Choix Vendeur</xsl:if>
														<xsl:if test="/document/OutParams/VENDEURSR!=''">Tous Vendeurs</xsl:if>
													</option>
													<xsl:if test="/document/OutParams/VENDEURSR!=''">
														<option value="">
															<xsl:attribute name="selected"/>
															<xsl:value-of select="/document/OutParams/VENDEURSR"/>
														</option>
													</xsl:if>
													<xsl:for-each select="/document/ListVENDEURS/ListVENDEUR">
														<xsl:if test="/document/OutParams/VENDEURSR!=Vendeur">
															<option value="{Vendeur}">
																<xsl:value-of select="Vendeur"/>
															</option>
														</xsl:if>
													</xsl:for-each>
												</select>
											</td>
										</tr>
										<tr id="idzCommercial" style="display: block;">
											<td width="100px" align="right">Contact :</td>
											<td>
												<select id="CBCommercial" name="CBCommercial" onchange="javascript: document.MainForm.IDCOMSR.value=getObject('CBCommercial').value; return false;" style="width:175px" onkeypress="return handleKeyPress(event);"/>
											</td>
										</tr>
										<tr id="idzTFinancement" style="display: block;">
											<td width="100px" align="right">Financement :</td>
											<td>
												<select id="CBFinancement" name="CBFinancement" onchange="javascript: document.MainForm.FINANCEMENT.value=getObject('CBFinancement').value; return false;" style="width:125px" onkeypress="return handleKeyPress(event);">
													<option value="">Tous Financements</option>
													<xsl:for-each select="/document/ListFinancementS/ListFinancement">
														<option value="{FType}">
															<xsl:value-of select="FType"/>
														</option>
													</xsl:for-each>
												</select>
											</td>
										</tr>
										<tr id="idzTFiltreZ" style="display: block;">
											<td width="100px" align="right">Type VO :</td>
											<td>
												<select id="CBFiltreZ" name="CBFiltreZ" onchange="javascript: document.MainForm.FiltreZ.value=getObject('CBFiltreZ').value; return false;" style="width:125px" onkeypress="return handleKeyPress(event);">
													<option value="0">Tous NL (non livrés)</option>
													<option value="1">VO NL Vendus</option>
													<option value="2">VO en stock</option>
												</select>
											</td>
										</tr>
										<tr id="idzTSocFinAchat" style="display: block;">
											<td width="100px" align="right">Financement achat VO :</td>
											<td>
												<select id="CBSocFinAchat" name="CBSocFinAchat" onchange="javascript: document.MainForm.SOCFINACHAT.value=getObject('CBSocFinAchat').value; return false;" style="width:125px" onkeypress="return handleKeyPress(event);">
													<option value="">Tous Financements</option>
													<xsl:for-each select="/document/ListSocFinAchatS/ListSocFinAchat">
														<option value="{FType}">
															<xsl:value-of select="FType"/>
														</option>
													</xsl:for-each>
												</select>
											</td>
										</tr>
										<tr id="idzFFinancement" style="display: none;">
											<td width="100px" align="right">Stock - CTM:</td>
											<td>
												<select id="CBStockCTM" name="CBStockCTM" style="width:125px" onkeypress="return handleKeyPress(event);">
													<option value="0">
														<xsl:attribute name="selected"/>Stock ou CTM</option>
													<option value="1">Stock</option>
													<option value="2">CTM</option>
												</select>
											</td>
										</tr>
										<tr id="idzSFinancement" style="display: none;">
											<td width="100px" align="right">Situation Fin.:</td>
											<td>
												<select id="CBSituation" name="CBSituation" style="width:125px" onkeypress="return handleKeyPress(event);">
													<option value="0">
														<xsl:attribute name="selected"/>Tous</option>
												</select>
											</td>
										</tr>
										<tr id="idzStatutVN" style="display: none;">
											<td width="100px" align="right">Statut :</td>
											<td style="color:orange; z-index:1500;">
												<select id="CBSTATUTVN" name="CBSTATUTVN" onfocus="selfocused(this);" onblur="selblured(this);" onchange='selchanged(this);' size="1" multiple="multiple" style="width:125px; color:orange; z-index:1500;" onkeypress="return handleKeyPress(event);">
													<option value="data-tag">
														<xsl:value-of select="/document/OutParams/STATUTSR"/>
													</option>
													<option value="all">Tous Statuts</option>
													<xsl:for-each select="/document/ListSTATUTS/ListSTATUT">
														<option value="{Abbr}">
															<xsl:value-of select="Statut"/>
														</option>
													</xsl:for-each>
												</select>
											</td>
										</tr>
										<tr id="idzStatutVD" style="display: none;">
											<td width="100px" align="right">Statut :</td>
											<td>
												<select id="CBSTATUTVD" name="CBSTATUTVD" onfocus="selfocused(this);" onblur="selblured(this);" onchange='selchanged(this);' size="1" multiple="multiple" style="width:125px; color:orange; z-index:1500;" onkeypress="return handleKeyPress(event);">
													<option value="data-tag">
														<xsl:value-of select="/document/OutParams/STATUTSR"/>
													</option>
													<option value="all">Tous Statuts</option>
													<xsl:for-each select="/document/ListSTATUTVDS/ListSTATUTVD">
														<option value="{Abbr}">
															<xsl:value-of select="Statut"/>
														</option>
													</xsl:for-each>
												</select>
											</td>
										</tr>
										<tr id="idzCategorie" style="display: none;">
											<td width="100px" align="right">Catégorie :</td>
											<td>
												<select id="CBCategorie" name="CBCategorie" style="width:125px" onkeypress="return handleKeyPress(event);">
													<option value="">Toutes Catégories</option>
													<xsl:for-each select="/document/ListCATEGORIES/ListCATEGORIE">
														<option value="{lCategorie}">
															<xsl:value-of select="lCategorie"/>
														</option>
													</xsl:for-each>
												</select>
											</td>
										</tr>
										<tr id="idzCARecap" style="display: none;">
											<td width="100px" align="right">Récapitulatif:</td>
											<td>
												<select id="CBCARecap" name="CBCARecap" onchange="javascript: document.MainForm.CARECAPSR.value=getObject('CBCARecap').value; return false;" style="width:125px" onkeypress="return handleKeyPress(event);">
													<option value="0">
														<xsl:if test="/document/OutParams/CARECAPSR='' or /document/OutParams/CARECAPSR='0'">
															<xsl:attribute name="selected"/>
														</xsl:if>
														<xsl:attribute name="selected"/>HT</option>
													<option value="1">
														<xsl:if test="/document/OutParams/CARECAPSR='1'">
															<xsl:attribute name="selected"/>
														</xsl:if>Montant Prestations</option>
													<option value="2">
														<xsl:if test="/document/OutParams/CARECAPSR='2'">
															<xsl:attribute name="selected"/>
														</xsl:if>Montant Pièces de rechange</option>
													<option value="3">
														<xsl:if test="/document/OutParams/CARECAPSR='3'">
															<xsl:attribute name="selected"/>
														</xsl:if>Montant Remises</option>
												</select>
											</td>
										</tr>
										<tr id="idzDateInputDeb" style="display: none;">
											<td width="100px" align="right">Date de début :</td>
											<td>
												<input type="text" style="text-align:center;" size="12" name="DATEFieldDeb" onBlur="verifdate('MainForm', 'DATEFieldDeb');" maxlength="10" value="{/document/OutParams/DATEFieldDeb}" onkeypress="return handleKeyPress(event);"/> - <a href="." onclick="PopCalendar('CalendarDeb', 'DATEFieldDeb'); 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: none;">
											<td width="100px" align="right">Date de fin :</td>
											<td>
												<input type="text" style="text-align:center;" size="12" name="DATEFieldFin" onBlur="verifdate('MainForm', 'DATEFieldFin');" maxlength="10" value="{/document/OutParams/DATEFieldFin}" onkeypress="return handleKeyPress(event);"/> - <a href="." onclick="PopCalendar('CalendarFin', 'DATEFieldFin'); 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>
										<tr id="idzDateT1" style="display: block;">
											<td nowrap="nowrap" width="110px" align="right">
												<select id="CBDate1" name="CBDate1" style="width:100px" onkeypress="return handleKeyPress(event);">
													<option value="0" style="color:orange">...type de date</option>
													<option value="1" style="color:orange">date achat &lt;=</option>
													<option value="2" style="color:orange">date achat &gt;=</option>
													<option value="3" style="color:orange">date MEC &lt;=</option>
													<option value="4" style="color:orange">date MEC &gt;=</option>
													<option value="9" style="color:orange">fin garantie &lt;=</option>
													<option value="10" style="color:orange">fin garantie &gt;=</option>
													<option value="11" style="color:orange">fin financ.&lt;=</option>
													<option value="12" style="color:orange">fin financ.&gt;=</option>
													<option value="5" style="color:orange">dernier Entretien &lt;=</option>
													<option value="6" style="color:orange">dernier Entretien &gt;=</option>
													<option value="7" style="color:orange">proch.Entretien &lt;=</option>
													<option value="8" style="color:orange">proch.Entretien &gt;=</option>
													<option value="13" style="color:orange">proch.Achat &lt;=</option>
													<option value="14" style="color:orange">proch.Achat &gt;=</option>
													<option value="15" style="color:orange">proch.Relance &lt;=</option>
													<option value="16" style="color:orange">proch.Relance &gt;=</option>
													<option value="17" style="color:orange">date création &lt;=</option>
													<option value="18" style="color:orange">date création &gt;=</option>
													<option value="19" style="color:violet">validité carte fidélité &lt;=</option>
													<option value="20" style="color:violet">validité carte fidélité &gt;=</option>
												</select> :</td>
											<td>
												<input type="text" style="text-align:center;" size="14" name="DATETest1" onBlur="verifdate('MainForm', 'DATETest1');" maxlength="10" value="{/document/OutParams/DATETest1}" onkeypress="return handleKeyPress(event);"/> - <a href="." onclick="PopCalendar('CalendarDT1', 'DATETest1'); return false;">
													<img border="0" alt="Choisissez une date " src="{$XMLC_PictosPath}ico_planning.gif"/>
												</a>
												<input type="checkbox" value="n" title="Valeurs nulles à prendre en compte" name="vNull1"/>
												<iframe border="0" frameborder="0" marginheight="0" marginwidth="0" id="CalendarDT1" name="CalendarDT1" scrolling="no" src="{$XMLC_Portal}blank.htm" style="position: absolute; display: none; z-index:1000;"/>
											</td>
										</tr>
										<tr id="idzDateT2" style="display: block;">
											<td nowrap="nowrap" width="110px" align="right">
												<select id="CBDate2" name="CBDate2" style="width:100px" onkeypress="return handleKeyPress(event);">
													<option value="0" style="color:orange">...type de date</option>
													<option value="1" style="color:orange">date achat &lt;=</option>
													<option value="2" style="color:orange">date achat &gt;=</option>
													<option value="3" style="color:orange">date MEC &lt;=</option>
													<option value="4" style="color:orange">date MEC &gt;=</option>
													<option value="9" style="color:orange">fin garantie &lt;=</option>
													<option value="10" style="color:orange">fin garantie &gt;=</option>
													<option value="11" style="color:orange">fin financ.&lt;=</option>
													<option value="12" style="color:orange">fin financ.&gt;=</option>
													<option value="5" style="color:orange">dernier Entretien &lt;=</option>
													<option value="6" style="color:orange">dernier Entretien &gt;=</option>
													<option value="7" style="color:orange">proch.Entretien &lt;=</option>
													<option value="8" style="color:orange">proch.Entretien &gt;=</option>
													<option value="13" style="color:orange">proch.Achat &lt;=</option>
													<option value="14" style="color:orange">proch.Achat &gt;=</option>
													<option value="15" style="color:orange">proch.Relance &lt;=</option>
													<option value="16" style="color:orange">proch.Relance &gt;=</option>
													<option value="17" style="color:orange">date création &lt;=</option>
													<option value="18" style="color:orange">date création &gt;=</option>
													<option value="19" style="color:violet">validité carte fidélité &lt;=</option>
													<option value="20" style="color:violet">validité carte fidélité &gt;=</option>
												</select> :</td>
											<td>
												<input type="text" style="text-align:center;" size="14" name="DATETest2" onBlur="verifdate('MainForm', 'DATETest2');" maxlength="10" value="{/document/OutParams/DATETest2}" onkeypress="return handleKeyPress(event);"/> - <a href="." onclick="PopCalendar('CalendarDT2', 'DATETest2'); return false;">
													<img border="0" alt="Choisissez une date " src="{$XMLC_PictosPath}ico_planning.gif"/>
												</a>
												<input type="checkbox" value="n" title="Valeurs nulles à prendre en compte" name="vNull2"/>
												<iframe border="0" frameborder="0" marginheight="0" marginwidth="0" id="CalendarDT2" name="CalendarDT2" scrolling="no" src="{$XMLC_Portal}blank.htm" style="position: absolute; display: none; z-index:1000;"/>
											</td>
										</tr>
										<tr id="idzDateT3" style="display: block;">
											<td nowrap="nowrap" width="110px" align="right">
												<select id="CBDate3" name="CBDate3" style="width:100px" onkeypress="return handleKeyPress(event);">
													<option value="0" style="color:orange">...type de date</option>
													<option value="1" style="color:orange">date achat &lt;=</option>
													<option value="2" style="color:orange">date achat &gt;=</option>
													<option value="3" style="color:orange">date MEC &lt;=</option>
													<option value="4" style="color:orange">date MEC &gt;=</option>
													<option value="9" style="color:orange">fin garantie &lt;=</option>
													<option value="10" style="color:orange">fin garantie &gt;=</option>
													<option value="11" style="color:orange">fin financ.&lt;=</option>
													<option value="12" style="color:orange">fin financ.&gt;=</option>
													<option value="5" style="color:orange">dernier Entretien &lt;=</option>
													<option value="6" style="color:orange">dernier Entretien &gt;=</option>
													<option value="7" style="color:orange">proch.Entretien &lt;=</option>
													<option value="8" style="color:orange">proch.Entretien &gt;=</option>
													<option value="13" style="color:orange">proch.Achat &lt;=</option>
													<option value="14" style="color:orange">proch.Achat &gt;=</option>
													<option value="15" style="color:orange">proch.Relance &lt;=</option>
													<option value="16" style="color:orange">proch.Relance &gt;=</option>
													<option value="17" style="color:orange">date création &lt;=</option>
													<option value="18" style="color:orange">date création &gt;=</option>
													<option value="19" style="color:violet">validité carte fidélité &lt;=</option>
													<option value="20" style="color:violet">validité carte fidélité &gt;=</option>
												</select> :</td>
											<td>
												<input type="text" style="text-align:center;" size="14" name="DATETest3" onBlur="verifdate('MainForm', 'DATETest3');" maxlength="10" value="{/document/OutParams/DATETest3}" onkeypress="return handleKeyPress(event);"/> - <a href="." onclick="PopCalendar('CalendarDT3', 'DATETest3'); return false;">
													<img border="0" alt="Choisissez une date " src="{$XMLC_PictosPath}ico_planning.gif"/>
												</a>
												<input type="checkbox" value="n" title="Valeurs nulles à prendre en compte" name="vNull3"/>
												<iframe border="0" frameborder="0" marginheight="0" marginwidth="0" id="CalendarDT3" name="CalendarDT3" scrolling="no" src="{$XMLC_Portal}blank.htm" style="position: absolute; display: none; z-index:1000;"/>
											</td>
										</tr>
										<tr id="idzDateT4" style="display: block;">
											<td nowrap="nowrap" width="110px" align="right">
												<select id="CBDate4" name="CBDate4" style="width:100px" onkeypress="return handleKeyPress(event);">
													<option value="0" style="color:orange">...type de date</option>
													<option value="1" style="color:orange">date achat &lt;=</option>
													<option value="2" style="color:orange">date achat &gt;=</option>
													<option value="3" style="color:orange">date MEC &lt;=</option>
													<option value="4" style="color:orange">date MEC &gt;=</option>
													<option value="9" style="color:orange">fin garantie &lt;=</option>
													<option value="10" style="color:orange">fin garantie &gt;=</option>
													<option value="11" style="color:orange">fin financ.&lt;=</option>
													<option value="12" style="color:orange">fin financ.&gt;=</option>
													<option value="5" style="color:orange">dernier Entretien &lt;=</option>
													<option value="6" style="color:orange">dernier Entretien &gt;=</option>
													<option value="7" style="color:orange">proch.Entretien &lt;=</option>
													<option value="8" style="color:orange">proch.Entretien &gt;=</option>
													<option value="13" style="color:orange">proch.Achat &lt;=</option>
													<option value="14" style="color:orange">proch.Achat &gt;=</option>
													<option value="15" style="color:orange">proch.Relance &lt;=</option>
													<option value="16" style="color:orange">proch.Relance &gt;=</option>
													<option value="17" style="color:orange">date création &lt;=</option>
													<option value="18" style="color:orange">date création &gt;=</option>
													<option value="19" style="color:violet">validité carte fidélité &lt;=</option>
													<option value="20" style="color:violet">validité carte fidélité &gt;=</option>
												</select> :</td>
											<td>
												<input type="text" style="text-align:center;" size="14" name="DATETest4" onBlur="verifdate('MainForm', 'DATETest4');" maxlength="10" value="{/document/OutParams/DATETest4}" onkeypress="return handleKeyPress(event);"/> - <a href="." onclick="PopCalendar('CalendarDT4', 'DATETest4'); return false;">
													<img border="0" alt="Choisissez une date " src="{$XMLC_PictosPath}ico_planning.gif"/>
												</a>
												<input type="checkbox" value="n" title="Valeurs nulles à prendre en compte" name="vNull4"/>
												<iframe border="0" frameborder="0" marginheight="0" marginwidth="0" id="CalendarDT4" name="CalendarDT4" scrolling="no" src="{$XMLC_Portal}blank.htm" style="position: absolute; display: none; z-index:1000;"/>
											</td>
										</tr>
										<tr id="idzChoixIdent" style="display: none;">
											<td width="100px" align="right">Type de fiche:</td>
											<td>
												<select id="CBChoixIdent" name="CBChoixIdent" onchange="javascript: document.MainForm.TypeIdent.value=getObject('CBChoixIdent').value; return false;" style="width:125px" onkeypress="return handleKeyPress(event);">
													<option value="1">Particulier</option>
													<option value="2">Société</option>
												</select>
											</td>
										</tr>
										<tr id="idzTypeIdent" style="display: none;">
											<td width="100px" align="right">Filtre:</td>
											<td>
												<select id="CBTypeIdent" name="CBTypeIdent" onchange="javascript: document.MainForm.TypeIdent.value=getObject('CBTypeIdent').value; return false;" style="width:125px" onkeypress="return handleKeyPress(event);">
													<option value="0">Tous Clients ou Prospects</option>
													<option value="1">Particuliers</option>
													<option value="2">Sociétés</option>
												</select>
											</td>
										</tr>
										<tr id="idzMail" style="display: none;">
											<td width="100px" align="right">Mail :</td>
											<td>
												<select id="CBMail" name="CBMail" onchange="javascript: document.MainForm.vMail.value=getObject('CBMail').value; return false;" style="width:125px" onkeypress="return handleKeyPress(event);">
													<option value="0">Tous </option>
													<option value="1">Mail OK</option>
													<option value="2">Mail Invalide</option>
													<option value="3">Désabonnement Mail</option>
													<option value="4">pas de mail</option>
												</select>
											</td>
										</tr>
										<tr id="idzMobile" style="display: none;">
											<td width="100px" align="right">Mobile :</td>
											<td>
												<select id="CBMobile" name="CBMobile" onchange="javascript: document.MainForm.vMobile.value=getObject('CBMobile').value; return false;" style="width:125px" onkeypress="return handleKeyPress(event);">
													<option value="0">Tous </option>
													<option value="1">Mobile OK</option>
													<option value="2">Mobile Invalide</option>
													<option value="3">Désabonnement SMS</option>
													<option value="4">pas de Mobile </option>
												</select>
											</td>
										</tr>
										<tr id="idzCP" style="display: none;">
											<td width="100px" align="right">Code postal:</td>
											<td>
												<input type="text" style="text-align:center;" size="20" name="vCP" maxlength="20" onkeypress="return handleKeyPress(event);"/> - <img border="0" alt='précisez un code postal
exemple 1 : "59000" pour un code postal précis
exemple 2 : "59*" pour le département 59
exemple 3 : "B*" pour les codes postaux belges...' src="{$XMLC_PictosPath}info_small.gif"/>
												<input type="checkbox" value="n" title="Valeurs nulles à prendre en compte" name="vCPNull"/>
											</td>
										</tr>
										<tr id="idzVille" style="display: none;">
											<td width="100px" align="right">Ville:</td>
											<td>
												<input type="text" style="text-align:center;" size="20" name="vVille" maxlength="40" onkeypress="return handleKeyPress(event);"/> - <img border="0" alt='précisez une ville 
exemple 1 : "LILLE" pour une ville précise
exemple 2 : "LILLE *" pour "Lille " &amp; Lille Cedex"
exemple 3 : "LILLE*" pour "Lille " &amp; Lille Cedex", mais aussi "Lillers", "Lillebonne"...
ou encore "Lille*,Roubaix*,Tourcoing*"' src="{$XMLC_PictosPath}info_small.gif"/>
												<input type="checkbox" value="n" title="Valeurs nulles à prendre en compte" name="vVilleNull"/>
											</td>
										</tr>
										<tr id="idzImport" style="display: block;">
											<td width="100px" align="right">Import Profid :</td>
											<td>
												<select id="CBImport" name="CBImport" style="width:175px" onchange="javascript: document.MainForm.idImport.value=getObject('CBImport').value; return false;" onkeypress="return handleKeyPress(event);">
													<xsl:for-each select="/document/ListChoiceS/ListChoice">
														<option value="{id}">
															<xsl:value-of select="ChoiceName"/>
														</option>
													</xsl:for-each>
												</select>
											</td>
										</tr>
										<tr id="idzSegment" style="display: none;">
											<td width="100px" align="right">Prochain Achat<br/>P.A. Segment:</td>
											<td>
												<select id="CBSegment" name="CBSegment" style="width:125px">
													<option value=""/>
													<xsl:for-each select="/document/ListPASegmentS/ListPASegment">
														<option value="{AbbrInfo}">
															<xsl:value-of select="LibelleInfo"/>
														</option>
													</xsl:for-each>
												</select>
											</td>
										</tr>
										<tr id="idzTypeVeh" style="display: none;">
											<td width="100px" align="right">P.A.Type:</td>
											<td>
												<select id="CBTypeVeh" name="CBTypeVeh" style="width:125px">
													<option value=""/>
													<xsl:for-each select="/document/ListPATypeVOS/ListPATypeVO">
														<option value="{AbbrInfo}">
															<xsl:value-of select="LibelleInfo"/>
														</option>
													</xsl:for-each>
												</select>
											</td>
										</tr>
										<tr id="idzEnergie" style="display: none;">
											<td width="100px" align="right">P.A. Energie:</td>
											<td>
												<select id="CBEnergie" name="CBEnergie" style="width:125px">
													<option value=""/>
													<xsl:for-each select="/document/ListPAEnergieS/ListPAEnergie">
														<option value="{AbbrInfo}">
															<xsl:value-of select="LibelleInfo"/>
														</option>
													</xsl:for-each>
												</select>
											</td>
										</tr>
										<tr id="idzSatisfVN" style="display: none;">
											<td width="100px" align="right">Satisfaction VN:</td>
											<td>
												<select id="CBSatisfVN" name="CBSatisfVN" style="width:125px">
													<option value="">..</option>
													<option value="1">Très satisfait</option>
													<option value="2">Satisfait</option>
													<option value="3">Peu satisfait</option>
													<option value="4">Mécontent</option>
												</select>
											</td>
										</tr>
										<tr id="idzSatisfSAV" style="display: none;">
											<td width="100px" align="right">Satisfaction SAV:</td>
											<td>
												<select id="CBSatisfSAV" name="CBSatisfSAV" style="width:125px">
													<option value="">..</option>
													<option value="1">Très satisfait</option>
													<option value="2">Satisfait</option>
													<option value="3">Peu satisfait</option>
													<option value="4">Mécontent</option>
												</select>
											</td>
										</tr>
									</table>
								</td>
								<td align="right" valign="bottom">
									<table id="idzOrder" style="display: block;">
										<tr>
											<td width="60px">Tri :</td>
											<td>
												<select id="CBORDER" name="CBORDER" onchange="javascript: document.MainForm.ORDERSR.value=getObject('CBORDER').value; return false;" style="width:125px" onkeypress="return handleKeyPress(event);"/>
											</td>
										</tr>
									</table>
									<table id="idzPProfid" style="display: block;">
										<tr>
											<td width="60px">Résultat :</td>
											<td>
												<select id="CBPProfid" name="CBPProfid" onchange="javascript: document.MainForm.PPROFIDSR.value=getObject('CBPProfid').value; return false;" style="width:125px" onkeypress="return handleKeyPress(event);">
													<option value="30" style="color:green;">
														<xsl:if test="/document/OutParams/PPROFIDSR='' or /document/OutParams/PPROFIDSR='30' or /document/OutParams/PPROFIDSR='90'">
															<xsl:attribute name="selected"/>
														</xsl:if>Fiches ProFid</option>
													<option value="0">
														<xsl:if test="/document/OutParams/PPROFIDSR='0'">
															<xsl:attribute name="selected"/>
														</xsl:if>Fiches ProFid Particulier</option>
													<option value="20">
														<xsl:if test="/document/OutParams/PPROFIDSR='20'">
															<xsl:attribute name="selected"/>
														</xsl:if>Fiches ProFid Société</option>
													<option value="1">
														<xsl:if test="/document/OutParams/PPROFIDSR='1'">
															<xsl:attribute name="selected"/>
														</xsl:if>Liste des Clients</option>
													<option value="2">
														<xsl:if test="/document/OutParams/PPROFIDSR='2'">
															<xsl:attribute name="selected"/>
														</xsl:if>Etiquettes</option>
													<xsl:if test="/document/XMLC_Params/XMLC_Authenticated != '0' and (/document/XMLC_Params/XMLC_Administrator = '1' or /document/XMLC_Params/XMLC_Supervisor = '1' )">
														<option value="10">
															<xsl:if test="/document/OutParams/PPROFIDSR='10'">
																<xsl:attribute name="selected"/>
															</xsl:if>Fichier CSV</option>
													</xsl:if>
													<option value="11">
														<xsl:if test="/document/OutParams/PPROFIDSR='11'">
															<xsl:attribute name="selected"/>
														</xsl:if>Répartition MEC, SAV &amp; Géo</option>
													<option value="5">
														<xsl:if test="/document/OutParams/PPROFIDSR='5'">
															<xsl:attribute name="selected"/>
														</xsl:if>Répartition Contacts</option>
													<option value="6">
														<xsl:if test="/document/OutParams/PPROFIDSR='6'">
															<xsl:attribute name="selected"/>
														</xsl:if>Répartition Origines</option>
													<option value="7">
														<xsl:if test="/document/OutParams/PPROFIDSR='7'">
															<xsl:attribute name="selected"/>
														</xsl:if>Contacts Créateurs</option>
													<xsl:if test="/document/XMLC_Params/XMLC_Authenticated != '0' and (/document/XMLC_Params/XMLC_UserName = 'llebleu@free.fr')">
														<option value="40">
															<xsl:if test="/document/OutParams/PPROFIDSR='40'">
																<xsl:attribute name="selected"/>
															</xsl:if>Fichier Excel</option>
														<option value="41">
															<xsl:if test="/document/OutParams/PPROFIDSR='41'">
																<xsl:attribute name="selected"/>
															</xsl:if>Clients et Véhicules Excel</option>
														<option value="12">
															<xsl:if test="/document/OutParams/PPROFIDSR='12'">
																<xsl:attribute name="selected"/>
															</xsl:if>Rép. Contacts CSV</option>
														<option value="13">
															<xsl:if test="/document/OutParams/PPROFIDSR='13'">
																<xsl:attribute name="selected"/>
															</xsl:if>Mobiles CSV</option>
														<option value="14">
															<xsl:if test="/document/OutParams/PPROFIDSR='14'">
																<xsl:attribute name="selected"/>
															</xsl:if>Mails CSV</option>
														<option value="16">
															<xsl:if test="/document/OutParams/PPROFIDSR='16'">
																<xsl:attribute name="selected"/>
															</xsl:if>Données CSV pour GMaps</option>
													</xsl:if>
													<xsl:if test="/document/XMLC_Params/XMLC_Authenticated != '0' and (/document/XMLC_Params/XMLC_Administrator = '1' or /document/XMLC_Params/XMLC_Supervisor = '1' )">
														<option value="15">
															<xsl:if test="/document/OutParams/PPROFIDSR='15'">
																<xsl:attribute name="selected"/>
															</xsl:if>Clients et Véhicules CSV</option>
													</xsl:if>
												</select>
											</td>
										</tr>
									</table>
									<table id="idzPProfidAct" style="display: block;">
										<tr>
											<td width="60px">Résultat :</td>
											<td>
												<select id="CBPProfidAct" name="CBPProfidAct" onchange="javascript: document.MainForm.PPROFIDSR.value=getObject('CBPProfidAct').value; return false;" style="width:125px" onkeypress="return handleKeyPress(event);">
													<option value="90" style="color:green;">
														<xsl:if test="/document/OutParams/PPROFIDSR='' or /document/OutParams/PPROFIDSR!='10'">
															<xsl:attribute name="selected"/>
														</xsl:if>Liste</option>
													<xsl:if test="/document/XMLC_Params/XMLC_Authenticated != '0' and (/document/XMLC_Params/XMLC_Administrator = '1' or /document/XMLC_Params/XMLC_Supervisor = '1' )">
														<option value="10">
															<xsl:if test="/document/OutParams/PPROFIDSR='10'">
																<xsl:attribute name="selected"/>
															</xsl:if>Fichier CSV</option>
													</xsl:if>
												</select>
											</td>
										</tr>
									</table>
									<table>
										<tr>
											<td width="60px"/>
											<td width="125px"/>
										</tr>
									</table>
									<div id="idzDateJPlus">
										<xsl:call-template name="xslc:Button">
											<xsl:with-param name="Caption">Jour Précédent</xsl:with-param>
											<xsl:with-param name="OnClick">prevDay();</xsl:with-param>
											<xsl:with-param name="Width">150px</xsl:with-param>
										</xsl:call-template>
										<xsl:call-template name="xslc:Button">
											<xsl:with-param name="Caption">Jour Suivant</xsl:with-param>
											<xsl:with-param name="OnClick">nextDay();</xsl:with-param>
											<xsl:with-param name="Width">150px</xsl:with-param>
										</xsl:call-template>
									</div>
									<div id="idzDateBtn">
										<xsl:call-template name="xslc:Button">
											<xsl:with-param name="Caption">Mois Précédent</xsl:with-param>
											<xsl:with-param name="OnClick">prevMonth();</xsl:with-param>
											<xsl:with-param name="Width">150px</xsl:with-param>
										</xsl:call-template>
										<xsl:call-template name="xslc:Button">
											<xsl:with-param name="Caption">Mois Suivant</xsl:with-param>
											<xsl:with-param name="OnClick">nextMonth();</xsl:with-param>
											<xsl:with-param name="Width">150px</xsl:with-param>
										</xsl:call-template>
									</div>
									<div style="margin-bottom: 5px; display:none;">
										<xsl:call-template name="xslc:Button">
											<xsl:with-param name="idName">BtnActualiser</xsl:with-param>
											<xsl:with-param name="Caption">Actualiser</xsl:with-param>
											<xsl:with-param name="OnClick">ShowListReport() ; return false;</xsl:with-param>
											<xsl:with-param name="Width">150px</xsl:with-param>
										</xsl:call-template>
									</div>
									<div id="idzBtnXLS">
										<xsl:call-template name="xslc:Button">
											<xsl:with-param name="idName">BtnXLS</xsl:with-param>
											<xsl:with-param name="Caption">Exporter vers EXCEL</xsl:with-param>
											<xsl:with-param name="OnClick">goSubmit('XLS'); return false;</xsl:with-param>
											<xsl:with-param name="Width">150px</xsl:with-param>
										</xsl:call-template>
									</div>
									<div>
										<xsl:call-template name="xslc:Button">
											<xsl:with-param name="idName">BtnValider</xsl:with-param>
											<xsl:with-param name="Caption">Valider</xsl:with-param>
											<xsl:with-param name="OnClick">goSubmit('PDF'); return false;</xsl:with-param>
											<xsl:with-param name="Width">150px</xsl:with-param>
										</xsl:call-template>
									</div>
									<div style="margin-bottom: 5px;">
										<xsl:call-template name="xslc:Button">
											<xsl:with-param name="idName">BtnAnnuler</xsl:with-param>
											<xsl:with-param name="Caption">Annuler</xsl:with-param>
											<xsl:with-param name="OnClick">parent.ShowHide('SelPrint'); return false;</xsl:with-param>
											<xsl:with-param name="Width">150px</xsl:with-param>
										</xsl:call-template>
									</div>
								</td>
							</tr>
						</table>
					</div>
				</form>
			</xsl:with-param>
			<xsl:with-param name="Head">
				<xsl:variable name="vdefReport" select="/document/OutParams/rptname"/>
				<xsl:variable name="vGrpUser" select="/document/UserGroup"/>
				<META HTTP-EQUIV="Cache-Control" CONTENT="must-revalidate, post-check=0, pre-check=0"/>
				<script language="javascript">
					<![CDATA[function handleKeyPress(e) {
  var keyCode = GetEventKeyCode(e);
// sur Entrer : Valider
  if (keyCode == 13) {
    goSubmit('PDF'); return false; }
  if (keyCode == 27) {
    parent.ShowHide('SelPrint'); return false;}
//  return false;
}

var keyPress = '0';

function getSiteSR() {
  var sRes = GetField('MainForm', 'SITESR');
//  if ((keyPress == '17') && (sRes == '')) {
  if (sRes == '') {
    keyPress = '0';
    sRes = 'All';
  }
  return sRes;
}

function getKeyDown(e){
  keyPress = (document.all)?event.keyCode:e.keyCode;
}
document.onkeydown=getKeyDown;
]]>
					<![CDATA[
// 
// Construction de la liste des Commerciaux & Sites
// 
var tabComs= new Array( 0, 0, "", "",]]>
					<xsl:for-each select="/document/ListComS/ListCom">
						<xsl:value-of select="idCom"/>
						<![CDATA[,]]>
						<xsl:value-of select="cActif"/>
						<![CDATA[,"]]>
						<xsl:value-of select="nVendeur"/>
						<![CDATA[","]]>
						<xsl:value-of select="Site"/>
						<![CDATA[",]]>
					</xsl:for-each>
					<![CDATA[0, 0, "eof","eof");]]>
					<![CDATA[
// 
// Construction de la liste des Rapports affichables
// 
var tabInfos= new Array("", 0, 0, "0", 0, 0, 0, 0, 0, "","",]]>
					<xsl:for-each select="/document/document/ReportListS/ReportList">
						<![CDATA["]]>
						<xsl:value-of select="ReportName"/>
						<![CDATA[",]]>
						<xsl:value-of select="SelSite"/>
						<![CDATA[,]]>
						<xsl:value-of select="SelDate"/>
						<![CDATA[,"]]>
						<xsl:value-of select="SelTiers"/>
						<![CDATA[",]]>
						<xsl:value-of select="SelMarque"/>
						<![CDATA[,]]>
						<xsl:value-of select="SelModele"/>
						<![CDATA[,]]>
						<xsl:value-of select="SelStatut"/>
						<![CDATA[,]]>
						<xsl:value-of select="SelPeriode"/>
						<![CDATA[,]]>
						<xsl:value-of select="SelNbEx"/>
						<![CDATA[,"]]>
						<xsl:value-of select="ListValueOrder"/>
						<![CDATA[","]]>
						<xsl:value-of select="ACL"/>
						<![CDATA[",]]>
					</xsl:for-each>
					<![CDATA["eof");]]>
					<![CDATA[
var vDefOrder= ]]>
					<xsl:if test="/document/OutParams/ORDERSR=''">0;</xsl:if>
					<xsl:if test="/document/OutParams/ORDERSR!=''">
						<xsl:value-of select="/document/OutParams/ORDERSR"/>;</xsl:if>
					<![CDATA[// 
// Visualiser la boîte liste des rapports & rappel du rapport précédent
// 
function ShowListReport() {

  ShowValue();
  SetFocus(getObjectById('CBSelReport'));
  CBCommUpdate(); 

}

function CBCommUpdate() {
// chargement de la liste des commerciaux
  oList=getObjectById('CBCommercial');
  if (oList == null)
     return false;
  clearCombo(oList);
  sVal=new RegExp(GetField('MainForm', 'SITESR'),"g");

  oList.options[oList.options.length] = new Option("", 0);
  for (var ii = 0; ii < tabComs.length; ii = ii + 4)
   {
   if ((tabComs[ii+2]!="eof" ) && (tabComs[ii+3]!="eof") && (tabComs[ii+3].search(sVal)!=-1)) 
    {
        var option = document.createElement("option");
        if (tabComs[ii+1] == '0') 
          option.style.color = 'gray';
        if (tabComs[ii+1] == '1') 
          option.style.color = 'blue';
        if (tabComs[ii+1] == '2') 
          option.style.color = 'orange';
        option.setAttribute("value", tabComs[ii]);
        option.innerHTML =  trim(tabComs[ii+2]);
        oList.appendChild(option);
// au lieu de        oList.options[oList.options.length] = new Option(trim(tabComs[ii+2]), tabComs[ii]);
   }
  };
}]]>
					<![CDATA[// 
// Valider les paramètres d'appel et lancement Submit
// 
function goSubmit(strFormat) {
 if (verifdate('MainForm', 'DATEFieldDeb')==false) {
     SetFocus(getObjectById('DATEFieldDeb')); return false; }
 if (verifdate('MainForm', 'DATEFieldFin')==false) {
     SetFocus(getObjectById('DATEFieldFin')); return false; }

 if ((isVisible('idzKMS')) && (isVisible('idzKMS1')) && (GetField('MainForm', 'CBKMS')!=0) && (isNaN(GetField('MainForm', 'vKMS0')))){
     SetFocus(getObjectById('vKMS0')); return false; }
 if ((isVisible('idzKMS')) && (isVisible('idzKMS2')) && (GetField('MainForm', 'CBKMS')!=0) && (isNaN(GetField('MainForm', 'vKMS1')))){
     SetFocus(getObjectById('vKMS1')); return false; }
 if ((isVisible('idzKMS')) && (isVisible('idzKMS2')) && (GetField('MainForm', 'CBKMS')!=0) && (isNaN(GetField('MainForm', 'vKMS2')))){
     SetFocus(getObjectById('vKMS2')); return false; }

 if ((isVisible('idzKMS')) && (isVisible('idzMFina1')) && (GetField('MainForm', 'CBKMS')!=10) && (isNaN(GetField('MainForm', 'vMFina0')))){
     SetFocus(getObjectById('vMFina0')); return false; }
 if ((isVisible('idzKMS')) && (isVisible('idzMFina2')) && (GetField('MainForm', 'CBKMS')!=10) && (isNaN(GetField('MainForm', 'vMFina1')))){
     SetFocus(getObjectById('vMFina1')); return false; }
 if ((isVisible('idzKMS')) && (isVisible('idzMFina2')) && (GetField('MainForm', 'CBKMS')!=10) && (isNaN(GetField('MainForm', 'vMFina2')))){
     SetFocus(getObjectById('vMFina2')); return false; }


 aVal=parseInt(GetField('MainForm', 'CBSelReport'));
 if (aVal=='-1') {return false} ;
 if (tabInfos[aVal+10]=='0') {return false} ;
 var repVal=trim(tabInfos[aVal]);
// le 27/12/0111 -> pas de test sur le modèle
// if ((GetField('MainForm', 'MODELESR')=='') && ((repVal.substring(0,4)=='PF05') || (repVal.substring(0,4)=='PF06') || (repVal.substring(0,4)=='PF07'))) {SetFocus(getObjectById('CBMODELE')); return false} ;
// if ((GetField('MainForm', 'MODELESR')=='') && ((repVal.substring(0,4)=='PF04') && (GetField('MainForm', 'CBDate1')=='0'))) {SetFocus(getObjectById('CBMODELE')); return false} ;

 if (isVisible('idzDateT1')) 
  {
  if ((GetField('MainForm', 'DATETest1')!='') && (GetField('MainForm', 'CBDate1')=='0')){ SetFocus(getObjectById('CBDate1')); return false; }
  if (((GetField('MainForm', 'CBDate1')!='0')) && (verifdate('MainForm', 'DATETest1')==false)) { SetFocus(getObjectById('DATETest1')); return false; }

  if ((GetField('MainForm', 'DATETest2')!='') && (GetField('MainForm', 'CBDate2')=='0')){ SetFocus(getObjectById('CBDate2')); return false; }
  if (((GetField('MainForm', 'CBDate2')!='0')) && (verifdate('MainForm', 'DATETest2')==false)) { SetFocus(getObjectById('DATETest2')); return false; }

  if ((GetField('MainForm', 'DATETest3')!='') && (GetField('MainForm', 'CBDate3')=='0')){ SetFocus(getObjectById('CBDate3')); return false; }
  if (((GetField('MainForm', 'CBDate3')!='0')) && (verifdate('MainForm', 'DATETest3')==false)) { SetFocus(getObjectById('DATETest3')); return false; }

  if ((GetField('MainForm', 'DATETest4')!='') && (GetField('MainForm', 'CBDate4')=='0')){ SetFocus(getObjectById('CBDate4')); return false; }
  if (((GetField('MainForm', 'CBDate4')!='0')) && (verifdate('MainForm', 'DATETest4')==false)) { SetFocus(getObjectById('DATETest4')); return false; }

  }
]]>
					<![CDATA[var ares='';
 if (isVisible('idzSite')) ares+='p1='+getSiteSR()+'|';
 if (isVisible('idzExpo')) ares+='e1='+GetField('MainForm', 'EXPOSR')+'|';
 if (isVisible('idzModele')) ares+='p2='+GetField('MainForm', 'MODELESR')+'|';
 if (isVisible('idzMarque')) ares+='p4='+GetField('MainForm', 'MARQUESR')+'|';
 if (isVisible('idzVendeur')) ares+='p3='+GetField('MainForm', 'VENDEURSR')+'|';
 if (isVisible('idzStatutVN')) ares+='p5='+GetField('MainForm', 'STATUTSR')+'|';
 if (isVisible('idzStatutVD')) ares+='p5='+GetField('MainForm', 'STATUTSR')+'|';
 if (isVisible('idzTypeVO')) ares+='p31='+GetField('MainForm', 'CBTypeVO')+'|';
 if (isVisible('idzPeriode')) ares+='p6='+GetField('MainForm', 'PERIODESR')+'|';
 if (isVisible('idzDateT1')) 
  {
  if (GetField('MainForm', 'CBDate1')!='0') ares+='td1='+GetField('MainForm', 'CBDate1')+','+GetValCheckbox('vNull1')+GetField('MainForm', 'DATETest1')+'|';
  if (GetField('MainForm', 'CBDate2')!='0') ares+='td2='+GetField('MainForm', 'CBDate2')+','+GetValCheckbox('vNull2')+GetField('MainForm', 'DATETest2')+'|';
  if (GetField('MainForm', 'CBDate3')!='0') ares+='td3='+GetField('MainForm', 'CBDate3')+','+GetValCheckbox('vNull3')+GetField('MainForm', 'DATETest3')+'|';
  if (GetField('MainForm', 'CBDate4')!='0') ares+='td4='+GetField('MainForm', 'CBDate4')+','+GetValCheckbox('vNull4')+GetField('MainForm', 'DATETest4')+'|';
  }
 if (isVisible('idzPProfid')) ares+='p8='+GetField('MainForm', 'PPROFIDSR')+'|';
 // dans le cas de la sélection des actions, n'accepter que le format CSV sinon c'est par défaut une liste
 if (isVisible('idzPProfidAct')) 
   {
   if (GetField('MainForm', 'PPROFIDSR')=="10") ares+='p8='+GetField('MainForm', 'PPROFIDSR')+'|'; 
   }
 if (isVisible('idzChoixIdent')) ares+='p15='+GetField('MainForm', 'TypeIdent')+'|';
 if (isVisible('idzTypeIdent')) ares+='p15='+GetField('MainForm', 'TypeIdent')+'|';
 if (isVisible('idzCP')) ares+='p16='+GetValCheckbox('vCPNull')+GetField('MainForm', 'vCP')+'|';
 if (isVisible('idzVille')) ares+='p17='+GetValCheckbox('vVilleNull')+GetField('MainForm', 'vVille')+'|';
 if (isVisible('idzImport')) ares+='p18='+GetField('MainForm', 'idImport')+'|';

 if ((isVisible('idzMail')) && (GetField('MainForm', 'vMail')!='0')) ares+='p19='+GetField('MainForm', 'vMail')+'|';
 if ((isVisible('idzMobile')) && (GetField('MainForm', 'vMobile')!='0')) ares+='p20='+GetField('MainForm', 'vMobile')+'|';
 if ((isVisible('idzKMS')) && (GetField('MainForm', 'CBKMS')!=0) && (GetField('MainForm', 'CBKMS')<10)) {
    ares+='p21='+GetField('MainForm', 'CBKMS')+','+GetField('MainForm', 'vKMS0')+','+GetField('MainForm', 'vKMS1')+','+GetField('MainForm', 'vKMS2')+'|';
  }
 if ((isVisible('idzKMS')) && (GetField('MainForm', 'CBKMS')!=10) && (GetField('MainForm', 'CBKMS')>10)) {
    ares+='p22='+GetField('MainForm', 'CBKMS')+','+GetField('MainForm', 'vMFina0')+','+GetField('MainForm', 'vMFina1')+','+GetField('MainForm', 'vMFina2')+'|';
  }


 if (isVisible('idzRType')) ares+='p9='+GetField('MainForm', 'RTYPESR')+'|';
 if (isVisible('idzCommercial')) ares+='p10='+GetField('MainForm', 'IDCOMSR')+'|';
 if ((isVisible('idzSegment'))  && (GetField('MainForm', 'CBSegment')!='')) ares+='p14='+GetField('MainForm', 'CBSegment')+'|';
 if ((isVisible('idzEnergie'))  && (GetField('MainForm', 'CBEnergie')!='')) ares+='p23='+GetField('MainForm', 'CBEnergie')+'|';
 if ((isVisible('idzTypeVeh'))  && (GetField('MainForm', 'CBTypeVeh')!='')) ares+='p24='+GetField('MainForm', 'CBTypeVeh')+'|';
 if ((isVisible('idzSatisfVN'))  && (GetField('MainForm', 'CBSatisfVN')!='')) ares+='p27='+GetField('MainForm', 'CBSatisfVN')+'|';
 if ((isVisible('idzSatisfSAV'))  && (GetField('MainForm', 'CBSatisfSAV')!='')) ares+='p28='+GetField('MainForm', 'CBSatisfSAV')+'|';

 if ((isVisible('idzSFinancement')) && (GetField('MainForm', 'CBSituation')!='0')) ares+='p11='+GetField('MainForm', 'CBSituation')+'|';
 if ((isVisible('idzTFinancement')) && (GetField('MainForm', 'FINANCEMENT')!='0')) ares+='p12='+GetField('MainForm', 'FINANCEMENT')+'|';
 if ((isVisible('idzTSocFinAchat')) && (GetField('MainForm', 'SOCFINACHAT')!='0')) ares+='p25='+GetField('MainForm', 'SOCFINACHAT')+'|';
 if ((isVisible('idzTFiltreZ')) && (GetField('MainForm', 'FiltreZ')!='0')) ares+='p26='+GetField('MainForm', 'FiltreZ')+'|';

 if ((isVisible('idzFFinancement')) && (GetField('MainForm', 'CBStockCTM')!='0')) ares+='p13='+GetField('MainForm', 'CBStockCTM')+'|';
 if (isVisible('idzCARecap')) ares+='p29='+GetField('MainForm', 'CARECAPSR')+'|';
 if ((isVisible('idzCategorie'))  && (GetField('MainForm', 'CBCategorie')!='')) ares+='p30='+GetField('MainForm', 'CBCategorie')+'|';


 if (isVisible('idzOrder')) ares+='ord='+GetField('MainForm', 'ORDERSR')+'|';
 if (isVisible('idzDateBtn')) ares+='ddeb='+GetField('MainForm', 'DATEFieldDeb')+'|';
 if (isVisible('idzDateBtn')) ares+='dfin='+GetField('MainForm', 'DATEFieldFin')+'|';
SetField('MainForm', 'rptselect', ares);

// test si le document est de type "Requête" ou "Import" -> alors format XLS
 var rVal=GetField('MainForm', 'rptname');
 if(rVal.substring(7,18)=='Répartition') strFormat='CSV';
 if(rVal.substring(7,14)=='Requête') strFormat='XLS';
 if(rVal.substring(7,13)=='Import') strFormat='XLS';

// test si le document est de "Fichier CSV" ou Répartition -> alors format XLS
 var rValp8=GetField('MainForm', 'PPROFIDSR');
 if ((rValp8>=10) && (rValp8<=19) && ((isVisible('idzPProfid')) || (isVisible('idzPProfidAct')))) strFormat='CSV';
// if (((rValp8=40) || (rValp8=41)) && ((isVisible('idzPProfid')) || (isVisible('idzPProfidAct')))) strFormat='XLS';


SetField('MainForm', 'rptformat', strFormat);
SubmitForm('MainForm', 'TARGET', '_blank'); 
parent.ShowHide('SelPrint'); return false;
}
function trim(stringToTrim) {
  return stringToTrim.replace(/^\s+|\s+$/g,"");
}
]]>
					<![CDATA[// 
function GetValCheckbox(vCheck) {
  if (IsChecked(vCheck)) return 'Null|';
  return '';
}]]>
					<![CDATA[// 
// Visualiser la boîte liste des Situations Achats
// 
function ShowListSituation(vList) {
// chargement de la liste
  oList=getObjectById('CBSituation');
  if (oList == null) return false;
  clearCombo(oList);
  oList.options[oList.options.length] = new Option('Tous Véhicules', 0);
  oList.options[oList.options.length] = new Option('Affacturés', 1);
  oList.options[oList.options.length] = new Option('Aff->Financés', 2);
  oList.options[oList.options.length] = new Option('Financés', 3);
  if (vList=='F') oList.options[oList.options.length] = new Option('Payés', 4);

  oList.selectedIndex = 0;
}]]>
					<![CDATA[// 
// Visualiser la boîte liste des ordres d'affichage
// 
var tabVOrder;
var vOrder;
function ShowListOrder(aList) {
// chargement de la liste
  oList=getObjectById('CBORDER');
  if (oList == null)
     return false;
  clearCombo(oList);
  aList+=";eof;eof";
  tabVOrder = aList.split(';');
  ip = 0; 
  if (tabVOrder.length>2) {vOrder=tabVOrder[0]};
  for (var ii = 0; ii < tabVOrder.length; ii = ii + 2)
   {
   if ((tabVOrder[ii]!="eof" ) && (tabVOrder[ii+1]!="eof" ))
    {
        oList.options[oList.options.length] = new Option(tabVOrder[ii+1], tabVOrder[ii]);
        if (vDefOrder==tabVOrder[ii]) 
        {
         vOrder=vDefOrder;
         oList.selectedIndex = ip;
         };
        ip=ip+1;
   }
  };
  document.MainForm.ORDERSR.value=parseInt(vOrder);
  if (tabVOrder.length>3) {Show('idzOrder')} 
   else {Hide('idzOrder')};
}]]>
					<![CDATA[// 
// Effacer le contenu d'une boîte liste 
// 
function clearCombo(objList){
  if (objList == null)
     return false;

  for (var i = objList.options.length - 1; i >= 0; i--){
    objList.options[i] = null;
  }
  objList.selectedIndex = -1;
}]]>
					<![CDATA[// 
// Mettre à jour l'affichage en fonction de la sélection du rapport
// Quand paramètre supplémentaire : Attention à mettre à jour "bdVO.pas" 
// dans la partie SelReport_AfterXMLGram =>DReportList.SetValue('idAff', inttostr(cpt*9));
//
function ShowValue() {
 aVal=parseInt(GetField('MainForm', 'CBSelReport'));
 var repVal=trim(tabInfos[aVal]);

 SetField('MainForm', 'rptname', trim(tabInfos[aVal])); 
 ShowHideID(tabInfos[aVal+1]!=0, 'idzSite');
 ShowHideID( (tabInfos[aVal+1]!=0) && (tabInfos[aVal+8]<0) && (repVal.substring(0,1)=='V'), 'idzExpo');
 ShowHideID(tabInfos[aVal+2]==-1, 'idzDateInputDeb');
 ShowHideID(tabInfos[aVal+2]==-1, 'idzDateInputFin');
 ShowHideID(tabInfos[aVal+2]==-1, 'idzDateBtn');
 ShowHideID(  (repVal.substring(0,4)>='PF04') && (repVal.substring(0,4)<='PF07') , 'idzSegment');
 ShowHideID(  (repVal.substring(0,4)>='PF04') && (repVal.substring(0,4)<='PF07') , 'idzEnergie');
 ShowHideID(  (repVal.substring(0,4)>='PF04') && (repVal.substring(0,4)<='PF07') , 'idzTypeVeh');
 ShowHideID(  (repVal.substring(0,4)>='PF04') && (repVal.substring(0,4)<='PF07') , 'idzSatisfVN');
 ShowHideID(  (repVal.substring(0,4)>='PF04') && (repVal.substring(0,4)<='PF07') , 'idzSatisfSAV');
 ShowHideID(  (repVal.substring(0,2)=='CA') && (repVal.substring(0,3)<'CA5'), 'idzCARecap');
 ShowHideID(  (repVal.substring(0,2)=='CA') && (repVal.substring(0,3)<'CA5'), 'idzCategorie');

 ShowHideID((tabInfos[aVal+2]==-2) || (tabInfos[aVal+2]==-3), 'idzDateT1');
 ShowHideID((tabInfos[aVal+2]==-2) || (tabInfos[aVal+2]==-3), 'idzDateT2');
 ShowHideID((tabInfos[aVal+2]==-2), 'idzDateT3');
 ShowHideID((tabInfos[aVal+2]==-2), 'idzDateT4');
 ShowHideID(trim(tabInfos[aVal+3])=='V', 'idzVendeur');
 ShowHideID(trim(tabInfos[aVal+3])=='C', 'idzCommercial');
 ShowHideID((trim(tabInfos[aVal+3])=='D') || (trim(tabInfos[aVal+3])=='F')  || (trim(tabInfos[aVal+3])=='f') || (trim(tabInfos[aVal+3])=='T'), 'idzTFinancement');
 ShowHideID((trim(tabInfos[aVal+3])=='D') || (trim(tabInfos[aVal+3])=='F'), 'idzSFinancement');
 ShowHideID((trim(tabInfos[aVal+3])=='D') || (trim(tabInfos[aVal+3])=='F'), 'idzFFinancement');
 ShowHideID((trim(tabInfos[aVal+3])=='A'), 'idzTSocFinAchat');
 ShowHideID((trim(tabInfos[aVal+3])=='Z'), 'idzTFiltreZ');


 ShowHideID(tabInfos[aVal+4]!=0, 'idzMarque');
 ShowHideID(tabInfos[aVal+5]!=0, 'idzModele');
 ShowHideID( (repVal.substring(0,2)=='VN') && (tabInfos[aVal+6]!=0), 'idzStatutVN');
 ShowHideID( (repVal.substring(0,2)=='VD') && (tabInfos[aVal+6]!=0), 'idzStatutVD');
 ShowHideID(tabInfos[aVal+7]!=0, 'idzPeriode');
 ShowHideID( (repVal.substring(0,5)=='PF04 ') || (repVal.substring(0,5)=='VN20 ') || (repVal.substring(0,4)=='VN68') || (repVal.substring(0,4)=='VN84') || (repVal.substring(0,4)=='VO84')  || (repVal.substring(0,4)=='VO63') || (repVal.substring(0,4)=='VO63') , 'idzTypeVO');
 ShowHideID(tabInfos[aVal+8]==1, 'idzNbEx');
 
 ShowHideID((repVal.substring(0,2)!='PF') && (tabInfos[aVal+8]<=0) && (']]>
					<xsl:value-of select="/document/XMLC_Params/XMLC_Authenticated"/>
					<![CDATA[' != ' 0 ') , 'idzBtnXLS');
 ShowHideID((repVal.substring(0,4)=='PF01'), 'idzChoixIdent');
 ShowHideID(((repVal.substring(0,4)=='PF02') || (repVal.substring(0,4)=='PF03')) && (repVal.search('relance')!=-1), 'idzRType');
 ShowHideID((repVal.substring(0,4)>='PF02') && (repVal.substring(0,4)<='PF09') , 'idzPProfid');
 ShowHideID((repVal.substring(0,4)>='PF10') && (repVal.substring(0,4)<='PF19') , 'idzPProfidAct');
 ShowHideID(((repVal.substring(0,4)=='PF02')  || (repVal.substring(0,4)=='PF03')) && (repVal.search('relance')!=-1), 'idzDateJPlus');
 ShowHideID((repVal.substring(0,4)>='PF02') && (repVal.substring(0,4)<='PF09') , 'idzTypeIdent');
 ShowHideID((repVal.substring(0,4)>='PF02') && (repVal.substring(0,4)<='PF09') , 'idzCP');
 ShowHideID((repVal.substring(0,4)>='PF02') && (repVal.substring(0,4)<='PF09') , 'idzVille');
 ShowHideID((repVal.substring(0,4)>='PF02') && (repVal.substring(0,4)<='PF09') , 'idzMail');
 ShowHideID((repVal.substring(0,4)>='PF02') && (repVal.substring(0,4)<='PF09') , 'idzMobile');
 ShowHideID(((repVal.substring(0,4)=='PF08')) , 'idzImport');
 ShowHideID((repVal.substring(0,4)>='PF04') && (repVal.substring(0,4)<='PF09') , 'idzKMS');

 ShowListOrder(tabInfos[aVal+9]);
 ShowListSituation(trim(tabInfos[aVal+3]));
 objBtnValider=getObjectById('BtnValider');
 if (tabInfos[aVal+10]=='0') {objBtnValider.style.color = '#A0A0A0';} 
   else {objBtnValider.style.color = '#0000FF'};
 objBtnXLS=getObjectById('BtnXLS');
 if (tabInfos[aVal+10]=='0') {objBtnXLS.style.color = '#A0A0A0';} 
   else {objBtnXLS.style.color = '#0000FF'};
}]]>
					<![CDATA[// 
// Afficher/Masquer le contenu d'une zone à l'écran
// 
function ShowHideID(flgVisible, ID) {
	if (flgVisible) Show(ID); 
        else Hide(ID);
}]]>
					<![CDATA[// 
// Gestion des dates des mois suivant et précédent
// 
var adate;
var datedeb;
var datefin;

function prevMonth() {
 if (verifdate('MainForm', 'DATEFieldDeb')) {
  SetDate(-15);
  SetField('MainForm', 'DATEFieldDeb', vdateFormat(datedeb));
  SetField('MainForm', 'DATEFieldFin', vdateFormat(datefin));
 }
}

function nextMonth() {
 if (verifdate('MainForm', 'DATEFieldDeb')) {
  SetDate(+32);
  SetField('MainForm', 'DATEFieldDeb', vdateFormat(datedeb));
  SetField('MainForm', 'DATEFieldFin', vdateFormat(datefin));
 }
}

function prevDay() {
 var now = new Date();
 if (GetField('MainForm', 'DATEFieldDeb') != GetField('MainForm', 'DATEFieldFin')) {
  SetField('MainForm', 'DATEFieldDeb', vdateFormat(now));
  SetField('MainForm', 'DATEFieldFin', vdateFormat(now));
 }
 else {
   if (verifdate('MainForm', 'DATEFieldDeb')) {
    var xHeure = adate.getTime();
    var xVal = xHeure - 86400 * 1000; // 1 jour = 86400 secondes
    jPrev = new Date(); jPrev.setTime (xVal);
    SetField('MainForm', 'DATEFieldDeb', vdateFormat(jPrev));
    SetField('MainForm', 'DATEFieldFin', vdateFormat(jPrev));
   }
 }
}


function nextDay() {
 var now = new Date();
 if (GetField('MainForm', 'DATEFieldDeb') != GetField('MainForm', 'DATEFieldFin')) {
  SetField('MainForm', 'DATEFieldDeb', vdateFormat(now));
  SetField('MainForm', 'DATEFieldFin', vdateFormat(now));
 }
 else {
   if (verifdate('MainForm', 'DATEFieldDeb')) {
    var xHeure = adate.getTime();
    var xVal = xHeure + 86400 * 1000; // 1 jour = 86400 secondes
    jNext = new Date(); jNext.setTime (xVal);
    SetField('MainForm', 'DATEFieldDeb', vdateFormat(jNext));
    SetField('MainForm', 'DATEFieldFin', vdateFormat(jNext));
   }
 }
}

]]>
					<![CDATA[// 
// 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[function UpdateKMS(aVal) {
 ShowHideID((aVal==2), 'idzKMS2');
 ShowHideID((aVal!=2) && (aVal<10), 'idzKMS1');
 ShowHideID((aVal==12), 'idzMFina2');
 ShowHideID((aVal!=12) && (aVal>=10), 'idzMFina1');
}]]>
					<![CDATA[// 
// Calculer la date de début et de fin de mois 
// 
function SetDate(aVal)
{
 var monHeure = adate.getTime();
 var jourPlus1 = monHeure + 86400 * 1000 * aVal; // 1 jour = 86400 secondes
 datedeb = new Date(); datedeb.setTime (jourPlus1);
 while (datedeb.getDate() != 1) { jourPlus1 = jourPlus1-86400*1000; datedeb.setTime (jourPlus1); }

    jourPlus1 = jourPlus1+28*86400*1000; 
    datefin = new Date(); datefin.setTime (jourPlus1);
    while (datefin.getDate() != 1) { jourPlus1 = jourPlus1 +86400*1000; datefin.setTime (jourPlus1); };
    jourPlus1 = jourPlus1 -86400*1000; datefin.setTime (jourPlus1); 
}
]]>
					<![CDATA[function selfocused(selobj){
var slist = ';'+selobj[0].text+';';
var ii;
for (ii=1; ii < selobj.length; ii++) 
  {
  if (slist == ';'+selobj[ii].innerHTML+';') 
    {
	  slist = ';'+selobj[ii].value+';' ;
    }
  }
for (ii=1; ii < selobj.length; ii++) 
  {
	selobj[ii].selected = (slist.indexOf(';'+selobj[ii].value+';') !=-1);
  }
selobj.setAttribute('tag', slist.substring(1,slist.length-1));
selobj.remove(0);
selobj.size = '10';
}]]>
					<![CDATA[function selblured(selobj){
var ii; var sresult;
selobj.options[selobj.options.length] = new Option('void', '');
for (ii=selobj.length-1; ii > 0; ii--) 
  {
  selobj[ii].value = selobj[ii-1].value;
  selobj[ii].innerHTML = selobj[ii-1].innerHTML;
  }
selobj[0].setAttribute('value', 'data-tag');
sresult = selobj.getAttribute('tag');
if (sresult == 'all')
  {
  sresult = selobj[0].innerHTML;
  }
if (sresult.indexOf(';') == -1)
  {
  for (ii=selobj.length-1; ii > 0; ii--) 
    {
    if (selobj[ii].value == sresult)
      {
      sresult = selobj[ii].innerHTML;
      }
    }
  }
selobj[0].text = sresult;
selobj.selectedIndex = "0";
selobj.size = '1';
}]]>
					<![CDATA[function selchanged(selobj, destfield){
var slisttag = ';'+selobj.getAttribute("tag")+';';
var slist = ''; var ii; var flagsel;
for (ii=0; ii < selobj.length; ii++) 
  {
    flagsel = selobj[ii].selected;
    if (slisttag.indexOf(';'+selobj[ii].value+';') !=-1)
    {
       flagsel = ! flagsel;
    }
    if ((slisttag==';all;') && (ii==0))
    {
       flagsel = false;
    }
    if ((slist=='all') && (ii!=selobj.selectedindex))
    {
       flagsel = false;
    }
    
	if (flagsel)  
	{
    	if (slist != '') slist = slist + ';' ;
    	slist = slist + selobj[ii].value;
	}
    if (selobj[ii].selected != flagsel)
    {
    	selobj[ii].selected = flagsel;
    }
  }
selobj.setAttribute("tag", slist);
    if (slist=='all') 
    {
      slist = '';
    }
document.MainForm.STATUTSR.value = slist;
}]]>
					<![CDATA[// 
// retourner le format d'une date "dd/mm/yyyy"
// 
function vdateFormat(vdate)
{
dy = vdate.getFullYear();
dm = vdate.getMonth() + 1;
dd = vdate.getDate();
if ( dy < 100 ) dy = dy + 1900; 	
ys = new String(dy);
ms = new String(dm);
ds = new String(dd);
if ( ms.length == 1 ) ms = "0" + ms;
if ( ds.length == 1 ) ds = "0" + ds;
vres = ds + "/" + ms + "/" + ys;
    return vres;
}]]>// 
// 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;
    }
  }
}<![CDATA[
window.onload=ShowListReport;]]>
				</script>
			</xsl:with-param>
		</xsl:call-template>
	</xsl:template>
</xsl:stylesheet>
