<?xml version="1.0" encoding="ISO-8859-15"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:xslc="http://xslcomponents.org/TR/WD-xslc" xmlns:yui="http://developer.yahoo.com/yui/">
	<xsl:import href="../../yui-VO20141006.xsl"/>
	<xsl:variable name="XMLC_PortalVersion">
		<xsl:value-of select="/document/XMLC_Params/XMLC_PortalVersion"/>
	</xsl:variable>
	<xsl:variable name="XMLC_InstanceName">
		<xsl:value-of select="/document/XMLC_Params/XMLC_InstanceName"/>
	</xsl:variable>
	<xsl:variable name="XMLC_Portal">
		<xsl:choose>
			<xsl:when test="/document/XMLC_Params/XMLC_AbsolutePortal = '1'">
				<xsl:value-of select="/document/XMLC_Params/XMLC_Portal"/>
			</xsl:when>
			<xsl:otherwise>/<xsl:value-of select="/document/XMLC_Params/XMLC_Portal"/>/</xsl:otherwise>
		</xsl:choose>
	</xsl:variable>
	<xsl:variable name="XMLC_SkinPath">
		<xsl:choose>
			<xsl:when test="(/document/XMLC_Profile/XMLC_LocalPortal = '1') and (/document/XMLC_Profile/XMLC_LocalPortalPath != '')">
				<xsl:value-of select="/document/XMLC_Profile/XMLC_LocalPortalPath"/>
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="$XMLC_Portal"/>
			</xsl:otherwise>
		</xsl:choose>Skins/<xsl:value-of select="/document/XMLC_Params/XMLC_Skin"/>/</xsl:variable>
	<xsl:variable name="XMLC_PictosPath">
		<xsl:choose>
			<xsl:when test="(/document/XMLC_Profile/XMLC_LocalPortal = '1') and (/document/XMLC_Profile/XMLC_LocalPortalPath != '')">
				<xsl:value-of select="/document/XMLC_Profile/XMLC_LocalPortalPath"/>
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="$XMLC_Portal"/>
			</xsl:otherwise>
		</xsl:choose>
		<xsl:choose>
			<xsl:when test="/document/XMLC_Params/XMLC_Pictos != ''">Pictos/<xsl:value-of select="/document/XMLC_Params/XMLC_Pictos"/>/</xsl:when>
			<xsl:otherwise>Skins/<xsl:value-of select="/document/XMLC_Params/XMLC_Skin"/>/pictos/</xsl:otherwise>
		</xsl:choose>
	</xsl:variable>
	<xsl:template match="/">
		<xsl:apply-templates select="document"/>
	</xsl:template>
	<xsl:template match="document">
		<xsl:param name="UserR" select="/document/tResaS/tResa/idUser"/>
		<xsl:param name="UserID" select="/document/XMLC_Params/XMLC_UserID"/>
		<xsl:param name="RecordCount" select="/document/tResaS/@RowCount"/>
		<html>
			<head>
				<meta http-equiv="Expires" content="0"/>
				<xsl:call-template name="yui:AutoComplete.Head"/>
				<script text="text/javascript" src="{$XMLC_Portal}xslc.js"/>
				<script text="text/javascript" src="{$XMLC_Portal}common.js"/>
				<link rel="stylesheet" type="text/css" href="{$XMLC_SkinPath}xslc.css"/>
				<link rel="stylesheet" type="text/css" href="{$XMLC_SkinPath}common.css"/>
				<style type="text/css">a.aopt { text-decoration:none;}
