<%
/******************************************************************************
 * Copyright (c) 2000-2005 e-Deal
 *
 * e-Deal S.A.
 * 55 rue Brillat Savarin
 * 75013 Paris
 * France
 *
 * T: +33 (0)1 53 80 80 30
 * F: +33 (0)1 73 01 69 77
 * http://www.e-deal.com
 * 
 * La diffusion de ce code source sous quelque forme que ce soit sans
 * l'autorisation de E-DEAL est interdite.
 *
 * Vous êtes autorisés à modifier ce code source uniquement pour votre usage
 * propre et sous réserve que les mentions de copyright demeurent intactes.
 *
 * Ce code est fourni en l'état. Aucune garantie d'aucune sorte, explicite ou
 * implicite n'est donnée. En aucun cas E-DEAL ne pourra être tenu pour
 * responsable des dommages pouvant résulter de l'utilisation de ce code
 * source.
 ******************************************************************************/
%>
<%@page session="true"%>
<%@ page import="com.edeal.frontline.navigation.FlRequest" %>
<%@ page import="com.edeal.frontline.FlContext" %>
<%@ page import="com.edeal.frontline.FieldNotInitializedException" %>
<%@ page import="java.util.Date" %>
<%@ page import="com.edeal.frontline.Utils" %>
<%@ page import="com.edeal.frontline.DataDictionary" %>
<%@ page import="com.edeal.frontline.CampaignBean" %>
<%@ page import="java.util.Vector" %>
<%@ page import="java.util.Hashtable" %>
<%@ page import="com.edeal.frontline.StageBean" %>
<%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %>
<jsp:useBean class="com.edeal.frontline.StageBean" id="Stage" scope="request"/>
<%
	final org.apache.commons.logging.Log logger = org.apache.commons.logging.LogFactory.getLog(getClass());
	FlRequest flRequest = new FlRequest(request);
	FlContext context = flRequest.getContext();
	DataDictionary dico = context.getDataDictionary();

	String id = null;
	try {
		id = Stage.getID();
	} catch (FieldNotInitializedException fnie) {
	}

	Hashtable campaign = (Hashtable)request.getAttribute("campaign");
	if (campaign == null) {
		campaign = new Hashtable();
	}

	Date dateDeb = (Date)campaign.get("CpgDateBeg");
	Date dateFin = (Date)campaign.get("CpgDateEnd");

	// Intitulés des indicateurs par defaut
	String defIndic1, defIndic2, defIndic3, defIndic4, defIndic5;

	// Unités des indicateurs par defaut
	String defIndicUnit1, defIndicUnit2, defIndicUnit3, defIndicUnit4, defIndicUnit5;

	// Version javascript		
	String defIndic1JS, defIndic2JS, defIndic3JS, defIndic4JS, defIndic5JS;
	
	if (campaign != null) {
		defIndic1 = (String)campaign.get("CpgIndicLabel1");
		defIndic2 = (String)campaign.get("CpgIndicLabel2");
		defIndic3 = (String)campaign.get("CpgIndicLabel3");
		defIndic4 = (String)campaign.get("CpgIndicLabel4");
		defIndic5 = (String)campaign.get("CpgIndicLabel5");
	
		defIndicUnit1 = (String)campaign.get("CpgIndicUnit1");
		defIndicUnit2 = (String)campaign.get("CpgIndicUnit2");
		defIndicUnit3 = (String)campaign.get("CpgIndicUnit3");
		defIndicUnit4 = (String)campaign.get("CpgIndicUnit4");
		defIndicUnit5 = (String)campaign.get("CpgIndicUnit5");
			
		defIndic1JS = Utils.formatToJavascript(defIndic1);
		defIndic2JS = Utils.formatToJavascript(defIndic2);
		defIndic3JS = Utils.formatToJavascript(defIndic3);
		defIndic4JS = Utils.formatToJavascript(defIndic4);
		defIndic5JS = Utils.formatToJavascript(defIndic5);
	} else {
		defIndic1 = defIndic2 = defIndic3 = defIndic4 = defIndic5 = "";
		defIndicUnit1 = defIndicUnit2 = defIndicUnit3 = defIndicUnit4 = defIndicUnit5 = "";
		defIndic1JS = defIndic2JS = defIndic3JS = defIndic4JS = defIndic5JS = "";
	}
	try {
		Stage.getStgIndicLabel1();
	} catch (FieldNotInitializedException fnie) {
		Stage.setStgIndicLabel1(defIndic1);
	}
	try {
		Stage.getStgIndicLabel2();
	} catch (FieldNotInitializedException fnie) {
		Stage.setStgIndicLabel2(defIndic2);
	}
	try {
		Stage.getStgIndicLabel3();
	} catch (FieldNotInitializedException fnie) {
		Stage.setStgIndicLabel3(defIndic3);
	}
	try {
		Stage.getStgIndicLabel4();
	} catch (FieldNotInitializedException fnie) {
		Stage.setStgIndicLabel4(defIndic4);
	}
	try {
		Stage.getStgIndicLabel5();
	} catch (FieldNotInitializedException fnie) {
		Stage.setStgIndicLabel5(defIndic5);
	}
	try {
		Stage.getStgIndicUnit1();
	} catch (FieldNotInitializedException fnie) {
		Stage.setStgIndicUnit1(defIndicUnit1);
	}
	try {
		Stage.getStgIndicUnit2();
	} catch (FieldNotInitializedException fnie) {
		Stage.setStgIndicUnit2(defIndicUnit2);
	}
	try {
		Stage.getStgIndicUnit3();
	} catch (FieldNotInitializedException fnie) {
		Stage.setStgIndicUnit3(defIndicUnit3);
	}
	try {
		Stage.getStgIndicUnit4();
	} catch (FieldNotInitializedException fnie) {
		Stage.setStgIndicUnit4(defIndicUnit4);
	}
	try {
		Stage.getStgIndicUnit5();
	} catch (FieldNotInitializedException fnie) {
		Stage.setStgIndicUnit5(defIndicUnit5);
	}
	
	Vector units = dico.getRefCodeList("StgIndicUnit1");
	String errorMessageGen = Utils.getMessage(session, "M2003", true, "Le format du champ est incorrect, veuillez corriger.");
	String onChangeBeg = "ctrlDateField(this, '" + errorMessageGen + "'); doCompareDate2(); doCompareDate(this.value , '" + Utils.formatToWebDate(session, dateDeb, false) + "')";
	String onChangeEnd = "ctrlDateField(this, '" + errorMessageGen + "'); doCompareDate2(); doCompareDate('" + Utils.formatToWebDate(session, dateFin, false) + "', this.value)";
