<?xml version="1.0" encoding="ISO-8859-15"?>
<!-- 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: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-VO20100302.xsl"/>
	<xsl:template match="/">
		<xsl:apply-templates select="document"/>
	</xsl:template>
	<xsl:template match="document">
		<html>
			<head>
				<meta http-equiv="Expires" content="0"/>
				<link rel="stylesheet" type="text/css" href="{$XMLC_SkinPath}xslc.css"/>
				<link rel="stylesheet" type="text/css" href="{$XMLC_SkinPath}common.css"/>
				<xsl:call-template name="yui:AutoComplete.Head"/>
				<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) {
//      	setTimeout("setFocus()",10);
      }


}

//setFocusObjectById('InputSearchVO');
//document.getElementById('InputSearchVO').focus()]]>
				</script>
			</head>
			<body onload="donner_focus('InputSearchVO');" style="background:url({$XMLC_Portal}Pictos/backframe.png) repeat-x top left; ">
				<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}"/>
				</form>
				<table cellpadding="0" cellspacing="0" height="100%" width="100%">
					<tr height="8px">
						<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:125px">
								<option value="1" style="color:blue">
									<xsl:if test="/document/OutParams/TypeSearch=1">
										<xsl:attribute name="selected"/>
									</xsl:if>Immatriculation</option>
								<option value="2" style="color:blue">
									<xsl:if test="/document/OutParams/TypeSearch=2">
										<xsl:attribute name="selected"/>
									</xsl:if>Acheteur</option>
								<option value="3" style="color:blue">
									<xsl:if test="/document/OutParams/TypeSearch=3">
										<xsl:attribute name="selected"/>
									</xsl:if>N° Véhicule</option>
								<xsl:if test="/document/XMLC_Params/XMLC_UserName='llebleu@free.fr'">
									<option value="4" style="color:orange">
										<xsl:if test="/document/OutParams/TypeSearch=4">
											<xsl:attribute name="selected"/>
										</xsl:if>BProFid - N° Immat</option>
									<option value="5" style="color:orange">
										<xsl:if test="/document/OutParams/TypeSearch=5">
											<xsl:attribute name="selected"/>
										</xsl:if>BProFid - Nom Client</option>
									<option value="6" style="color:orange">
										<xsl:if test="/document/OutParams/TypeSearch=6">
											<xsl:attribute name="selected"/>
										</xsl:if>BProFid - Mobile</option>
									<option value="7" style="color:orange">
										<xsl:if test="/document/OutParams/TypeSearch=7">
											<xsl:attribute name="selected"/>
										</xsl:if>BProFid - Téléphone</option>
								</xsl:if>
							</select>
						</td>
					</tr>
					<tr>
						<td align="right">Type Véhicule: </td>
						<td>
							<select id="CBTypeVO" name="CBTypeVO" onchange="javascript: document.MainForm.SVOTypeVO.value=getObjectById('CBTypeVO').value; document.MainForm.submit(); return false;" style="width:125px">
								<option value="0" style="color:blue">
									<xsl:if test="/document/OutParams/TypeVO=0">
										<xsl:attribute name="selected"/>
									</xsl:if>Tous Véhicules</option>
								<option value="3" style="color:blue">
									<xsl:if test="/document/OutParams/TypeVO=3">
										<xsl:attribute name="selected"/>
									</xsl:if>VD</option>
								<option value="2" style="color:blue">
									<xsl:if test="/document/OutParams/TypeVO=2">
										<xsl:attribute name="selected"/>
									</xsl:if>VN</option>
								<option value="1" style="color:blue">
									<xsl:if test="/document/OutParams/TypeVO=1">
										<xsl:attribute name="selected"/>
									</xsl:if>VO</option>
							</select>
						</td>
					</tr>
					<tr>
						<td align="right">Site : </td>
						<td>
							<select id="CBSITE" onchange="javascript: document.MainForm.SVOSITE.value=getObjectById('CBSITE').value; document.MainForm.submit(); return false;">
								<option value="ALL" style="color:blue">Tous Sites</option>
								<xsl:for-each select="/document/ListSITES/ListSITE">
									<xsl:sort select="Site"/>
									<option value="{Site}" style="color:blue">
										<xsl:if test="/document/OutParams/SITE=Site">
											<xsl:attribute name="selected"/>
										</xsl:if>
										<xsl:value-of select="Site"/>
									</option>
								</xsl:for-each>
							</select>
						</td>
					</tr>
					<xsl:call-template name="yui:AutoComplete">
						<xsl:with-param name="Name">InputSearchVO</xsl:with-param>
						<xsl:with-param name="InputAttributes">
							<Attributes size="18"/>
						</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&gt;&lt;tr&gt;&lt;td width="115px"&gt;&lt;img border="0" src="<xsl:value-of select="$XMLC_PictosPath"/>
							<FieldName>VO_Icon</FieldName>.gif"/&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;/td&gt;&lt;td width="75px"&gt;<span style="color:purple">
								<FieldName>VO_ORDRE</FieldName>
							</span>&lt;/td&gt;&lt;td width="80px"&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;/td&gt;&lt;td width="120px"&gt;<span style="color:purple">
								<FieldName>VO_DESC</FieldName>
							</span>&lt;/td&gt;&lt;td width="130px"&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;/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-VO20100302.xsl
if (datas[2]!=0) {

if (getObjectById('CBsearch').value &gt;3) 
parent.PopFormAxVO('FormVO', '0&amp;idClient='+datas[1]);

if (getObjectById('CBsearch').value &lt;4) 
parent.PopFormAxVO('FormVO', datas[1]);

  parent.ShowHide('YuiSearch'); return false;
 }</xsl:with-param>
					</xsl:call-template>
				</table>
			</body>
		</html>
	</xsl:template>
</xsl:stylesheet>