a.aoptselected { text-decoration: none; background-color: #cbdaf5}

fieldset
{
  border:1px solid #B1DBF3; 
    -moz-border-radius:4px;
    border-radius:4px;
}

.separa
    {
    border-top: 1px solid blue;
    padding-top: 5px;
    margin-top: 2px;
    }
</style>
				<script language="javascript">
var XMLC_SkinPath = '<xsl:value-of select="$XMLC_SkinPath"/>';
var XMLC_Portal = '<xsl:value-of select="$XMLC_Portal"/>';
var XMLC_PictosPath = '<xsl:value-of select="$XMLC_PictosPath"/>';<xsl:if test="/document/Locales/*[@javascriptText='1']">
						<xsl:variable name="Quote">'</xsl:variable>
						<xsl:variable name="DblQuote">"</xsl:variable>
						<xsl:for-each select="/document/Locales/*[@javascriptText='1']">
							<xsl:variable name="Value" select="translate(., $DblQuote, $Quote)"/>
							<xsl:value-of select="name()"/> = "<xsl:value-of select="$Value"/>";</xsl:for-each>
					</xsl:if>
				</script>
				<script language="javascript">
					<![CDATA[   function oForm(oWidth, oHeight) {
      if (vidPaneID.style.display=='block') {
         vidPaneID.style.display='none';
//         vidPaneID.innerHTML=''; 
      } else {
         vidPaneID.style.display='block';
//         vidPaneID.style.width=oWidth;
//         vidPaneID.style.height=oHeight;
      }
   }]]>
					<![CDATA[   function ShowHideForm(vid) {
      if (vid.style.display=='block') {
         vid.style.display='none';
      } else {
         vid.style.display='block';
      }
   }
   function wReload(hRef) {
      parent.document.location = hRef;
   }]]>
				</script>
				<script language="javascript">
					<![CDATA[function selSelect(item)
 {
  if (item=='Rec') {
    zSel.style.display='none';
    zRec.style.display='block';
    SelSel.className='opt';
    SelRec.className='optRowSelected';
  }
  if (item=='Sel') {
    zRec.style.display='none';
    zSel.style.display='block';
    SelRec.className='opt';
    SelSel.className='optRowSelected';
  }
 }
]]>
				</script>
				<script language="javascript">
					<![CDATA[function getObjectById(ID) {
	var obj;
	if (document.getElementById)
		return document.getElementById(ID);
	else if (document.all)
		return document.all(ID);
	else
		return eval('document.' + ID);
}

function donner_focus(chp)
{

  var focusControl = getObjectById(chp);
	try {
focusControl.focus();
      }
      catch (err) {
      }
}
]]>
				</script>
			</head>
			<body style="background:url({$XMLC_Portal}Pictos/backframe.gif) repeat-x top left; ">
				<table cellpadding="8px;">
					<tr>
						<td>
							<xsl:apply-templates select="tResaS/tResa"/>
							<xsl:if test="$RecordCount=0">
								<xsl:call-template name="xslc:FormResa"/>
							</xsl:if>
						</td>
					</tr>
				</table>
			</body>
		</html>
	</xsl:template>
	<xsl:template match="tResaS/tResa">
		<xsl:param name="UserR" select="/document/tResaS/tResa/idUser"/>
		<xsl:param name="UserID" select="/document/XMLC_Params/XMLC_UserID"/>
		<xsl:param name="RecordCount" select="/document/tResaS/@RowCount"/>
		<xsl:if test="$RecordCount!=0 and $UserID!=$UserR and not (/document/XMLC_Params/XMLC_Authenticated != '0' and (/document/XMLC_Params/XMLC_Administrator = '1' or /document/XMLC_Params/User_RARVAL = '1' ))">
			<table border="0" cellpadding="2" cellspacing="0" width="400px">
				<span class="clFieldCaption">
					<br/>&#160; une réservation a été effectuée pour ce Véhicule...<br/>&#160; à partir de <xsl:value-of select="DateResa"/>
					<xsl:if test="$UserR!=12678">, jusqu'au <xsl:value-of select="DateMax"/> inclus.</xsl:if>
				</span>
				<tr>
					<td align="right">
						<br/>
						<span class="clFieldCaption">pour :</span>
					</td>
					<td style="padding-left: 10px; font-weight: bold" width="200px">
						<br/>
						<xsl:if test="$UserID=$UserR and $UserR!=12678">
							<xsl:value-of select="UserName"/>
						</xsl:if>
						<xsl:if test="$UserR=12678">
							<xsl:value-of select="TextResa"/>
						</xsl:if>
						<xsl:if test="$UserID!=$UserR and $UserR!=12678">
							<table>
								<tr>
									<td>
										<a href="mailto:{UserName}" style="color:blue">
											<xsl:value-of select="UserName"/>
										</a>
									</td>
									<td/>
								</tr>
							</table>
						</xsl:if>
					</td>
				</tr>
				<tr>
					<td align="right">
						<span class="clFieldCaption">véhicule sélectionné :</span>
					</td>
					<td style="padding-left: 10px; font-weight: bold" width="200px">
						<xsl:value-of select="/document/Params/sInfoVN"/>
					</td>
				</tr>
				<tr>
					<td align="right">
						<span class="clFieldCaption">nom du Client:</span>
					</td>
					<td style="padding-left: 10px">
						<xsl:value-of select="TextResa"/>
					</td>
				</tr>
				<tr>
					<td align="right" valign="top">
						<span class="clFieldCaption">commentaire :</span>
					</td>
					<td style="padding-left: 10px" height="100px">
						<xsl:value-of select="Commentaire"/>
					</td>
				</tr>
				<tr>
					<td> </td>
					<td align="right">
						<xsl:call-template name="xslc:Button">
							<xsl:with-param name="idName">BtnQuitter</xsl:with-param>
							<xsl:with-param name="Caption">Quitter</xsl:with-param>
							<xsl:with-param name="OnClick">parent.ShowHideForm(parent.document.getElementById('vdivFormResa')); return false;</xsl:with-param>
							<xsl:with-param name="Width">100px</xsl:with-param>
						</xsl:call-template>
					</td>
				</tr>
			</table>
		</xsl:if>
		<xsl:if test="$RecordCount=0 or $UserID=$UserR or (/document/XMLC_Params/XMLC_Authenticated != '0' and (/document/XMLC_Params/XMLC_Administrator = '1' or /document/XMLC_Params/User_RARVAL = '1' ))">
			<xsl:call-template name="xslc:FormResa"/>
		</xsl:if>
	</xsl:template>
	<xsl:template name="xslc:FormResa">
		<xsl:param name="UserR" select="/document/tResaS/tResa/idUser"/>
		<xsl:param name="UserID" select="/document/XMLC_Params/XMLC_UserID"/>
		<xsl:param name="RecordCount" select="/document/tResaS/@RowCount"/>
		<xsl:param name="ResaAction">
			<xsl:if test="$RecordCount=0 ">InsertReservation</xsl:if>
			<xsl:if test="$RecordCount!=0 ">UpdateReservation</xsl:if>
		</xsl:param>
		<xsl:param name="txtRes">
			<xsl:value-of select="TextResa"/>
			<xsl:if test="/document/XMLC_Params/XMLC_Authenticated != '0' and (/document/XMLC_Params/XMLC_Administrator = '1' or /document/XMLC_Params/User_RARVAL = '1' ) and (/document/tResaS/tResa/TextResa='')">ARVAL</xsl:if>
		</xsl:param>
		<xsl:if test="/document/Params/ResaMessage!='' and $RecordCount=0">
			<span class="clFieldCaption">
				<br/>&#160;votre réservation a été annulée pour ce Véhicule<br/>
				<br/>
			</span>
			<table border="0" cellpadding="2" cellspacing="0" width="400px">
				<tr>
					<td/>
					<td style="padding-left: 10px; font-weight: bold" width="200px">
						<br/>
						<xsl:call-template name="xslc:Button">
							<xsl:with-param name="idName">BtnQuitter</xsl:with-param>
							<xsl:with-param name="Caption">Quitter</xsl:with-param>
							<xsl:with-param name="OnClick">parent.ShowHideForm(parent.document.getElementById('vdivFormResa')); return false;</xsl:with-param>
							<xsl:with-param name="Width">200px</xsl:with-param>
						</xsl:call-template>
					</td>
				</tr>
			</table>
		</xsl:if>
		<xsl:if test="/document/Params/ResaMessage=''">
			<xsl:if test="$RecordCount!=0">
				<form name="DeleteForm" method="POST" action="{/document/Aliases/bdVODLL}DeleteReservation">
					<input type="hidden" name="idResa" value="{idResa}"/>
					<input type="hidden" name="idVehicle" value="{/document/Params/idVehicle}"/>
					<input type="hidden" name="idUser" value="{/document/XMLC_Params/XMLC_UserID}"/>
				</form>
				<form name="PrintForm" method="POST" action="{/document/Aliases/bdVODLL}ReportPDF">
					<input type="hidden" name="rptselect" value="idVO;3d;{/document/Params/idVehicle}"/>
					<input type="hidden" name="rptname" value="BCVO;PDF"/>
					<input type="hidden" name="rptinfo1" value="{idResa}"/>
					<input type="hidden" name="rptinfo2" value="{idResatClients}"/>
				</form>
			</xsl:if>
			<form name="ResaForm" method="POST" action="{/document/Aliases/bdVODLL}{$ResaAction}">
				<input type="hidden" name="idResa" value="{idResa}"/>
				<input type="hidden" name="idVehicle" value="{/document/Params/idVehicle}"/>
				<input type="hidden" name="sInfoVN" value="{/document/Params/sInfoVN}"/>
				<xsl:if test="/document/XMLC_Params/XMLC_Authenticated != '0' and (/document/XMLC_Params/XMLC_Administrator = '1' or /document/XMLC_Params/User_RARVAL = '1' )">
					<input type="hidden" name="idUser" value="12678"/>
				</xsl:if>
				<xsl:if test="not (/document/XMLC_Params/XMLC_Authenticated != '0' and (/document/XMLC_Params/XMLC_Administrator = '1' or /document/XMLC_Params/User_RARVAL = '1' ))">
					<input type="hidden" name="idUser" value="{/document/XMLC_Params/XMLC_UserID}"/>
				</xsl:if>
				<input type="hidden" name="UserName" value="{/document/XMLC_Params/XMLC_UserName}"/>
				<xsl:if test="$RecordCount=0">
					<span class="clFieldCaption">
						<br/>&#160;Complétez les informations suivantes, afin de réaliser une réservation qui restera effective pour une durée de 2 jours...</span>
				</xsl:if>
				<xsl:if test="$UserID=$UserR">
					<span class="clFieldCaption">
						<br/>&#160;Votre réservation est effective pour une durée de <xsl:value-of select="NbjAjout"/> jours...<br/>&#160;à partir de <xsl:value-of select="DateResa"/>, jusqu'au <xsl:value-of select="DateMax"/> inclus.<br/>&#160;Vous pouvez éventuellement la modifier ou l'annuler...<br/>
					</span>
				</xsl:if>
				<table border="0" cellpadding="2" cellspacing="0" width="600px">
					<tr>
						<td align="right">
							<br/>votre identifiant de connexion :<span class="clFieldCaption"/>
						</td>
						<td style="padding-left: 10px; font-weight: bold">
							<br/>
							<xsl:value-of select="/document/XMLC_Params/XMLC_UserName"/>
						</td>
						<td width="150px"/>
					</tr>
					<tr>
						<td align="right">
							<span class="clFieldCaption">véhicule sélectionné :</span>
						</td>
						<td colspan="2" style="padding-left: 10px; font-weight: bold">
							<xsl:value-of select="/document/Params/sInfoVN"/>
						</td>
					</tr>
					<tr>
						<td colspan="3">
							<fieldset>
								<legend style="font-weight:bold">Coordonnées du client</legend>
								<table>
									<tr>
										<td id="SelRec" width="150px" onclick="selSelect('Rec');" onmouseover="seloldClass=this.className; this.className='optRowSelected';" onmouseout="this.className=seloldClass;">
											<div id="hREC">
												<img border="0" src="{$XMLC_PictosPath}button_service.gif"/>Recherche</div>
										</td>
										<td id="SelSel" width="150px" onclick="selSelect('Sel');" onmouseover="seloldClass=this.className; this.className='optRowSelected';" onmouseout="this.className=seloldClass;">
											<div id="hSEL">
												<img border="0" src="{$XMLC_PictosPath}button_service.gif"/>Sélection</div>
										</td>
									</tr>
								</table>
								<div class="separa"/>
								<div id="zSel" style="display: none; ">zone sélection :<table width="100%">
										<xsl:if test="/document/XMLC_Params/XMLC_Authenticated != '0' and (/document/XMLC_Params/XMLC_Administrator = '1' or /document/XMLC_Params/User_RARVAL = '1' ) and $RecordCount=0 ">
											<tr>
												<td align="right">
													<br/>réservation pour ARVAL :<span class="clFieldCaption"/>
												</td>
												<td style="padding-left: 10px; font-weight: bold">
													<br/>
													<select id="CBArval" name="CBArval" onchange='javascript: setIdUser(getObjectById("CBArval").value); return false;' style="width:80px">
														<option value="1" name="selected">oui</option>
														<option value="0">non</option>
													</select>
												</td>
											</tr>
										</xsl:if>
										<tr>
											<td align="right">
												<span class="clFieldCaption">nom du Client:</span>
											</td>
											<td style="padding-left: 10px">
												<input type="hidden" name="idResatClients" value="0{idResatClients}"/>
												<input type="text" class="clFlatTextInput" name="TextResa" id="TextResa" size="30" value="{$txtRes}"/>
											</td>
										</tr>
										<tr>
											<td align="right" valign="top">
												<span class="clFieldCaption">commentaire (éventuel):</span>
											</td>
											<td style="padding-left: 10px">
												<textarea rows="3" width="270px" class="clFlatTextInput" name="Commentaire">
													<xsl:value-of select="Commentaire"/>
												</textarea>
											</td>
										</tr>
										<tr>
											<td> </td>
											<td align="right" style="padding-left: 8px">
												<script language="javascript">
													<![CDATA[// 
// Valider les paramètres d'appel et lancement Submit
// 
var fSubmitted = false;
function goSubmit() {
 if (getObjectById('TextResa').value=='') {
      SetFocus('TextResa');
      return false
   } ;
  if (fSubmitted==false) {
    fSubmitted = true;
    document.ResaForm.submit(); 
  };
return false;
}
]]>
												</script>
												<xsl:if test="$RecordCount!=0 ">
													<xsl:call-template name="xslc:Button">
														<xsl:with-param name="idName">BtnSave</xsl:with-param>
														<xsl:with-param name="Caption">Enregistrer</xsl:with-param>
														<xsl:with-param name="OnClick">goSubmit(); return false;</xsl:with-param>
														<xsl:with-param name="Width">260px</xsl:with-param>
													</xsl:call-template>
													<xsl:call-template name="xslc:Button">
														<xsl:with-param name="idName">BtnPrintVW</xsl:with-param>
														<xsl:with-param name="Caption">Compléter le bon de commande VW</xsl:with-param>
														<xsl:with-param name="OnClick">document.PrintForm.rptname.value='bcvoVW;PDF;';
SubmitForm('PrintForm', 'TARGET', '_blank');parent.ShowHideForm(parent.document.getElementById('vdivFormResa')); return false;</xsl:with-param>
														<xsl:with-param name="Width">260px</xsl:with-param>
													</xsl:call-template>
													<xsl:call-template name="xslc:Button">
														<xsl:with-param name="idName">BtnPrintDasWelt</xsl:with-param>
														<xsl:with-param name="Caption">Compléter le bon de commande DasWelt</xsl:with-param>
														<xsl:with-param name="OnClick">document.PrintForm.rptname.value='bcvoDasWelt;PDF;';
SubmitForm('PrintForm', 'TARGET', '_blank');parent.ShowHideForm(parent.document.getElementById('vdivFormResa')); return false;</xsl:with-param>
														<xsl:with-param name="Width">260px</xsl:with-param>
													</xsl:call-template>
													<xsl:call-template name="xslc:Button">
														<xsl:with-param name="idName">BtnPrintHyundai</xsl:with-param>
														<xsl:with-param name="Caption">Compléter le bon de commande Hyundai</xsl:with-param>
														<xsl:with-param name="OnClick">document.PrintForm.rptname.value='bcvoHYUNDAI;PDF;';
SubmitForm('PrintForm', 'TARGET', '_blank');parent.ShowHideForm(parent.document.getElementById('vdivFormResa')); return false;</xsl:with-param>
														<xsl:with-param name="Width">260px</xsl:with-param>
													</xsl:call-template>
													<xsl:call-template name="xslc:Button">
														<xsl:with-param name="idName">BtnPrintVPN</xsl:with-param>
														<xsl:with-param name="Caption">Compléter le bon de commande VPN</xsl:with-param>
														<xsl:with-param name="OnClick">document.PrintForm.rptname.value='bcvoVPN;PDF;';
SubmitForm('PrintForm', 'TARGET', '_blank');parent.ShowHideForm(parent.document.getElementById('vdivFormResa')); return false;</xsl:with-param>
														<xsl:with-param name="Width">260px</xsl:with-param>
													</xsl:call-template>
													<xsl:call-template name="xslc:Button">
														<xsl:with-param name="idName">BtnPrintNCO</xsl:with-param>
														<xsl:with-param name="Caption">Compléter le bon de commande Nissan Club Occasions</xsl:with-param>
														<xsl:with-param name="OnClick">document.PrintForm.rptname.value='bcvoNCO;PDF;';
SubmitForm('PrintForm', 'TARGET', '_blank');parent.ShowHideForm(parent.document.getElementById('vdivFormResa')); return false;</xsl:with-param>
														<xsl:with-param name="Width">260px</xsl:with-param>
													</xsl:call-template>
													<xsl:call-template name="xslc:Button">
														<xsl:with-param name="idName">BtnAnnuler</xsl:with-param>
														<xsl:with-param name="Caption">Annuler cette réservation</xsl:with-param>
														<xsl:with-param name="OnClick">document.DeleteForm.submit(); return false;</xsl:with-param>
														<xsl:with-param name="Width">260px</xsl:with-param>
													</xsl:call-template>
													<table>
														<tr>
															<td align="right"/>
															<td/>
															<td/>
														</tr>
													</table>
												</xsl:if>
												<xsl:if test="$RecordCount=0 ">
													<xsl:call-template name="xslc:Button">
														<xsl:with-param name="idName">BtnSave</xsl:with-param>
														<xsl:with-param name="Caption">Réserver ce Véhicule</xsl:with-param>
														<xsl:with-param name="OnClick">goSubmit(); return false;</xsl:with-param>
														<xsl:with-param name="Width">260px</xsl:with-param>
													</xsl:call-template>
												</xsl:if>
												<xsl:if test="/document/XMLC_Params/XMLC_UserName = 'llebleu@free.fr' or /document/XMLC_Params/XMLC_UserName = 'christophe.decroix@valautolille.com'">
													<xsl:if test="substring(/document/Params/sInfoVN,1,2)='VO pas un test' ">
														<xsl:call-template name="xslc:Button">
															<xsl:with-param name="idName">BtnPDFVO-01</xsl:with-param>
															<xsl:with-param name="Caption">BC en pdf</xsl:with-param>
															<xsl:with-param name="OnClick">{/document/Aliases/bdVODLL}ReportPDF?rptSelect=idVO;3d;{idVO}&amp;rptName={$sInfoVO} - Fiche Commerciale

parent.ShowHideForm(parent.document.getElementById('vdivFormResa')); return false;</xsl:with-param>
															<xsl:with-param name="Width">260px</xsl:with-param>
														</xsl:call-template>
													</xsl:if>
												</xsl:if>
												<xsl:call-template name="xslc:Button">
													<xsl:with-param name="idName">BtnQuitter-01</xsl:with-param>
													<xsl:with-param name="Caption">Quitter</xsl:with-param>
													<xsl:with-param name="OnClick">parent.ShowHideForm(parent.document.getElementById('vdivFormResa')); return false;</xsl:with-param>
													<xsl:with-param name="Width">260px</xsl:with-param>
												</xsl:call-template>
											</td>
										</tr>
									</table>
								</div>
							</fieldset>
						</td>
					</tr>
				</table>
			</form>
		</xsl:if>
		<div id="zRec" style="display: none; ">zone recherche :<form action="{/document/Aliases/bdVODLL}SearchVO" name="MainForm" method="post">
				<input type="hidden" name="SVOTypeSearch" value="{/document/OutParams/TypeSearch}"/>
				<input type="hidden" name="SVOTypeVO" value="{/document/OutParams/TypeVO}"/>
				<input type="hidden" name="SVOSITE" value="{/document/OutParams/SITE}"/>
				<input type="hidden" name="NextAction" value="FormtReservation"/>
				<input type="hidden" name="idVehicle" value="{/document/Params/idVehicle}"/>
				<input type="hidden" name="sInfoVN" value="{/document/Params/sInfoVN}"/>
			</form>
			<table cellpadding="0" cellspacing="0" height="100%" width="100%">
				<tr height="8px">
					<td/>
					<td/>
					<td/>
				</tr>
				<tr>
					<td width="140px" align="right">Type Recherche: </td>
					<td>
						<select id="CBsearch" onchange="javascript: document.MainForm.SVOTypeSearch.value=getObjectById('CBsearch').value; document.MainForm.submit(); return false;" style="width:102px">
							<option value="0">
								<xsl:if test="/document/OutParams/TypeSearch=''">
									<xsl:attribute name="selected"/>
								</xsl:if>...</option>
							<option value="5" style="color:orange">
								<xsl:if test="/document/OutParams/TypeSearch=5">
									<xsl:attribute name="selected"/>
								</xsl:if>Nom Client</option>
							<option value="6" style="color:orange">
								<xsl:if test="/document/OutParams/TypeSearch=6">
									<xsl:attribute name="selected"/>
								</xsl:if>Mobile</option>
							<option value="7" style="color:orange">
								<xsl:if test="/document/OutParams/TypeSearch=7">
									<xsl:attribute name="selected"/>
								</xsl:if>Téléphone</option>
							<option value="8" style="color:orange">
								<xsl:if test="/document/OutParams/TypeSearch=8">
									<xsl:attribute name="selected"/>
								</xsl:if>Mail</option>
						</select>
					</td>
					<td align="right">
						<xsl:call-template name="xslc:Button">
							<xsl:with-param name="idName">BtnQuitter-02</xsl:with-param>
							<xsl:with-param name="Caption">Quitter</xsl:with-param>
							<xsl:with-param name="OnClick">parent.ShowHideForm(parent.document.getElementById('vdivFormResa')); return false;</xsl:with-param>
							<xsl:with-param name="Width">100px</xsl:with-param>
						</xsl:call-template>
					</td>
				</tr>
				<xsl:call-template name="yui:AutoComplete">
					<xsl:with-param name="Name">InputSearchVO</xsl:with-param>
					<xsl:with-param name="InputAttributes">
						<Attributes size="15"/>
					</xsl:with-param>
					<xsl:with-param name="CustomParam">CustomParam=tReservation</xsl:with-param>
					<xsl:with-param name="UseShadow">true</xsl:with-param>
					<xsl:with-param name="DatasXMLServiceName">DataSearchVO</xsl:with-param>
					<xsl:with-param name="ResultRecordName">VO</xsl:with-param>
					<xsl:with-param name="ResultFields">
						<Field>
							<Name>VO_Result</Name>
						</Field>
						<Field>
							<Name>VO_ID</Name>
						</Field>
						<Field>
							<Name>idOwner</Name>
						</Field>
						<Field>
							<Name>VO_ORDRE</Name>
						</Field>
						<Field>
							<Name>VO_NO</Name>
						</Field>
						<Field>
							<Name>VO_IMMAT</Name>
						</Field>
						<Field>
							<Name>VO_DESC</Name>
						</Field>
						<Field>
							<Name>VO_BUYER</Name>
						</Field>
						<Field>
							<Name>VO_Icon</Name>
						</Field>
					</xsl:with-param>
					<xsl:with-param name="TemplateResult">&lt;table style="table-layout: fixed;"&gt;&lt;tr&gt;&lt;td style="vertical-align: middle; display: inline-block; width:100px;"&gt;&lt;div style="width:100px; word-wrap: break-word"&gt;<xsl:choose>
							<xsl:when test="(/document/OutParams/TypeSearch='3')">
								<span style="color:blue">
									<FieldName>VO_NO</FieldName>
								</span>
							</xsl:when>
							<xsl:otherwise>
								<span style="color:purple">
									<FieldName>VO_NO</FieldName>
								</span>
							</xsl:otherwise>
						</xsl:choose>&lt;/div&gt;&lt;/td&gt;&lt;td style="width:100px;"&gt;&lt;div style="width:100px;word-wrap: break-word"&gt;<span style="color:purple">
							<FieldName>VO_ORDRE</FieldName>
						</span>&lt;/div&gt;&lt;/td&gt;&lt;td style="width:100px;"&gt;&lt;div style="width:80px;word-wrap: break-word"&gt;<xsl:choose>
							<xsl:when test="(/document/OutParams/TypeSearch='1') or (/document/OutParams/TypeSearch='')">
								<span style="color:blue">
									<FieldName>VO_IMMAT</FieldName>
								</span>
							</xsl:when>
							<xsl:otherwise>
								<span style="color:purple">
									<FieldName>VO_IMMAT</FieldName>
								</span>
							</xsl:otherwise>
						</xsl:choose>&lt;/div&gt;&lt;/td&gt;&lt;td style="width:125px;"&gt;&lt;div style="width:125px;word-wrap: break-word"&gt;<span style="color:purple">
							<FieldName>VO_DESC</FieldName>
						</span>&lt;/div&gt;&lt;/td&gt;&lt;td style="width:125px;"&gt;&lt;div style="width:125px;word-wrap: break-word"&gt;<xsl:choose>
							<xsl:when test="/document/OutParams/TypeSearch='2'">
								<span style="color:blue">
									<FieldName>VO_BUYER</FieldName>
								</span>
							</xsl:when>
							<xsl:otherwise>
								<span style="color:purple">
									<FieldName>VO_BUYER</FieldName>
								</span>
							</xsl:otherwise>
						</xsl:choose>&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</xsl:with-param>
					<xsl:with-param name="VActionOnSelect">// attention : ne s'ajoute pas au script 
// à faire dans ..\..\yui-VO20141006.xsl
if (datas[2]!=0) {

    getObjectById('TextResa').value = datas[7];
    selSelect('Sel');
    donner_focus('TextResa');
    }
 }</xsl:with-param>
				</xsl:call-template>
			</table>
		</div>
		<xsl:if test="/document/XMLC_Params/XMLC_Authenticated != '0' and (/document/XMLC_Params/XMLC_Administrator = '1' or /document/XMLC_Params/User_RARVAL = '1' )">
			<script language="javascript">
				<![CDATA[function setIdUser(aVal)
{]]>
				<![CDATA[// récupération l'ID de l'utilisateur
var iiUser= ']]>
				<xsl:value-of select="/document/XMLC_Params/XMLC_UserID"/>
				<![CDATA[';
  if (aVal==1) iiUser = 12678;
  getObjectById("idUser").value = parseInt(iiUser);
}]]>
			</script>
		</xsl:if>
		<script language="javascript">
			<![CDATA[function ResaInit()
{]]>
			<![CDATA[// récupération du nombre de réservation 
var iiCount= ']]>
			<xsl:value-of select="/document/tResaS/@RowCount"/>
			<![CDATA[';
  if (iiCount==2327) {
    selSelect('Rec');
    donner_focus('InputSearchVO');
  }
  if (iiCount!=2327) {
    selSelect('Sel');
    donner_focus('TextResa');
  }
}

ResaInit();]]>
		</script>
	</xsl:template>
</xsl:stylesheet>
