<?xml version="1.0"?>
<!-- edited with XML Spy v2.5 NT  - http://www.xmlspy.com -->
<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:call-template name="xslc:Page">
			<xsl:with-param name="Head">
				<script language="javascript">
					<![CDATA[   function oForm(oWidth, oHeight) {
      if (vidPaneID.style.display=='block') {
         vidPaneID.style.display='none';
//         vidPaneID.innerHTML=''; 
      } else {
         vidPaneID.style.display='block';
//         vidPaneID.style.width=oWidth;
//         vidPaneID.style.height=oHeight;
      }
   }]]>
					<![CDATA[   function ShowHideForm(vid) {
      if (vid.style.display=='block') {
         vid.style.display='none';
      } else {
         vid.style.display='block';
      }
   }]]>
				</script>
				<script language="javascript">
					<![CDATA[// ==========================================================================
// Afficher la fenêtre popup pour la saisie des infos VD
// ==========================================================================
function PopFormAxVO(PopID, idVO) {
  if (popObj = getObjectById(PopID)) {
      popObj.src = XMLC_BaseHRef+'FormAxVO?idTVO='+idVO+'&TypeAffichage='+getObjectById('CBTYPEAFFICHAGE').value;
  }
}]]>
					<![CDATA[// ==========================================================================
// Afficher la fenêtre popup pour la saisie des infos VD
// ==========================================================================
function lPopFormAxVO(PopID, idVO) {
  if (popObj = getObjectById(PopID)) {
      popObj.src = XMLC_BaseHRef+'FormAxVO?TypeVO=3&idTVO='+idVO+'&TypeAffichage='+getObjectById('CBTYPEAFFICHAGE').value;
  }
}]]>
					<![CDATA[// ==========================================================================
// Afficher la fenêtre popup pour la saisie des infos Réservation
// ==========================================================================
function lPopFormResa(PopID, idVehicle, sInfoVN) {
var posScroll =f_scrollTop();
   vidPaneID = document.getElementById('vdivFormUser'); 
   vidPaneID.style.top=posScroll +15;
   vidPaneID.style.left='145px';                    
//   vidPaneID.style.align = 'center';
  ShowHideForm(vidPaneID);
//      ShowHide(vidPaneID, 'WIDTH', 435, 'HEIGHT', 365); 
  var rdm=Math.floor(Math.random()*100000);
  if (popObj = getObjectById(PopID)) {
      popObj.style.top = 18; //posScroll +15;
      popObj.style.left = 0; //55;
      popObj.style.width = 430;
      popObj.style.height = 255;
      popObj.src = XMLC_BaseHRef+'FormtReservation?idVehicle='+idVehicle+'&sInfoVN='+sInfoVN+'&randNumber='+rdm;
  }
}

// Pour Afficher de nouoveau la fenêtre popup pour la saisie des infos Réservation
// ==========================================================================
function lPopShowResa(PopID, idVehicle, sInfoVN) {
  var rdm=Math.floor(Math.random()*100000);
  if (popObj = getObjectById(PopID)) {
      popObj.src = XMLC_BaseHRef+'FormtReservation?idVehicle='+idVehicle+'&randNumber='+rdm+'&sInfoVN='+sInfoVN;
  }
}]]>
				</script>
				<script language="javascript">
					<![CDATA[   function moveHandler(e){
      if (e == null) { e = window.event } 
      if (e.button<=1&&dragOK){
         savedTarget.style.left=e.clientX-dragXoffset+'px';
         savedTarget.style.top=e.clientY-dragYoffset+'px';
         return false;
      }
   }

   function cleanup(e) {
      document.onmousemove=null;
      document.onmouseup=null;
      savedTarget.style.cursor=orgCursor;
      dragOK=false;
   }]]>
				</script>
				<script language="javascript">
					<![CDATA[   function dragHandler(e){
      var htype='-moz-grabbing';
      if (e == null) { e = window.event; htype='move';} 
      var target = e.target != null ? e.target : e.srcElement;
      orgCursor=target.style.cursor;
      if ((target.className=='BoxFrameVD') || (target.className=='BoxFrameVN') || (target.className=='BoxFrameVO')) {
         savedTarget=target;       
         target.style.cursor=htype;
         dragOK=true;
         dragXoffset=e.clientX-parseInt(vidPaneID.style.left);
         dragYoffset=e.clientY-parseInt(vidPaneID.style.top);
         document.onmousemove=moveHandler;
         document.onmouseup=cleanup;
         return false;
      }
   }
   document.onmousedown=dragHandler;]]>
				</script>
				<script language="javascript">
					<![CDATA[   var savedTarget=null; // The target layer 
   var orgCursor=null;   // The original Cursor (mouse) Style so we can restore it
   var dragOK=false;     // True if we're allowed to move the element under mouse
   var dragXoffset=0;    // How much we've moved the element on the horozontal
   var dragYoffset=0;    // How much we've moved the element on the verticle	 
//   var vidPaneID = null;]]>
				</script>
				<script language="javascript">
					<![CDATA[// 
// Valider les paramètres d'appel et lancement Submit
// 
function goSubmit() {
document.MainForm.submit(); 
return false;
}

function goSubmitOrder(xVal) {
document.MainForm.SETORDERFIELD.value=xVal;
document.MainForm.submit(); 
return false;
}]]>
				</script>
			</xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template match="document">
		<xsl:call-template name="xslc:Page">
			<xsl:with-param name="Body">
				<xsl:call-template name="xslc:ApplicationMessages"/>
				<xsl:apply-templates select="ListVRS"/>
				<xsl:call-template name="xslc:PoweredBy"/>
			</xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template match="ListVRS">
		<xsl:param name="RecordCount" select="@RowCount"/>Visualisation des véhicules prochainement disponibles, (<xsl:value-of select="$RecordCount"/> VO sélectionnés). <form action="{/document/Aliases/bdVODLL}ListVR" name="MainForm" method="post">
			<input type="hidden" name="MARQUE" value="{/document/OutParams/MARQUE}"/>
			<input type="hidden" name="ORDERFIELD" value="{/document/OutParams/ORDERFIELD}"/>
			<input type="hidden" name="ORDERSENSE" value="{/document/OutParams/ORDERSENSE}"/>
			<input type="hidden" name="SETORDERFIELD"/>
		</form>
		<div id="zoneTOP">
			<table width="100%">
				<tr>
					<td width="50px" align="right">Marque : </td>
					<td width="120px">
						<select id="CBMARQUE" onchange="javascript: document.MainForm.MARQUE.value=getObjectById('CBMARQUE').value; goSubmit() ; return false;" style="width:110px">
							<option value="">
								<xsl:if test="/document/OutParams/MARQUE=''">Choix Marque</xsl:if>
								<xsl:if test="/document/OutParams/MARQUE!=''">Toutes Marques</xsl:if>
							</option>
							<xsl:for-each select="/document/ListMARQUES/ListMARQUE">
								<option value="{Marque}">
									<xsl:if test="/document/OutParams/MARQUE=Marque">
										<xsl:attribute name="selected"/>
									</xsl:if>
									<xsl:value-of select="Marque"/>
									<xsl:if test="/document/XMLC_Params/XMLC_Authenticated != '0' "> (<xsl:value-of select="CptMarque"/>)</xsl:if>
								</option>
							</xsl:for-each>
						</select>
					</td>
					<td/>
				</tr>
			</table>
		</div>
		<table border="0" cellpadding="2" cellspacing="0" class="clFlatTable" width="100%">
			<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>
					<a href="#" onclick="javascript: goSubmitOrder('Mar'); return false;">Marque<xsl:if test="/document/OutParams/ORDERFIELD='Mar'">
							<xsl:if test="/document/OutParams/ORDERSENSE=''">
								<img border="0" src="{$XMLC_PictosPath}ico_stepdouble_top.gif"/>
							</xsl:if>
							<xsl:if test="/document/OutParams/ORDERSENSE=' DESC'">
								<img border="0" src="{$XMLC_PictosPath}ico_stepdouble_bottom.gif"/>
							</xsl:if>
						</xsl:if>
					</a>
				</td>
				<td>
					<a href="#" onclick="javascript: goSubmitOrder('Mod'); return false;">Modèle<xsl:if test="/document/OutParams/ORDERFIELD='Mod'">
							<xsl:if test="/document/OutParams/ORDERSENSE=''">
								<img border="0" src="{$XMLC_PictosPath}ico_stepdouble_top.gif"/>
							</xsl:if>
							<xsl:if test="/document/OutParams/ORDERSENSE=' DESC'">
								<img border="0" src="{$XMLC_PictosPath}ico_stepdouble_bottom.gif"/>
							</xsl:if>
						</xsl:if>
					</a>
				</td>
				<td align="right">
					<a href="#" onclick="javascript: goSubmitOrder('Prix'); return false;">Prix<xsl:if test="/document/OutParams/ORDERFIELD='Prix'">
							<xsl:if test="/document/OutParams/ORDERSENSE=''">
								<img border="0" src="{$XMLC_PictosPath}ico_stepdouble_top.gif"/>
							</xsl:if>
							<xsl:if test="/document/OutParams/ORDERSENSE=' DESC'">
								<img border="0" src="{$XMLC_PictosPath}ico_stepdouble_bottom.gif"/>
							</xsl:if>
						</xsl:if>
					</a>
				</td>
				<td align="center">
					<a href="#" onclick="javascript: goSubmitOrder('DDis'); return false;">Disponibilité<xsl:if test="/document/OutParams/ORDERFIELD='DDis' or /document/OutParams/ORDERFIELD=''">
							<xsl:if test="/document/OutParams/ORDERSENSE=''">
								<img border="0" src="{$XMLC_PictosPath}ico_stepdouble_top.gif"/>
							</xsl:if>
							<xsl:if test="/document/OutParams/ORDERSENSE=' DESC'">
								<img border="0" src="{$XMLC_PictosPath}ico_stepdouble_bottom.gif"/>
							</xsl:if>
						</xsl:if>
					</a>
				</td>
				<td>NVO du stock</td>
			</tr>
			<xsl:apply-templates select="ListVR"/>
			<xsl:call-template name="xslc:ListFooter">
				<xsl:with-param name="URLParams">
					<xsl:if test="/document/OutParams/MARQUE!=''">&amp;MARQUE=<xsl:value-of select="/document/OutParams/MARQUE"/>
					</xsl:if>&amp;ORDERFIELD=<xsl:value-of select="/document/OutParams/ORDERFIELD"/>
					<xsl:if test="/document/OutParams/ORDERSENSE!=''">&amp;ORDERSENSE=<xsl:value-of select="/document/OutParams/ORDERSENSE"/>
					</xsl:if>
				</xsl:with-param>
				<xsl:with-param name="colspan">4</xsl:with-param>
			</xsl:call-template>
		</table>
	</xsl:template>
	<xsl:template match="ListVR">
		<xsl:variable name="clValue">
			<xsl:choose>
				<xsl:when test="position() mod 2 = 1">clRowLight</xsl:when>
				<xsl:otherwise>clRowDark</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<tr class="{$clValue}">
			<td>
				<xsl:value-of select="ReprMarque"/>
			</td>
			<td>
				<xsl:value-of select="ReprModele"/>
			</td>
			<td align="right">
				<xsl:value-of select="ReprPrix"/>    &#32;</td>
			<td align="center">
				<xsl:value-of select="DateDisponibilite"/>
			</td>
			<td>[<xsl:value-of select="Site"/>-<xsl:value-of select="NVO"/>]</td>
		</tr>
	</xsl:template>
</xsl:stylesheet>