%>
<script>
function doSubmit() {

	var mf = document.forms[0];
	if (mf.StgDateBeg.value!="" && mf.StgDateEnd.value!="" && compareDate(mf.StgDateBeg.value,'',mf.StgDateEnd.value,'') > 0) {
		window.alert("<fl:getMessage code="M0021" alt="La date de début doit être infèrieure à la date de fin." js="true"/>");
		mf.StgDateEnd.focus();
		return false;
	}
	
	return true;
}
</script>

<fl:form action="/save_stage.fl" bean="Stage">
<input type="hidden" name="StgCpgID" value="<fl:getProperty name="Stage" property="StgCpgID" alt=""/>">
<fl:bigTabs objectTitle="<%= Utils.getMessage(session, \"L3046\", \"Etape\") %>" listTitle="<%= Utils.getMessage(session, \"L646F\", \"Liste des étapes\") %>" ou="<%= \"/edit_stage.fl\" + (id != null ? \"?id=\" + id : \"\") %>">
	<table class="container" cellpadding="0">
		<tr>
			<td>
				<table class="container" cellpadding="0">
					<tr>
						<td class="labelTitreFiche"><fl:label field="StgTitle" labelClassName="titreFiche"/></td>
						<td class="fieldTitreFiche"><fl:input property="StgTitle" mandatoryMsgCode="M2002"/></td>
					</tr>
				</table>
			</td>
		</tr>
		<tr class="ligne_separation"><td></td></tr>
	</table>
	<table class="container" cellpadding="0">	
		<tr>
			<td class="column2">
				<table class="container" cellpadding="0">
					<fl:fieldEdit property="StgCode" mandatoryMsgCode="M2001"/>
					<fl:fieldEdit property="StgCpgID"/>
					<fl:fieldEdit property="StgEvtID"/>
				</table>
			</td>
			<td class="separation"><div class="separation"></div></td>
			<td class="column2">
				<table class="container" cellpadding="0">
					<fl:fieldEdit property="StgDateBeg" onchange="<%= onChangeBeg %>"/>
					<fl:fieldEdit property="StgDateEnd" onchange="<%= onChangeEnd %>"/>
					<fl:fieldEdit property="StgEnd"/>
				</table>
			</td>
		</tr>
		<tr class="ligne_separation"><td colspan="4"></td></tr>
	</table>
	<table class="container" cellpadding="0">
		<tr class="ligne_separation"><td></td></tr>
		<tr>
			<td class="titrePartie">
				<fl:getMessage code="L2007" alt="Description"/>
			</td>
		</tr>
	</table>
	<table class="container" cellpadding="0">
		<tr>
			<td class="dataValue noPaddingLeft">
				<fl:input property="StgDescr" nodiv="false"/>
			</td>
		</tr>
	</table>
	<table class="container" cellpadding="0">
		<tr class="ligne_separation"><td></td></tr>		
		<tr class="ligne_separation_couleur"><td></td></tr>
		<tr class="ligne_separation"><td></td></tr>
	</table>
	<link href="<fl:webapp/>/css/smalltabs_css.jsp" rel="stylesheet" type="text/css">
	
	<fl:smallTabs name="SimulationTabs">
		<fl:sTab id="POP" title="<%= Utils.getMessage(session, \"F000C\", false, true, \"Population\") %>">
		<table class="container" cellpadding="0">
				<tr>
					<td class="column2">
						<table class="data_column" cellpadding="0">
							<td class="dataLabel" style="width: auto"><fl:getMessage code="F000C" alt="Population"/></td>
							<td class="dataValue" colspan="4"><fl:input property="StgPopID"/></td>
						</table>
					</td>
					<td class="separation"><div class="separation"></div></td>
					<td class="column2"></td>
				</tr>
				<tr class="ligne_separation"></tr>
			</table> 
			<div id="tab2">
			<table class="container" cellpadding="0" width="100%">
			<thead>
			
			<tr>
				<td class="headerDataGrid" style="">&nbsp;</td>
				<td class="headerDataGrid"><fl:getMessage code="F2008" alt="Prévisionnel"/></td>
				<td class="headerDataGrid"><fl:getMessage code="F2009" alt="Réel"/></td>
				<td class="headerDataGrid"><fl:getMessage code="L200A" alt="Ecart"/></td>
			</tr>
			</thead>
			<tbody>
				<tr class="tabSimpleFdBleu">
					<td class="dataValue" style="width:25%;">
						<fl:getMessage code="L311E" alt="Nb contacts"/>
					</td>
					<td class="dataValue" style="width:20%; text-align: right;">
						<INPUT NAME="StgContactEst" class="input number" VALUE="<fl:getProperty name="Stage" property="StgContactEst" alt="" edit="true" format="#,##0"/>" onBlur="ctrlNumField(this , 'integer', '<%= errorMessageGen %>');doCalculBudget(this)">
					</td>
					<td class="dataValue" style="width:20%; text-align: right;">
						<INPUT NAME="StgContactReal" class="input number" VALUE="<fl:getProperty name="Stage" property="StgContactReal" alt="" edit="true" format="#,##0"/>" onBlur="ctrlNumField(this , 'integer', '<%= errorMessageGen %>');doCalculBudget(this)">
					</td>
					<td class="dataValue"  style="width:35%; text-align: right;">
						<input name="PopuEcartNb" value="" class="input number" size="5" onFocus="this.blur()" readonly="readonly" style="width:40%;"> : <input name="PopuEcartP" class="input number" size="5" value="" onFocus="this.blur();" readonly="readonly" style="width:40%;">&nbsp;%
					</td>		
				</tr>
				</tbody>
			</table>
			</div>
		</fl:sTab>
		<fl:sTab id="STAGE1" title="<%= context.getAutoDisplayManager().getTitle(session, \"Stage\", \"Etape 1\") %>" visible="<%= context.getAutoDisplayManager().hasEntry(\"Stage\", \"Etape 1\") %>">
			<fl:autodisplay name="Stage" zone="Etape 1" edit="true"/>
		</fl:sTab>
		<fl:sTab id="BUDGET" title="<%= Utils.getMessage(session, \"L2009\", false, true, \"Budget\") %>">
			<table class="container" cellpadding="0">
				<tr>
					<td class="headerDataGrid" style="width: 30%;">&nbsp;</td>
					<td class="headerDataGrid" style="width: 20%;"><fl:getMessage code="F2008" alt="Prévisionnel"/></td>
					<td class="headerDataGrid" style="width: 20%;"><fl:getMessage code="F2009" alt="Réel"/></td>
					<td class="headerDataGrid" style="width: 30%;"><fl:getMessage code="L200A" alt="Ecart"/></td>
				</tr>
				
				<tr class="tabSimpleFdBleu">
				
					<td>
						<fl:getMessage code="L3120" alt="Coûts fixes"/>
					</td>
					<td style="text-align: right;">
						<fl:input postText="&nbsp;&euro;" property="StgFixedCostEst" format="#,##0.00;- #,##0.00" onblur="ctrlNumField(this , 'float', '<%= errorMessageGen %>');doCalculBudget(this)" nodiv="true"/>
					</td>
					
					
					<td style="text-align: right;">
						<fl:input postText="&nbsp;&euro;" property="StgFixedCostReal" format="#,##0.00;- #,##0.00" onblur="ctrlNumField(this , 'float', '<%= errorMessageGen %>');doCalculBudget(this)" nodiv="true"/>
					</td>
					
					
					<td style="text-align: right;">
					  <input name="CFEcartF" value="" class="input number" size="6" onFocus="this.blur()"> &euro; : <input name="CFEcartP" value="" class="input number" size="6" onFocus="this.blur()"> %
					</td>
				</tr>
				
				<tr class="tabSimpleFdBlanc">
					<td>
						<fl:getMessage code="L3121" alt="Coûts contact"/>
					</td>
					<td style="text-align: right;">
						<fl:input postText="&nbsp;&euro;" property="StgContactCostEst" format="#,##0.00;- #,##0.00" onblur="ctrlNumField(this , 'float', '<%= errorMessageGen %>');doCalculBudget(this)" nodiv="true"/>
					</td>
					
					
					<td style="text-align: right;">
						<fl:input postText="&nbsp;&euro;" property="StgContactCostReal" format="#,##0.00;- #,##0.00" onblur="ctrlNumField(this , 'float', '<%= errorMessageGen %>');doCalculBudget(this)" nodiv="true"/>
					</td>
					
					<td style="text-align: right;">
							<input name="CCEcartF" value="" class="input number" size="6" onfocus="this.blur()" readonly="readonly"> &euro; : <input name="CCEcartP" value="" class="input number" size="6" onFocus="this.blur()" readonly="readonly"> %
					</td>
				</tr>
				
				<tr class="tabSimpleFdBleu">
					<td>
						<fl:getMessage code="F1058" alt="Total"/>
					</td>
					<td style="text-align: right;">
						<table class="fieldTable">
							<tr valign="top">
								<td class="principalText"><input name="CCPrevTot" value="" class="input number" onfocus="this.blur()" readonly="readonly"></td>
								<td class="postText">&nbsp;&nbsp;&euro;</td>
							</tr>
						</table>
					</td>
					
					<td style="text-align: right;">
						<table class="fieldTable">
							<tr valign="top">
								<td class="principalText"><input name="CCReelTot" value="" class="input number" onfocus="this.blur()" readonly="readonly"></td>
								<td class="postText">&nbsp;&nbsp;&euro;</td>
							</tr>
						</table>
					</td>
											
					<td style="text-align: right;">
						<input name="CCEcartTF" value="" class="input number" size="6" onfocus="this.blur();" readonly="readonly"> &euro; : <input name="CCEcartTP" value="" class="input number" size="6" onfocus="this.blur();" readonly="readonly"> %
					</td>
				</tr>
			</table>
		</fl:sTab>
		<fl:sTab id="INDIC" title="<%= Utils.getMessage(session, \"L620C\", false, true, \"Indicateurs\") %>">
			<table class="container" cellpadding="0">
				<tr class="fieldline">
					<td class="headerDataGrid" style="width: 35%;"></td>
					<td class="headerDataGrid" style="width: 20%;" nowrap><fl:getMessage code="F2008" alt="Prévisionnel"/></td>
					<td class="headerDataGrid" style="width: 20%;" nowrap><fl:getMessage code="F2009" alt="Réel"/></td>
					<td class="headerDataGrid" style="width: 25%;" nowrap><fl:getMessage code="L200A" alt="Ecart"/></td>
				</tr>
				
				<tr class="tabSimpleFdBleu">
					<td>
						<input NAME="StgIndicLabel1" class="input text" VALUE="<fl:getProperty name="Stage" property="StgIndicLabel1" alt="<%=defIndic1%>" edit="true"/>" SIZE="25" maxlength="100" onBlur="if(this.value=='')this.value='<%=defIndic1JS%>';">
						<select name="StgIndicUnit1" class="input select auto">
							<% for (int i = 0; i < units.size(); i++) { 
								String idInd = (String)((Vector)units.elementAt(i)).elementAt(0);
								String display = (String)dico.getRefDisp(session, "StgIndicUnit1", idInd);
								if (display == null) {
									display = "";
								}
								String selected = "";
								try { selected = idInd.equals(Stage.getStgIndicUnit1()) ? " selected" : ""; }
								catch (FieldNotInitializedException e) {}
								%>
								<OPTION VALUE="<%= idInd %>"<%= selected %>><%= display %></OPTION>
								<%
							}	
							%>
						</select>
					</td>
					<td style="text-align: right;">
						<INPUT NAME="StgIndicEst1" class="input number" VALUE="<fl:getProperty name="Stage" property="StgIndicEst1" alt="" edit="true" format="#,##0.##;- #,##0.##"/>" SIZE="15" onBlur="ctrlNumField(this , 'float', '<fl:getMessage code="M2000" alt="Format du champs est incorrect" js="true"/>');doCalculResultat(this)">
					</td>
					<td style="text-align: right;">
						<INPUT NAME="StgIndicReal1" class="input number" VALUE="<fl:getProperty name="Stage" property="StgIndicReal1" alt="" edit="true" format="#,##0.##;- #,##0.##"/>" SIZE="15" onBlur="ctrlNumField(this , 'float', '<fl:getMessage code="M2000" alt="Format du champs est incorrect" js="true"/>');doCalculResultat(this)">
					</td>
					<td style="text-align: right;">
							<input name="QEcartN" value="" class="input number" size="6" onfocus="this.blur()" readonly="readonly"> : 
							<input name="QEcartP" value="" class="input number" size="6" onfocus="this.blur()" readonly="readonly"> %
					</td>
				</tr>
				
				<tr class="tabSimpleFdBlanc">
					<td>
						<input NAME="StgIndicLabel2" class="input text" VALUE="<fl:getProperty name="Stage" property="StgIndicLabel2" alt="<%= defIndic2 %>" edit="true"/>" SIZE="25" maxlength="100" onBlur="if(this.value=='')this.value='<%= defIndic2JS %>';">
						<select name="StgIndicUnit2" class="input select auto">
							<% for (int i=0 ; i<units.size() ; i++) { 
								String idInd = (String)((Vector)units.elementAt(i)).elementAt(0);
								String display = (String)dico.getRefDisp(session, "StgIndicUnit2", idInd);
								if (display == null) {
									display = "";
								}
								String selected = "";
								try { selected = idInd.equals(Stage.getStgIndicUnit2()) ? " selected" : ""; }
								catch (FieldNotInitializedException e) {}
								%>
								<OPTION VALUE="<%= idInd %>"<%= selected %>><%= display %></OPTION>
								<%
							}	
							%>
						</select>
					</td>
					<td style="text-align: right;"><INPUT NAME="StgIndicEst2" class="input number" VALUE="<fl:getProperty name="Stage" property="StgIndicEst2" alt="" edit="true" format="#,##0.##;- #,##0.##"/>" SIZE="15" onBlur="ctrlNumField(this , 'float', '<fl:getMessage code="M2000" alt="Format du champs est incorrect" js="true"/>');doCalculResultat(this)"></td>
					<td style="text-align: right;"><INPUT NAME="StgIndicReal2" class="input number" VALUE="<fl:getProperty name="Stage" property="StgIndicReal2" alt="" edit="true" format="#,##0.##;- #,##0.##"/>" SIZE="15" onBlur="ctrlNumField(this , 'float', '<fl:getMessage code="M2000" alt="Format du champs est incorrect" js="true"/>');doCalculResultat(this)"></td>
					<td style="text-align: right;">
							<input name="LEcartN" value="" class="input number" size="6" onfocus="this.blur()" readonly="readonly"> : 
							<input name="LEcartP" value="" class="input number" size="6" onfocus="this.blur()" readonly="readonly"> %
					</td>
				</tr>
				
				<tr class="tabSimpleFdBleu">
					<td>
						<input NAME="StgIndicLabel3" class="input text" VALUE="<fl:getProperty name="Stage" property="StgIndicLabel3" alt="<%= defIndic3 %>" edit="true"/>" SIZE="25" maxlength="100" onBlur="if(this.value=='')this.value='<%= defIndic3JS %>';">
						<select name="StgIndicUnit3" class="input select auto">
							<% for (int i=0 ; i<units.size() ; i++) { 
								String idInd = (String)((Vector)units.elementAt(i)).elementAt(0);
								String display = (String)dico.getRefDisp(session, "StgIndicUnit3", idInd);
								if (display == null) {
									display = "";
								}
								String selected = "";
								try { selected = idInd.equals(Stage.getStgIndicUnit3()) ? " selected" : ""; }
								catch (FieldNotInitializedException e) {}
								%>
								<OPTION VALUE="<%= idInd %>"<%= selected %>><%= display %></OPTION>
								<%
							}	
							%>
						</select>
					</td>
					<td style="text-align: right;"><INPUT NAME="StgIndicEst3" class="input number" VALUE="<fl:getProperty name="Stage" property="StgIndicEst3" alt="" edit="true" format="#,##0.##;- #,##0.##"/>" SIZE="15" onBlur="ctrlNumField(this , 'float', '<fl:getMessage code="M2000" alt="Format du champs est incorrect" js="true"/>');doCalculResultat(this)"></td>
					<td style="text-align: right;"><INPUT NAME="StgIndicReal3" class="input number" VALUE="<fl:getProperty name="Stage" property="StgIndicReal3" alt="" edit="true" format="#,##0.##;- #,##0.##"/>" SIZE="15" onBlur="ctrlNumField(this , 'float', '<fl:getMessage code="M2000" alt="Format du champs est incorrect" js="true"/>');doCalculResultat(this)"></td>
					<td style="text-align: right;">
							<input name="REcartN" value="" class="input number" size="6" onfocus="this.blur()" readonly="readonly"> : 
							<input name="REcartP" value="" class="input number" size="6" onfocus="this.blur()" readonly="readonly"> %
					</td>
				</tr>
				
				<tr class="tabSimpleFdBlanc">
					<td>
						<input NAME="StgIndicLabel4" class="input text" VALUE="<fl:getProperty name="Stage" property="StgIndicLabel4" alt="<%= defIndic4 %>" edit="true"/>" SIZE="25" maxlength="100" onBlur="if(this.value=='')this.value='<%= defIndic4JS %>';">
						<select name="StgIndicUnit4" class="input select auto">
							<% for (int i=0 ; i<units.size() ; i++) { 
								String idInd = (String)((Vector)units.elementAt(i)).elementAt(0);
								String display = (String)dico.getRefDisp(session, "StgIndicUnit4", idInd);
								if (display == null) {
									display = "";
								}
								String selected = "";
								try { selected = idInd.equals(Stage.getStgIndicUnit4()) ? " selected" : ""; }
								catch (FieldNotInitializedException e) {}
								%>
								<OPTION VALUE="<%= idInd %>"<%= selected %>><%= display %></OPTION>
								<%
							}	
							%>
						</select>
					</td>
					<td style="text-align: right;"><INPUT NAME="StgIndicEst4" class="input number" VALUE="<fl:getProperty name="Stage" property="StgIndicEst4" alt="" edit="true" format="#,##0.##;- #,##0.##"/>" SIZE="15" onBlur="ctrlNumField(this , 'float', '<fl:getMessage code="M2000" alt="Format du champs est incorrect" js="true"/>');doCalculResultat(this)"></td>
					<td style="text-align: right;"><INPUT NAME="StgIndicReal4" class="input number" VALUE="<fl:getProperty name="Stage" property="StgIndicReal4" alt="" edit="true" format="#,##0.##;- #,##0.##"/>" SIZE="15" onBlur="ctrlNumField(this , 'float', '<fl:getMessage code="M2000" alt="Format du champs est incorrect" js="true"/>');doCalculResultat(this)"></td>
					<td style="text-align: right;">
							<input name="CEcartN" value="" class="input number" size="6" onfocus="this.blur()" readonly="readonly"> : 
							<input name="CEcartP" value="" class="input number" size="6" onfocus="this.blur()" readonly="readonly"> %
					</td>
				</tr>
				
				<tr class="tabSimpleFdBleu">
					<td>
						<input NAME="StgIndicLabel5" class="input text" VALUE="<fl:getProperty name="Stage" property="StgIndicLabel5" alt="<%= defIndic5 %>" edit="true"/>" SIZE="25" maxlength="100" onBlur="if(this.value=='')this.value='<%= defIndic5JS %>';">
						<select name="StgIndicUnit5" class="input select auto">
							<% for (int i=0 ; i<units.size() ; i++) { 
								String idInd = (String)((Vector)units.elementAt(i)).elementAt(0);
								String display = (String)dico.getRefDisp(session, "StgIndicUnit5", idInd);
								if (display == null) {
									display = "";
								}
								String selected = "";
								try { selected = idInd.equals(Stage.getStgIndicUnit5()) ? " selected" : ""; }
								catch (FieldNotInitializedException e) {}
								%>
								<OPTION VALUE="<%= idInd %>"<%= selected %>><%= display %></OPTION>
								<%
							}	
							%>
						</select>
					</td>
					<td style="text-align: right;"><INPUT NAME="StgIndicEst5" class="input number" VALUE="<fl:getProperty name="Stage" property="StgIndicEst5" alt="" edit="true" format="#,##0.##;- #,##0.##"/>" SIZE="15" onBlur="ctrlNumField(this , 'float', '<fl:getMessage code="M2000" alt="Format du champs est incorrect" js="true"/>');doCalculResultat(this)"></td>
					<td style="text-align: right;"><INPUT NAME="StgIndicReal5" class="input number" VALUE="<fl:getProperty name="Stage" property="StgIndicReal5" alt="" edit="true" format="#,##0.##;- #,##0.##"/>" SIZE="15" onBlur="ctrlNumField(this , 'float', '<fl:getMessage code="M2000" alt="Format du champs est incorrect" js="true"/>');doCalculResultat(this)"></td>
					<td style="text-align: right;">
							<input name="CaEcartN" value="" class="input number" size="6" onfocus="this.blur()" readonly="readonly"> : 
							<input name="CaEcartP" value="" class="input number" size="6" onfocus="this.blur()" readonly="readonly"> %
					</td>
				</tr>
			</table>
		</fl:sTab>
		<fl:sTab id="ATTACHMENT" title="<%= Utils.getMessage(session, \"L201C\", false, true, \"Documents joints\") %>">
			<fl:attach name="Stage" colID="StgAttID" />
		</fl:sTab>
	</fl:smallTabs>
</fl:bigTabs>
</fl:form>
