<?xml version="1.0"?>
<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="DisplayToolbar">1</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="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="Head">
				<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>
				<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';
      }
   }
   function wReload(hRef) {
      parent.document.location = hRef;
   }
]]>
				</script>
				<script language="javascript">
					<![CDATA[function SetSelAnn(cmd, idtvo, status) {
  if (cmd=='001') {
    vid1 = document.getElementById('c001'+idtvo); 
    if (vid1.src.search('voWeb.gif')!=-1)  {vid1.src = XMLC_PictosPath + 'voWebNO.gif'} else {vid1.src = XMLC_PictosPath + 'voWeb.gif'} ; 
//    vid2 = document.getElementById('c002'+idtvo); 
    if (vid1.src.search('voWeb.gif')!=-1)
      {getObjectById('frUpdate1').src = XMLC_BaseHRef+'DeleteExclusion?idVehicle='+ idtvo +'&aValue=1'}
    else
      {getObjectById('frUpdate1').src = XMLC_BaseHRef+'InsertExclusion?idVehicle='+ idtvo +'&aValue=1'}
    document.getElementById('c001'+idtvo).title = ''; 
    }
  if (cmd=='002') {
//    vid1 = document.getElementById('c001'+idtvo); 
    vid2 = document.getElementById('c002'+idtvo); 
    if (vid2.src.search('voWeb.gif')!=-1) {vid2.src = XMLC_PictosPath + 'voWebNO.gif'} else {vid2.src = XMLC_PictosPath + 'voWeb.gif'} ; 
    if (vid2.src.search('voWeb.gif')!=-1)
      {getObjectById('frUpdate2').src = XMLC_BaseHRef+'DeleteExclusion?idVehicle='+ idtvo +'&aValue=2'}
    else
      {getObjectById('frUpdate2').src = XMLC_BaseHRef+'InsertExclusion?idVehicle='+ idtvo +'&aValue=2'}
    document.getElementById('c002'+idtvo).title = ''; 
    }
}]]>
				</script>
				<script language="javascript">
					<![CDATA[// ==========================================================================
// Afficher la fenêtre popup pour la saisie des infos VN
// ==========================================================================
function lPopFormAxVO(PopID, idVO, typeVO) {
  args='0';
  evt = event;
 if (evt.shiftKey)
    args='1';
  if (popObj = getObjectById(PopID)) {
      popObj.src = XMLC_BaseHRef+'FormAxVO?TypeVO='+typeVO+'&idTVO='+idVO+'&idVersion='+args;
  }
}]]>
					<![CDATA[// ==========================================================================
// Afficher la fenêtre popup pour la saisie des infos Liste des Commerciaux
// ==========================================================================
function lPopForm(PopID, idAnnonceur, idGroup, sRubric) {
var posScroll =f_scrollTop();
   vidPaneID = document.getElementById('vdiv'+PopID); 
   vidPaneID.style.top=posScroll +15;
   vidPaneID.style.left='145px';                    
//   vidPaneID.style.align = 'center';
  ShowHideForm(vidPaneID);
//      ShowHide(vidPaneID, 'WIDTH', 435, 'HEIGHT', 365); 

  if (popObj = getObjectById(PopID)) {
      popObj.style.top = 18; //posScroll +15;
      popObj.style.left = 0; //55;
      popObj.style.width = 430;
      popObj.style.height = 255;
  var rdm=Math.floor(Math.random()*100000);
      popObj.src = XMLC_BaseHRef+'FormAnnonceurs?idAnnonceur='+ idAnnonceur +'&SelGroup=' + idGroup +'&SelRubric=' + sRubric +'&randNumber='+rdm;;
  }
}]]>
				</script>
				<script language="javascript">
					<![CDATA[var apLastValue='x';
function VOapShowHide_dark(ID) {
  if (apLastValue!='') apShowHide_dark(ID); 
  apLastValue='x';
}
function VOapShowHide(ID) {
  if (apLastValue!='') apShowHide(ID); 
  apLastValue='x';
}
function VOShowHideActionMenu() {
  ShowHideActionMenu(); 
  goSubmit();
}]]>
				</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[// Valider les paramètres d'appel et lancement Service
// 
function goService(nService) {
  if (nService != '') {
     if ((nService.search('http://www')==-1) && (nService.search('/projHistoBin')==-1)) nService=XMLC_BaseHRef+nService ;
     if (nService.search('/projHistoBin')>-1) nService='http://'+XMLC_Host+nService ;
     document.location =  nService ;}
  return false;
}

function goSubmit() {
  SetField('MainForm', 'AmMode',  (getObjectById('xslcActionMenu').style.display == 'none') ? '0' : '1');
  document.MainForm.submit(); 
  return false;
}]]>
				</script>
				<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;
}]]>
					<![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));
 }
}]]>
					<![CDATA[// 
// Vérification d'une date
// 
function verifdate(FormID, FieldName) {
    var datetest = GetField(FormID, FieldName);
    var format = /^(\d{1,2}\/){2}\d{4}$/;
    if(!format.test(datetest)){ return false;}
    else{
        var date_temp = datetest.split('/');
        date_temp[1] -=1;        // On rectifie le mois car de 0 à 11 !!!
        adate = new Date();
        adate.setFullYear(date_temp[2]);
        adate.setMonth(date_temp[1]);
        adate.setDate(date_temp[0]);
        return true;
    }
}]]>
					<![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[// 
// 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, yOffset) {
  if (Pop = getObjectById(PopID)) {
    if (obj = getObjectById(FieldName)) {
      ShowHide(PopID, 'WIDTH', 180, 'HEIGHT', 130); 
      aPos=GetObjectPosY(FieldName)+yOffset;
      if (Pop.style.top != aPos) {
        Pop.style.top = aPos;
      }
      CalendarURL = XMLC_BaseHRef+'XMLC_PopupCalendar?XMLC_FieldName='+FieldName;
      CalendarURL += '&amp;XMLC_DateValue=' + obj.value;
      CalendarURL += '&amp;XMLC_PopID=' + PopID;
      Pop.src = CalendarURL;
    }
  }
}</script>
			</xsl:with-param>
			<xsl:with-param name="ActionMenu">
				<xsl:if test="/document/XMLC_Params/XMLC_UserName != '' ">
					<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">FiltAffichage</xsl:with-param>
						<xsl:with-param name="Title">Paramètres</xsl:with-param>
						<xsl:with-param name="Content">
							<table cellpadding="2" cellspacing="0">
								<xsl:for-each select="/document/ListFiltersS/ListFilters">
									<xsl:variable name="apOver">
										<xsl:if test="idAffichage='-1' or nService=''">apRowNoSelected</xsl:if>
										<xsl:if test="idAffichage!='-1'">apRowSelected</xsl:if>
									</xsl:variable>
									<xsl:variable name="apAttr">
										<xsl:if test="idAffichage='-1' or nService=''">color:#A0A0A0;</xsl:if>
										<xsl:if test="/document/XMLC_Params/XMLC_Action=nService">
											<xsl:if test="AttrColor!=''">color:#<xsl:value-of select="AttrColor"/>; font-weight: bold;</xsl:if>
											<xsl:if test="AttrColor=''">color:#3f3dfd; </xsl:if>
										</xsl:if>
										<xsl:if test="idAffichage!='-1' and /document/XMLC_Params/XMLC_Action!=nService and nService!=''">
											<xsl:if test="AttrColor=''">color:#145aa2; </xsl:if>
											<xsl:if test="AttrColor!=''">color:#<xsl:value-of select="AttrColor"/>; </xsl:if>
										</xsl:if>
									</xsl:variable>
									<xsl:variable name="nServ">
										<xsl:value-of select="nService"/>
									</xsl:variable>
									<xsl:if test="idAffichage!='-2'">
										<tr>
											<td class="apLink" onmouseover="oldClass=this.className; this.className='{$apOver}';" onmouseout="this.className=oldClass;" onclick="javascript: goService('{$nServ}'); return false;" align="left" style="{$apAttr} width:200px;">
												<span style="color:#d0d0ff;">
													<xsl:if test="AttrIndent='1'">» </xsl:if>
													<xsl:if test="AttrIndent='2'">»» </xsl:if>
													<xsl:if test="AttrIndent='3'">»»» </xsl:if>
												</span>
												<xsl:if test="/document/XMLC_Params/XMLC_Action=nService">
													<img border="0" src="{$XMLC_PictosPath}ico_run.gif"/> - </xsl:if>
												<xsl:value-of select="FilterName"/>
											</td>
										</tr>
									</xsl:if>
								</xsl:for-each>
							</table>
						</xsl:with-param>
					</xsl:call-template>
				</xsl:if>
			</xsl:with-param>
			<xsl:with-param name="Title">Paramétrage de la diffusion des annonces <xsl:if test="/document/SelInfoAnnS/SelInfoAnn/idAnnonceur=1"> vers LA CENTRALE</xsl:if>
				<xsl:if test="/document/SelInfoAnnS/SelInfoAnn/idAnnonceur=2"> vers LE BON COIN</xsl:if>
				<xsl:for-each select="/document/SelInfoAnnS/SelInfoAnn">
					<xsl:if test="position() = 1"> pour</xsl:if>
					<xsl:if test="position() != 1">,</xsl:if>&#xA0;<xsl:value-of select="LienVille"/>
					<xsl:if test="position() = last()">
						<xsl:if test="TypeVO=1"> [VO]</xsl:if>
						<xsl:if test="TypeVO=2"> [VD]</xsl:if>
					</xsl:if>
				</xsl:for-each>
			</xsl:with-param>
			<xsl:with-param name="ToolbarButtonsLeft">
				<ToolbarButton>
					<xsl:call-template name="ToolButtonRefresh">
						<xsl:with-param name="URL">
							<xsl:value-of select="/document/Aliases/bdVODLL"/>OptSelAnnonces</xsl:with-param>
					</xsl:call-template>
				</ToolbarButton>
				<ToolbarButton>
					<img border="0" src="{$XMLC_SkinPath}toolbar_separator.gif"/>
				</ToolbarButton>
				<xsl:call-template name="CommonToolbarButtonsLeft"/>
			</xsl:with-param>
			<xsl:with-param name="ToolbarButtonsRight">
				<xsl:call-template name="VOLineToolbarButtonsRight"/>
			</xsl:with-param>
			<xsl:with-param name="Body">
				<xsl:variable name="URL_Reload">
					<xsl:value-of select="/document/Aliases/bdVODLL"/>OptSelAnnonces</xsl:variable>
				<script language="javascript">
					<![CDATA[
var questionDeleteSite = "Etes vous sûr de vouloir supprimer ce site?\nCliquez OK pour confirmer.";
]]>
				</script>
				<iframe border="0" frameborder="1" marginheight="0" marginwidth="0" height="300 px" width="100%" id="frUpdate1" scrolling="no" src="{$XMLC_Portal}blank.htm" style="position: relative; display: none; z-index:1000;"/>
				<iframe border="0" frameborder="1" marginheight="0" marginwidth="0" height="300 px" width="100%" id="frUpdate2" scrolling="no" src="{$XMLC_Portal}blank.htm" style="position: relative; display: none; z-index:1000;"/>
				<xsl:call-template name="xslc:ApplicationMessages"/>
				<xsl:call-template name="VOZoneTab">
					<xsl:with-param name="nService">OptParams</xsl:with-param>
				</xsl:call-template>
				<xsl:apply-templates select="SelAnnoncesS"/>
				<xsl:call-template name="xslc:PoweredBy"/>
			</xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template match="SelAnnoncesS">
		<xsl:param name="RecordCount" select="@RowCount"/>
		<xsl:variable name="vOrd" select="/document/OutParams/ORDERFIELD"/>
		<xsl:variable name="vidLink" select="/document/OutParams/idLink"/>
		<div id="bulle" nowrap="nowrap" style="width: 2px; height: 30px;" class="infobulle"/>
		<div id="zoneTOP">
			<p style="font-size:16px">Paramétrage de la diffusion des annonces <xsl:if test="/document/SelInfoAnnS/SelInfoAnn/idAnnonceur=1"> vers LA CENTRALE</xsl:if>
				<xsl:if test="/document/SelInfoAnnS/SelInfoAnn/idAnnonceur=2"> vers LE BON COIN</xsl:if>
				<xsl:for-each select="/document/SelInfoAnnS/SelInfoAnn">
					<xsl:if test="position() = 1"> pour</xsl:if>
					<xsl:if test="position() != 1">,</xsl:if>&#xA0;<xsl:value-of select="LienVille"/>
					<xsl:if test="position() = last()">
						<xsl:if test="TypeVO=1"> [VO]</xsl:if>
						<xsl:if test="TypeVO=2"> [VD]</xsl:if>
					</xsl:if>
				</xsl:for-each>
			</p>
		</div>
		<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 VN<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>
		<table width="100%"/>
		<form name="MainForm" method="POST" action="{/document/Aliases/bdVODLL}OptSelAnnonces">
			<input type="hidden" name="SelAnnonces_STARTINGROW" value="{@StartingRow}"/>
			<input type="hidden" name="AmMode" value="{/document/OutParams/AmMode}"/>
			<input type="hidden" name="idLink" value="{/document/OutParams/idLink}"/>
			<input type="hidden" name="NBROWSA" value="{/document/OutParams/NBROWS}"/>
			<input type="hidden" name="ORDERFIELDA" value="{/document/OutParams/ORDERFIELD}"/>
		</form>
		<table border="0" width="100%">
			<tr>
				<td width="45px" align="right">Ordre : </td>
				<td width="145px">
					<select id="CBORDERFIELD" style="width:110px" onchange="javascript: document.MainForm.ORDERFIELDA.value=getObjectById('CBORDERFIELD').value; goSubmit(); return false;">
						<option value="NVeh">Numéro de Véhicule</option>
						<option value="MMod">
							<xsl:if test="/document/OutParams/ORDERFIELD='MMod'">
								<xsl:attribute name="selected"/>
							</xsl:if>Marque-Modèle</option>
						<option value="PVen">
							<xsl:if test="/document/OutParams/ORDERFIELD='PVen'">
								<xsl:attribute name="selected"/>
							</xsl:if>Prix Vente</option>
						<option value="KMS">
							<xsl:if test="/document/OutParams/ORDERFIELD='KMS'">
								<xsl:attribute name="selected"/>
							</xsl:if>Kilométrage</option>
						<option value="DEnt">
							<xsl:if test="/document/OutParams/ORDERFIELD='DEnt'">
								<xsl:attribute name="selected"/>
							</xsl:if>Date d'entrée</option>
						<option value="MEC">
							<xsl:if test="/document/OutParams/ORDERFIELD='MEC'">
								<xsl:attribute name="selected"/>
							</xsl:if>MEC</option>
						<option value="Imma">
							<xsl:if test="/document/OutParams/ORDERFIELD='Imma'">
								<xsl:attribute name="selected"/>
							</xsl:if>Immatriculation</option>
						<option value="nCha">
							<xsl:if test="/document/OutParams/ORDERFIELD='nCha'">
								<xsl:attribute name="selected"/>
							</xsl:if>Numéro de châssis</option>
					</select> - <a href="{/document/Aliases/bdVODLL}OptSelAnnonces?SETORDERFIELD={$vOrd}">
						<xsl:if test="/document/OutParams/ORDERSENSE=''">
							<img border="0" src="{$XMLC_PictosPath}ico_stepdouble_top.gif"/>
						</xsl:if>
						<xsl:if test="/document/OutParams/ORDERSENSE!=''">
							<img border="0" src="{$XMLC_PictosPath}ico_stepdouble_bottom.gif"/>
						</xsl:if>
					</a>
				</td>
				<td width="250px">VN/page : <input class="clFlatTextInput" id="NBROWS" size="4" onkeyup="javascript: document.MainForm.NBROWSA.value=getObjectById('NBROWS').value; onKeyTestCR(event); return false;" value="{/document/OutParams/NBROWS}" style="text-align: right"/>, (<xsl:value-of select="$RecordCount"/> Véhicules sélectionnés). </td>
				<xsl:if test="/document/OutParams/idLink=1479422">
					<td width="150px">
						<xsl:call-template name="xslc:Button">
							<xsl:with-param name="HRef">InsertAllExclusion?aTypeVO=1&amp;aExclusion=1&amp;idLink=<xsl:value-of select="$vidLink"/>
							</xsl:with-param>
							<xsl:with-param name="Caption">
								<img border="0" src="{$XMLC_PictosPath}voWebNO.gif"/>
								<span>
									<b> - Tout Exclure</b>
								</span>
							</xsl:with-param>
						</xsl:call-template>
					</td>
					<td width="150px">
						<xsl:call-template name="xslc:Button">
							<xsl:with-param name="HRef">DeleteAllExclusion?aTypeVO=1&amp;aExclusion=1&amp;idLink=<xsl:value-of select="$vidLink"/>
							</xsl:with-param>
							<xsl:with-param name="Caption">
								<img border="0" src="{$XMLC_PictosPath}voWeb.gif"/>
								<span>
									<b> - Tout Inclure</b>
								</span>
							</xsl:with-param>
						</xsl:call-template>
					</td>
				</xsl:if>
				<xsl:if test="/document/OutParams/idLink=1479423">
					<td width="150px">
						<xsl:call-template name="xslc:Button">
							<xsl:with-param name="HRef">InsertAllExclusion?aTypeVO=2&amp;aExclusion=1&amp;idLink=<xsl:value-of select="$vidLink"/>
							</xsl:with-param>
							<xsl:with-param name="Caption">
								<img border="0" src="{$XMLC_PictosPath}voWebNO.gif"/>
								<span>
									<b> - Tout Exclure</b>
								</span>
							</xsl:with-param>
						</xsl:call-template>
					</td>
					<td width="150px">
						<xsl:call-template name="xslc:Button">
							<xsl:with-param name="HRef">DeleteAllExclusion?aTypeVO=2&amp;aExclusion=1&amp;idLink=<xsl:value-of select="$vidLink"/>
							</xsl:with-param>
							<xsl:with-param name="Caption">
								<img border="0" src="{$XMLC_PictosPath}voWeb.gif"/>
								<span>
									<b> - Tout Inclure</b>
								</span>
							</xsl:with-param>
						</xsl:call-template>
					</td>
				</xsl:if>
				<td>
				</td>
			</tr>
		</table>
		<table>
			<tr class="clRowHeader">
				<xsl:if test="/document/XMLC_Profile/XMLC_DisplayHeaderGradient = '1'">
					<xsl:attribute name="style">background-image: url('<xsl:value-of select="$XMLC_SkinPath"/>rowHeader_Gradient.gif');</xsl:attribute>
				</xsl:if>
				<td/>
				<td width="130px">
					<a href="{/document/Aliases/bdVODLL}OptSelAnnonces?SETORDERFIELD=NVO">N°Veh<xsl:if test="/document/OutParams/ORDERFIELD='NVO'">
							<xsl:if test="/document/OutParams/ORDERSENSE=''">
								<img border="0" src="{$XMLC_PictosPath}ico_stepdouble_top.gif"/>
							</xsl:if>
							<xsl:if test="/document/OutParams/ORDERSENSE!=''">
								<img border="0" src="{$XMLC_PictosPath}ico_stepdouble_bottom.gif"/>
							</xsl:if>
						</xsl:if>
					</a>
				</td>
				<td width="320px">
					<a href="{/document/Aliases/bdVODLL}OptSelAnnonces?SETORDERFIELD=MMod">Véhicule <xsl:if test="/document/OutParams/ORDERFIELD='MMod'">
							<xsl:if test="/document/OutParams/ORDERSENSE=''">
								<img border="0" src="{$XMLC_PictosPath}ico_stepdouble_top.gif"/>
							</xsl:if>
							<xsl:if test="/document/OutParams/ORDERSENSE!=''">
								<img border="0" src="{$XMLC_PictosPath}ico_stepdouble_bottom.gif"/>
							</xsl:if>
						</xsl:if>
					</a>
				</td>
				<td width="110px">Couleur</td>
				<td width="110px">Puiss. &amp; <a href="{/document/Aliases/bdVODLL}OptSelAnnonces?SETORDERFIELD=KMS">KMS <xsl:if test="/document/OutParams/ORDERFIELD='KMS'">
							<xsl:if test="/document/OutParams/ORDERSENSE=''">
								<img border="0" src="{$XMLC_PictosPath}ico_stepdouble_top.gif"/>
							</xsl:if>
							<xsl:if test="/document/OutParams/ORDERSENSE!=''">
								<img border="0" src="{$XMLC_PictosPath}ico_stepdouble_bottom.gif"/>
							</xsl:if>
						</xsl:if>
					</a>
				</td>
				<td width="70px">MEC</td>
				<td align="center" width="70px">
					<a href="{/document/Aliases/bdVODLL}OptSelAnnonces?SETORDERFIELD=Imma">Immat.<xsl:if test="/document/OutParams/ORDERFIELD='Imma'">
							<xsl:if test="/document/OutParams/ORDERSENSE=''">
								<img border="0" src="{$XMLC_PictosPath}ico_stepdouble_top.gif"/>
							</xsl:if>
							<xsl:if test="/document/OutParams/ORDERSENSE!=''">
								<img border="0" src="{$XMLC_PictosPath}ico_stepdouble_bottom.gif"/>
							</xsl:if>
						</xsl:if>
					</a>
				</td>
				<td align="center" width="140px">
					<a href="{/document/Aliases/bdVODLL}OptSelAnnonces?SETORDERFIELD=nCha">N° Châssis<xsl:if test="/document/OutParams/ORDERFIELD='nCha'">
							<xsl:if test="/document/OutParams/ORDERSENSE=''">
								<img border="0" src="{$XMLC_PictosPath}ico_stepdouble_top.gif"/>
							</xsl:if>
							<xsl:if test="/document/OutParams/ORDERSENSE!=''">
								<img border="0" src="{$XMLC_PictosPath}ico_stepdouble_bottom.gif"/>
							</xsl:if>
						</xsl:if>
					</a>
				</td>
				<td nowrap="nowrap" align="center" width="55px">
					<a href="{/document/Aliases/bdVODLL}OptSelAnnonces?SETORDERFIELD=PVen">Prix <xsl:if test="/document/OutParams/ORDERFIELD='PVen'">
							<xsl:if test="/document/OutParams/ORDERSENSE=''">
								<img border="0" src="{$XMLC_PictosPath}ico_stepdouble_top.gif"/>
							</xsl:if>
							<xsl:if test="/document/OutParams/ORDERSENSE!=''">
								<img border="0" src="{$XMLC_PictosPath}ico_stepdouble_bottom.gif"/>
							</xsl:if>
						</xsl:if>
					</a>
				</td>&#13;&#10;</tr>
			<xsl:apply-templates select="SelAnnonces"/>
			<xsl:call-template name="xslc:ListFooter">
				<xsl:with-param name="colspan">22</xsl:with-param>
				<xsl:with-param name="URLParams">&amp;NBROWSA=<xsl:value-of select="/document/OutParams/NBROWS"/>&amp;ORDERFIELDA=<xsl:value-of select="/document/OutParams/ORDERFIELD"/>
				</xsl:with-param>
				<xsl:with-param name="MaxPages">30</xsl:with-param>
			</xsl:call-template>
		</table>
	</xsl:template>
	<xsl:template match="SelAnnonces">
		<xsl:variable name="clValue">
			<xsl:choose>
				<xsl:when test="(position() mod 2)=0">clDataGridDark</xsl:when>
				<xsl:otherwise>clDataGridLight</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:variable name="sRowSelect">wapRowSelected</xsl:variable>
		<xsl:variable name="vConcession" select="Concession"/>
		<xsl:variable name="vOwner" select="idOwner"/>
		<xsl:variable name="uSite">;<xsl:value-of select="/document/XMLC_Params/UserSite"/>;</xsl:variable>
		<xsl:variable name="vSite">;<xsl:value-of select="Site"/>;</xsl:variable>
		<xsl:variable name="vSiteExpo">;<xsl:value-of select="SiteExpo"/>;</xsl:variable>
		<xsl:variable name="vTagSite">
			<xsl:choose>
				<xsl:when test="contains($uSite,$vSite) = true()">1</xsl:when>
				<xsl:otherwise>
					<xsl:choose>
						<xsl:when test="(contains($uSite,$vSiteExpo) = true()) and ($vSiteExpo != ';;')">1</xsl:when>
						<xsl:otherwise>0</xsl:otherwise>
					</xsl:choose>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:variable name="vVen" select="nVen"/>
		<xsl:variable name="tAuthLink">
			<xsl:choose>
				<xsl:when test="/document/XMLC_Params/XMLC_Authenticated != '0' and (/document/XMLC_Params/XMLC_Administrator = '1' or /document/XMLC_Params/XMLC_Supervisor = '1' )">1</xsl:when>
				<xsl:otherwise>0</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:variable name="tAuth1">
			<xsl:choose>
				<xsl:when test="/document/XMLC_Params/UserConcession = $vConcession">
					<xsl:choose>
						<xsl:when test="$vTagSite=1">1</xsl:when>
						<xsl:otherwise>
							<xsl:choose>
								<xsl:when test="/document/XMLC_Params/UserSite = '#'">1</xsl:when>
								<xsl:otherwise>
									<xsl:choose>
										<xsl:when test="/document/XMLC_Params/XMLC_Supervisor = '1'">1</xsl:when>
										<xsl:otherwise>0</xsl:otherwise>
									</xsl:choose>
								</xsl:otherwise>
							</xsl:choose>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:when>
				<xsl:otherwise>0</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:variable name="tAuth2">
			<xsl:choose>
				<xsl:when test="/document/XMLC_Params/XMLC_UserID = $vOwner">1</xsl:when>
				<xsl:otherwise>0</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:variable name="tAuth">
			<xsl:choose>
				<xsl:when test="/document/XMLC_Params/XMLC_Authenticated != '0' ">
					<xsl:choose>
						<xsl:when test="$tAuth1='1'">1</xsl:when>
						<xsl:otherwise>
							<xsl:choose>
								<xsl:when test="$tAuth2='1'">1</xsl:when>
								<xsl:otherwise>0</xsl:otherwise>
							</xsl:choose>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:when>
				<xsl:otherwise>0</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:variable name="vidTVO" select="idTVO"/>
		<xsl:variable name="vDAnn" select="DAnn"/>
		<xsl:variable name="clValueMsg">
			<xsl:choose>
				<xsl:when test="position() mod 2 = 0">background: #f8f8f8; </xsl:when>
				<xsl:otherwise>background: #ffffff; </xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:variable name="stValue">
			<xsl:choose>
				<xsl:when test="(nVen = /document/SelVendeurS/SelVendeur/AbbrVendeur) and (nVen !='')"> font-style:italic; color:blue</xsl:when>
				<xsl:otherwise>
					<xsl:choose>
						<xsl:when test="($vDAnn != '')"> font-style:italic; font-weight:bold; color:red</xsl:when>
					</xsl:choose>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:variable name="stChassis">
			<xsl:choose>
				<xsl:when test="txtCha=''">border:none;</xsl:when>
				<xsl:otherwise>border:none; color : red;</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:variable name="vTypeVO" select="TypeVO"/>
		<xsl:variable name="vStatutVD">
			<xsl:value-of select="StatutVD"/>
			<xsl:if test="(Uti != '') and (StatutVD!='')"> - <xsl:value-of select="Uti"/>
			</xsl:if>
		</xsl:variable>
		<xsl:variable name="sInfoVO">
			<xsl:choose>
				<xsl:when test="($vTypeVO = '3') or (($vTypeVO = '2') and ($vStatutVD != '') and (StatutVD != 'VN'))">VD</xsl:when>
				<xsl:otherwise>
					<xsl:choose>
						<xsl:when test="($vTypeVO = '2')">VN</xsl:when>
						<xsl:otherwise>VO</xsl:otherwise>
					</xsl:choose>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:variable name="sTypeVO">
			<xsl:value-of select="$sInfoVO"/> N°: <xsl:value-of select="NVO"/>
		</xsl:variable>
		<xsl:variable name="sTypeVOG">
			<xsl:value-of select="$sInfoVO"/>
			<xsl:value-of select="NVO"/>
		</xsl:variable>
		<xsl:variable name="vDOrd" select="DOrd"/>
		<xsl:variable name="sImageTextBlock">
			<xsl:choose>
				<xsl:when test="($sInfoVO = 'VD') and ($vStatutVD != 'VN')">imageTextBlockVD</xsl:when>
				<xsl:otherwise>imageTextBlock</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:variable name="vInfo">
			<xsl:value-of select="iMar"/> - <xsl:if test="(aVer != '')">
				<xsl:value-of select="aVer"/>
			</xsl:if>
			<xsl:if test="(aVer = '')">
				<xsl:value-of select="aMod"/> - <xsl:value-of select="aTVer"/>
			</xsl:if>
		</xsl:variable>
		<xsl:variable name="stAttrib">
			<xsl:if test="(txtAtt != '')">
				<xsl:value-of select="txtAtt"/>
			</xsl:if>
		</xsl:variable>
		<xsl:variable name="stAttribFin">
			<xsl:if test="(iAff = '') and (tFin = 'VWB')"> font-style:italic; font-weight:bold; color:red</xsl:if>
		</xsl:variable>
		<xsl:variable name="lcase">abcdefghijklmnopqrstuvwxyz</xsl:variable>
		<xsl:variable name="ucase">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable>
		<xsl:variable name="voIcoGif">
			<xsl:if test="(vDes != '')">
				<xsl:value-of select="$XMLC_PictosPath"/>
				<xsl:choose>
					<xsl:when test="(vDes = 'GROUPE')">vnGroup</xsl:when>
					<xsl:otherwise>
						<xsl:choose>
							<xsl:when test="(vDes = 'MUTATION')">vnMuta</xsl:when>
							<xsl:otherwise>
								<xsl:choose>
									<xsl:when test="(vDes = 'RÉTROCESSION')">vnRetro</xsl:when>
									<xsl:otherwise>voOther</xsl:otherwise>
								</xsl:choose>
							</xsl:otherwise>
						</xsl:choose>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:if>.gif</xsl:variable>
		<xsl:variable name="voIcoRun">
			<xsl:value-of select="$XMLC_PictosPath"/>voRun<xsl:if test="idc='0'">HL</xsl:if>.gif</xsl:variable>
		<xsl:variable name="vtxtStatutVN">
			<xsl:if test="StatutVN!=''">
				<xsl:if test="vImp=''">-</xsl:if>
				<xsl:if test="vImp!='' and idOwner!='1'">+</xsl:if>
				<xsl:value-of select="StatutVN"/>
				<xsl:if test="vImp=''">-</xsl:if>
				<xsl:if test="vImp!='' and idOwner!='1'">+</xsl:if>
			</xsl:if>
		</xsl:variable>
		<xsl:variable name="vtxtJS">
			<xsl:value-of select="txtJS"/>
		</xsl:variable>
		<xsl:variable name="vtxtExclu">
			<xsl:value-of select="txtExclu"/>
		</xsl:variable>
		<xsl:variable name="vPath">
			<xsl:choose>
				<xsl:when test="(/document/XMLC_Params/XMLC_Host != '-ll3')">http://176.31.238.144/BdVOImages/</xsl:when>
				<xsl:otherwise>http://ll3/bdVOImages/</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<tr class="{$clValue}" onmouseover="oldClass=this.className; this.className='{$sRowSelect}';" onmouseout="this.className=oldClass;">
			<td>
				<xsl:if test="/document/SelInfoAnnS/SelInfoAnn/idAnnonceur=1">
					<xsl:if test="not(Exclu001!= '')">
						<a href="#" onclick="javascript: SetSelAnn('001', {$vidTVO},'off'); return false;">
							<img title="Ce véhicule sera diffusé vers LA CENTRALE" id="c001{$vidTVO}" border="0" src="{$XMLC_PictosPath}voWeb.gif"/>
						</a>
					</xsl:if>
					<xsl:if test="(Exclu001!='')">
						<a href="#" onclick="javascript: SetSelAnn('001', {$vidTVO},'on'); return false;">
							<img title="ce véhicule est exclu de la diffusion vers LA CENTRALE" id="c001{$vidTVO}" border="0" src="{$XMLC_PictosPath}voWebNO.gif"/>
						</a>
					</xsl:if>
				</xsl:if>
				<xsl:if test="/document/SelInfoAnnS/SelInfoAnn/idAnnonceur=2">
					<xsl:if test="not(Exclu002!= '')">
						<a href="#" onclick="javascript: SetSelAnn('002', {$vidTVO},'off'); return false;">
							<img title="Ce véhicule sera diffusé vers LE BON COIN" id="c002{$vidTVO}" border="0" src="{$XMLC_PictosPath}voWeb.gif"/>
						</a>
					</xsl:if>
					<xsl:if test="(Exclu002!='')">
						<a href="#" onclick="javascript: SetSelAnn('002', {$vidTVO},'on'); return false;">
							<img title="ce véhicule est exclu de la diffusion vers LE BON COIN" id="c002{$vidTVO}" border="0" src="{$XMLC_PictosPath}voWebNO.gif"/>
						</a>
					</xsl:if>
				</xsl:if>
			</td>
			<td style="{$stValue}" nowrap="nowrap">
				<a href="#" onclick="javascript: lPopFormAxVO('FormVO', {$vidTVO}, 3); return false;">
					<img title="Modification du Véhicule" border="0" src="{$voIcoRun}"/>
				</a>
				<xsl:value-of select="$sTypeVO"/>
				<xsl:if test="(StatutVD != '')">
					<br/>
					<xsl:value-of select="$vStatutVD"/>
				</xsl:if>
			</td>
			<td style="{$stValue}">
				<xsl:value-of select="iMar"/> - <xsl:value-of select="iMod"/>
			</td>
			<td>
				<xsl:value-of select="iCou"/>
			</td>
			<td>
				<xsl:value-of select="CV"/> cv - <xsl:value-of select="KMS"/> km</td>
			<td>
				<xsl:value-of select="MEC"/>
			</td>
			<td style="align: center;" nowrap="nowrap">
				<xsl:value-of select="Immat"/>
			</td>
			<td style="{$stChassis}" align="left">
				<xsl:value-of select="iCha"/>
			</td>
			<td align="right" nowrap="nowrap">
				<xsl:if test="(PVen != '0.00') and (PVen != '0')">
					<xsl:value-of select="PVen"/>
				</xsl:if>
			</td>
		</tr>
	</xsl:template>
</xsl:stylesheet>
