<%@page import="java.util.*,javax.sql.*,java.sql.*,javax.naming.*,java.text.*, m05bClasses.*" %>
<!-- Para poder mostrar caracteres especiales en los mensajes javascript -->
<%@page contentType="text/html; charset=UTF-8" %>

<HTML>	

<%
	// _______________________________XLNETs______________________________________
	// Evaluar variable de session que indica si esta conectado a XLNets
	if (session.getAttribute("objetoSeguridad") == null)  { 
		// Verificar que no ha transcurrido el tiempo de sesion (web.xml) %>
			<%@ include file="/m05bControlAcceso.inc"%> 
<%
	} 
	String persona = (String) session.getAttribute("persona");
%>
	<%@ include file="/m05bIdioma.inc"%>
	
<!-- Fecha de creacion: (02/03/05) -->


<head>
		<title><%= resTit.getString("titCTKResultado")%></title>
		<link rel="stylesheet" href="<%=m05bConstantesPaginas.PATH_ESTILOS%>/m05bestilos.css" type="text/css">
		<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
		<script language="JavaScript" src="<%=m05bConstantesPaginas.PATH_SCRIPTS%>/m05bMenuClic.js"></script>
		<script language="javascript1.2" src="<%=m05bConstantesPaginas.PATH_SCRIPTS%>/formateador.js"></script>
		<script language="javascript1.2" src="<%=m05bConstantesPaginas.PATH_SCRIPTS%>/m05Funciones.js"></script>
</head>
<BODY style="cursor: wait" onkeydown="cancelaEnter();" onload="document.body.style.cursor='default';InitMenu();"  onunload="document.body.style.cursor='wait';">
<%


	int [] total = new int[6];
	double [] media = new double[6];
	int [] km = new int[6];
	double [] amort = new double[6];
	double [] combus = new double[6];

	int [] interv = new int[6];
	double [] reparto = new double[6];
	double [] otros = new double[6];
	double [] extern = new double[6];

	double [] renting = new double[3];
	int sumTotal=0, sumKm=0, sumInterv=0;
	int i;
	double sumRepartos = 0;

	String intervObs="", otrosObs="", externObs="";
	String rentingObs="";

	String mensaje = request.getParameter("Mensaje")==null?"":request.getParameter("Mensaje");
	String fDesde=request.getParameter("Desde");
	String fHasta=request.getParameter("Hasta");
	String totalObs="", mediaObs="", kmObs="", amortObs="", combusObs="";

	m05bComun miComun = new m05bComun();
	m05bFileLog miLog = new m05bFileLog();
	m05bCalcularCTK miCTK = new m05bCalcularCTK();

try {

	miLog.addTraza(persona, "Resultado CTK JSP", "DESDE: " + fDesde + " - HASTA: " + fHasta, m05bConstantes.LOG_NIVEL_MEDIO);

	if (!mensaje.equals("Temporal"))  {
		// Carga de tabla temporal
		miLog.addTraza(persona, "Resultado CTK JSP", "ANTES CARGAR TEMPORAL", m05bConstantes.LOG_NIVEL_MEDIO);
		miCTK.cargarTempGral(persona,fDesde,fHasta);
		miLog.addTraza(persona, "Resultado CTK JSP", "DESPUES CARGAR TEMPORAL", m05bConstantes.LOG_NIVEL_MEDIO);
	}
	// CALCULO CTK
	total = miCTK.getTotalRango(persona);
	sumTotal=total[0]+total[1]+total[2]+total[3]+total[4]+total[5];
	media = miCTK.getMediaRango(persona);
	/*media[0]=Double.parseDouble(miComun.formatearDblDecimales((double)media[0]));
	media[1]=Double.parseDouble(miComun.formatearDblDecimales((double)media[1]));
	media[2]=Double.parseDouble(miComun.formatearDblDecimales((double)media[2]));
	media[3]=Double.parseDouble(miComun.formatearDblDecimales((double)media[3]));
	media[4]=Double.parseDouble(miComun.formatearDblDecimales((double)media[4]));*/
	km = miCTK.getKmRango(persona);
	sumKm=km[0]+km[1]+km[2]+km[3]+km[4]+km[5];
	amort = miCTK.getAmortRango(persona);
	combus = miCTK.getCombusRango(persona);
	interv = miCTK.getIntervRango(persona);
	sumInterv=interv[0]+interv[1]+interv[2]+interv[3]+interv[4]+interv[5];
	for(i=0;i<6;++i) {
		if (sumInterv >0 ) {
				reparto[i]=10000*interv[i]/sumInterv;
				reparto[i]=reparto[i]/100;
		}
	}
	otros = miCTK.getGastosTP(persona);
	extern = miCTK.getGastosTE(persona);
	renting = miCTK.getRenting(persona, fDesde, fHasta);
	sumRepartos = reparto[0] + reparto[1] +reparto[2] +reparto[3] + reparto[4] + reparto[5];
} catch( Exception ex) {
	miLog.addTraza(persona, "Resultado CTK", "FIN CALCULO CTK POR CATCH: " + ex, m05bConstantes.LOG_NIVEL_MEDIO);
} finally {
	miLog.addTraza(m05bConstantes.LOG_NO_USER, m05bConstantes.LOG_NO_SRC, "FIN CALCULO CTK POR FINALLY", m05bConstantes.LOG_NIVEL_MEDIO);
}
%>
 <SCRIPT language=JavaScript>
	var urlIdioma;		//URL recarga en funcion del idioma	var urlIdioma;
	var detPadre;		//Ventana padre de la actual
	var detActual;		//Ventana actual
	var rutaCabecera;	//Camino de migas
	urlIdioma = "<%=m05bConstantesPaginas.LST_CTK_RESULTADO%>?Desde=<%=fDesde%>&Hasta=<%=fHasta%>&Mensaje=Temporal";
	detPadre = '<%=resCM.getString("cmCTK")%>';
	rutaCabecera = "<%=m05bConstantesPaginas.DATOS_CABECERA%><%=m05bConstantesPaginas.LST_CTK%>" + "'>\\"+detPadre+"</a>";
	detActual = '<%=resCM.getString("cmCTKResultado")%>';
	//rutaCabecera += "<%=m05bConstantesPaginas.DATOS_CABECERA%>" + urlIdioma + "'>\\"+detActual+"</a>";
 </SCRIPT>
 <%@include file="/mantenimientosJSP/includes/m05Cabecera_c.jsp"%>
<%
	String situacion = "";
%>
<p>
<table  width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" align="center">
	<tr>
		<td width="2%">
			<DIV ID="thessm" style="visibility:hidden;Position : Absolute ;Left : 0 ;Top : 80 ;Z-Index : 20;">
	      		<DIV ID="thessm2" style="Position : Absolute ;Left : (-140) ;Top : 0 ;Z-Index : 20;">
	                <%@ include file="/m05bMenuInicial.inc"%>
	       		</DIV>
			</DIV>
		<td>&nbsp</td>
		<td width="98%">
			<FORM NAME="formResulCtk" METHOD="POST" TARGET="_top">
				    <TABLE class="general" width="100%">
					    <tr>
       					  <!--td align="right"><INPUT TYPE="IMAGE" style="cursor:hand" VALUE="Retornar" ONCLICK="JavaScript:fncRetornar();" onMouseOver="top.status='Retornar'; return true" onMouseOut="top.status=''; return true" src="<%=m05bConstantesPaginas.PATH_IMAGENES%>/retornar.gif"></td-->
                          <td width="80%" align="right"><input type="button" class="boton" name="<%= res.getString("etBOT_RETORNAR")%>" value="<%= res.getString("etBOT_RETORNAR")%>" ONCLICK="JavaScript:fncRetornar();return false;" onMouseOver="top.status='<%= res.getString("etBOT_STATUSRETORNAR")%>'; return false" onMouseOut="top.status=''; return false" /></td>			       					  
					      <!--td align="right" width="10%"> <INPUT TYPE="IMAGE" style="cursor:hand" VALUE="Listar" ONCLICK="JavaScript:fncImprimir();return false;" onMouseOver="top.status='Imprimir Resultado CTK'; return false" onMouseOut="top.status=''; return false" src="<%=m05bConstantesPaginas.PATH_IMAGENES%>/imprimir.gif"/> </td-->
                          <td width="10%" align="right"><input type="button" class="boton" name="<%= res.getString("etBOT_PRESENTAR")%>" value="<%= res.getString("etBOT_PRESENTAR")%>" ONCLICK="JavaScript:fncImprimir();return false;" onMouseOver="top.status='<%= res.getString("etBOT_STATUSPRESENTAR")%>'; return false" onMouseOut="top.status=''; return false" /></td>				      					  					      
					      <!--td align="right" width="10%"> <INPUT TYPE="IMAGE" style="cursor:hand" VALUE="InfFinal" ONCLICK="JavaScript:fncVerInformeFinal();return false;" onMouseOver="top.status='Ver el informe final'; return false" onMouseOut="top.status=''; return false" src="<%=m05bConstantesPaginas.PATH_IMAGENES%>/ver.gif"/> </td-->
                          <!--  td width="10%" align="right"><input type="button" class="boton" name="< %= res.getString("etBOT_VER")%>" value="< %= res.getString("etBOT_VER")%>" ONCLICK="JavaScript:fncVerInformeFinal();return false;" onMouseOver="top.status='< %= res.getString("etBOT_VER")%>'; return false" onMouseOut="top.status=''; return false" /></td-->								      
						</tr>
				    </TABLE>

				    <TABLE class="general">
				    <tr style="font-weight:bold;">
				      <td width="16%" class="inputFieldTitle" style="text-align:left;"><%= res.getString("etConceptos")%></td>
				      <td width="62%" colspan="6">
				    	<TABLE width="100%" style="font-weight:bold;">
				    	    <tr>
   							      <td align="center" class="inputFieldTitle" colspan="6"><%= res.getString("etValoresPorRango")%></td>
	    				    </tr>
	    				    <tr>
   							      <td width="10%" class="inputFieldTitle">A</td>
   							      <td width="10%" class="inputFieldTitle">B</td>
   							      <td width="10%" class="inputFieldTitle">C</td>
   							      <td width="10%" class="inputFieldTitle">D</td>
   							      <td width="10%" class="inputFieldTitle">RA</td>
   							      <td width="10%" class="inputFieldTitle">RB</td>   							      
	    				    </tr>
				    	</TABLE>
				      </td>
				      <td width="8%" class="inputFieldTitle"><%= res.getString("etDetTotal")%></td>
					  <td width="14%" class="inputFieldTitle"><%= res.getString("etObservaciones")%></td>
					</tr>
					<tr></tr>
					<tr></tr>
				    <tr style="font-weight:bold;">
				      <td width="16%" class="inputFieldTitle"><%= res.getString("etNumVehiculos")%></td>
				      <td colspan="8"></td>
				    </tr>
				    <tr>
				      <td width="16%" class="inputFieldTitleMouse" onclick="JavaScript:fncDetTotal()"><%= res.getString("etDetTotal")%></td>
				      <td width="7%"><INPUT TYPE="TEXT" class="detalleCTK" NAME="TotalA" size="12" VALUE='<%=miComun.formatearStrMiles(""+total[0])%>'  onblur="javascript:tratarVacio(this);if(formatNumero(this)) fncSumar(TotalA.value,TotalB.value,TotalC.value,TotalD.value,TotalRA.value,TotalRB.value,Total);return false;" > </td>
				      <td width="7%"><INPUT TYPE="TEXT" class="detalleCTK" NAME="TotalB" size="12" VALUE='<%=miComun.formatearStrMiles(""+total[1])%>'  onblur="javascript:tratarVacio(this);if(formatNumero(this)) fncSumar(TotalA.value,TotalB.value,TotalC.value,TotalD.value,TotalRA.value,TotalRB.value,Total);return false;" > </td>
				      <td width="7%"><INPUT TYPE="TEXT" class="detalleCTK" NAME="TotalC" size="12" VALUE='<%=miComun.formatearStrMiles(""+total[2])%>'  onblur="javascript:tratarVacio(this);if(formatNumero(this)) fncSumar(TotalA.value,TotalB.value,TotalC.value,TotalD.value,TotalRA.value,TotalRB.value,Total);return false;" > </td>
				      <td width="7%"><INPUT TYPE="TEXT" class="detalleCTK" NAME="TotalD" size="12" VALUE='<%=miComun.formatearStrMiles(""+total[3])%>'  onblur="javascript:tratarVacio(this);if(formatNumero(this)) fncSumar(TotalA.value,TotalB.value,TotalC.value,TotalD.value,TotalRA.value,TotalRB.value,Total);return false;" > </td>
				      <td width="7%"><INPUT TYPE="TEXT" class="detalleCTK" NAME="TotalRA" size="12" VALUE='<%=miComun.formatearStrMiles(""+total[4])%>'  onblur="javascript:tratarVacio(this);if(formatNumero(this)) fncSumar(TotalA.value,TotalB.value,TotalC.value,TotalD.value,TotalRA.value,TotalRB.value,Total);return false;" > </td>
				      <td width="7%"><INPUT TYPE="TEXT" class="detalleCTK" NAME="TotalRB" size="12" VALUE='<%=miComun.formatearStrMiles(""+total[5])%>'  onblur="javascript:tratarVacio(this);if(formatNumero(this)) fncSumar(TotalA.value,TotalB.value,TotalC.value,TotalD.value,TotalRA.value,TotalRB.value,Total);return false;" > </td>				      
				      <td width="8%"><INPUT TYPE="TEXT" class="detalleCTK" style="font-weight:bold;" readOnly NAME="Total" VALUE='<%=miComun.formatearStrMiles(""+sumTotal)%>' size="15" ></td>
				      <td width="14%"><INPUT TYPE="TEXT" class="detalleCTK" NAME="TotalObs" VALUE="<%=totalObs%>" size="19"></td>
				    </tr>
					<tr>
				      <td width="16%" class="inputFieldTitleMouse" onclick="JavaScript:fncDetMedia()"><%= res.getString("etMedia")%></td>
				      <td><INPUT class="detalleCTK" TYPE="TEXT" NAME="MediaA" size="12" VALUE="<%=miComun.formatearDblMilesDec(media[0])%>"  align="right" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(MediaA.value,MediaB.value,MediaC.value,MediaD.value,MediaRA.value,MediaRB.value,Media);return false;" ></td>
				      <td><INPUT class="detalleCTK" TYPE="TEXT" NAME="MediaB" size="12" VALUE="<%=miComun.formatearDblMilesDec(media[1])%>"  align="right" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(MediaA.value,MediaB.value,MediaC.value,MediaD.value,MediaRA.value,MediaRB.value,Media);return false;" ></td>
				      <td><INPUT class="detalleCTK" TYPE="TEXT" NAME="MediaC" size="12" VALUE="<%=miComun.formatearDblMilesDec(media[2])%>"  align="right" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(MediaA.value,MediaB.value,MediaC.value,MediaD.value,MediaRA.value,MediaRB.value,Media);return false;" ></td>
				      <td><INPUT class="detalleCTK" TYPE="TEXT" NAME="MediaD" size="12" VALUE="<%=miComun.formatearDblMilesDec(media[3])%>"  align="right" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(MediaA.value,MediaB.value,MediaC.value,MediaD.value,MediaRA.value,MediaRB.value,Media);return false;" ></td>
				      <td><INPUT class="detalleCTK" TYPE="TEXT" NAME="MediaRA" size="12" VALUE="<%=miComun.formatearDblMilesDec(media[4])%>"  align="right" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(MediaA.value,MediaB.value,MediaC.value,MediaD.value,MediaRA.value,MediaRB.value,Media);return false;" ></td>
				      <td><INPUT class="detalleCTK" TYPE="TEXT" NAME="MediaRB" size="12" VALUE="<%=miComun.formatearDblMilesDec(media[5])%>"  align="right" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(MediaA.value,MediaB.value,MediaC.value,MediaD.value,MediaRA.value,MediaRB.value,Media);return false;" ></td>				      
				      <td width="8%"><INPUT class="detalleCTK" style="font-weight:bold;" TYPE="TEXT" readOnly NAME="Media" VALUE="<%=miComun.formatearDblMilesDec(media[0] + media[1] + media[2] + media[3] + media[4] + media[5])%>" size="15"></td>
				      <td width="14%"><INPUT class="detalleCTK" TYPE="TEXT" NAME="MediaObs" VALUE="<%=mediaObs%>" size="19"></td>
				    </tr>
					<tr>
				      <td width="16%" class="inputFieldTitleMouse" onclick="JavaScript:fncDetKilometros()"><%= res.getString("etKilometros")%></td>
				      <td><INPUT class="detalleCTK" TYPE="TEXT" NAME="KmA" size="12" VALUE='<%=miComun.formatearStrMiles(""+km[0])%>'  onblur="javascript:tratarVacio(this);if(formatNumero(this)) fncSumar(KmA.value,KmB.value,KmC.value,KmD.value,KmRA.value,KmRB.value,Km);return false;" > </td>
				      <td><INPUT class="detalleCTK" TYPE="TEXT" NAME="KmB" size="12" VALUE='<%=miComun.formatearStrMiles(""+km[1])%>'  onblur="javascript:tratarVacio(this);if(formatNumero(this)) fncSumar(KmA.value,KmB.value,KmC.value,KmD.value,KmRA.value,KmRB.value,Km);return false;" > </td>
				      <td><INPUT class="detalleCTK" TYPE="TEXT" NAME="KmC" size="12" VALUE='<%=miComun.formatearStrMiles(""+km[2])%>'  onblur="javascript:tratarVacio(this);if(formatNumero(this)) fncSumar(KmA.value,KmB.value,KmC.value,KmD.value,KmRA.value,KmRB.value,Km);return false;" > </td>
				      <td><INPUT class="detalleCTK" TYPE="TEXT" NAME="KmD" size="12" VALUE='<%=miComun.formatearStrMiles(""+km[3])%>'  onblur="javascript:tratarVacio(this);if(formatNumero(this)) fncSumar(KmA.value,KmB.value,KmC.value,KmD.value,KmRA.value,KmRB.value,Km);return false;" > </td>
				      <td><INPUT class="detalleCTK" TYPE="TEXT" NAME="KmRA" size="12" VALUE='<%=miComun.formatearStrMiles(""+km[4])%>'  onblur="javascript:tratarVacio(this);if(formatNumero(this)) fncSumar(KmA.value,KmB.value,KmC.value,KmD.value,KmRA.value,KmRB.value,Km);return false;" > </td>
				      <td><INPUT class="detalleCTK" TYPE="TEXT" NAME="KmRB" size="12" VALUE='<%=miComun.formatearStrMiles(""+km[5])%>'  onblur="javascript:tratarVacio(this);if(formatNumero(this)) fncSumar(KmA.value,KmB.value,KmC.value,KmD.value,KmRA.value,KmRB.value,Km);return false;" > </td>				      
				      <td width="8%"><INPUT class="detalleCTK" style="font-weight:bold;" TYPE="TEXT" readOnly NAME="Km" VALUE='<%=miComun.formatearStrMiles(""+sumKm)%>' size="15" ></td>
				      <td width="14%"><INPUT class="detalleCTK" TYPE="TEXT" NAME="KmObs" VALUE="<%=kmObs%>" size="19"></td>
				    </tr>
					<tr>
				      <td width="16%" class="inputFieldTitleMouse" onclick="JavaScript:fncDetAmortizacion()"><%= res.getString("etAmortizacion")%></td>
				      <td><INPUT class="detalleCTK" TYPE="TEXT" NAME="AmortA" size="12" VALUE="<%=miComun.formatearDblMilesDec(amort[0])%>"  onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(AmortA.value,AmortB.value,AmortC.value,AmortD.value,AmortRA.value,AmortRB.value,Amort);return false;" > </td>
				      <td><INPUT class="detalleCTK" TYPE="TEXT" NAME="AmortB" size="12" VALUE="<%=miComun.formatearDblMilesDec(amort[1])%>"  onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(AmortA.value,AmortB.value,AmortC.value,AmortD.value,AmortRA.value,AmortRB.value,Amort);return false;" > </td>
				      <td><INPUT class="detalleCTK" TYPE="TEXT" NAME="AmortC" size="12" VALUE="<%=miComun.formatearDblMilesDec(amort[2])%>"  onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(AmortA.value,AmortB.value,AmortC.value,AmortD.value,AmortRA.value,AmortRB.value,Amort);return false;" > </td>
				      <td><INPUT class="detalleCTK" TYPE="TEXT" NAME="AmortD" size="12" VALUE="<%=miComun.formatearDblMilesDec(amort[3])%>"  onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(AmortA.value,AmortB.value,AmortC.value,AmortD.value,AmortRA.value,AmortRB.value,Amort);return false;" > </td>
				      <td><INPUT class="detalleCTK" TYPE="TEXT" NAME="AmortRA" size="12" VALUE="<%=miComun.formatearDblMilesDec(amort[4])%>"  onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(AmortA.value,AmortB.value,AmortC.value,AmortD.value,AmortRA.value,AmortRB.value,Amort);return false;" > </td>
				      <td><INPUT class="detalleCTK" TYPE="TEXT" NAME="AmortRB" size="12" VALUE="<%=miComun.formatearDblMilesDec(amort[5])%>"  onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(AmortA.value,AmortB.value,AmortC.value,AmortD.value,AmortRA.value,AmortRB.value,Amort);return false;" > </td>				      
				      <td width="8%"><INPUT class="detalleCTK" style="font-weight:bold;" TYPE="TEXT" readOnly NAME="Amort" VALUE="<%=miComun.formatearDblMilesDec(amort[0] + amort[1] + amort[2] + amort[3] + amort[4] + amort[5])%>" size="15" ></td>
				      <td width="14%"><INPUT class="detalleCTK" TYPE="TEXT" NAME="AmortObs" VALUE="<%=amortObs%>" size="19"></td>
				    </tr>
					<tr>
				      <td width="16%" class="inputFieldTitleMouse" onclick="JavaScript:fncDetCombustible()"><%= res.getString("etGastosCombustible")%></td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK"NAME="CombusA" size="12" VALUE="<%=miComun.formatearDblMilesDec(combus[0])%>"  onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(CombusA.value,CombusB.value,CombusC.value,CombusD.value,CombusRA.value,CombusRB.value,Combus);return false;" > </td>
				      <td><INPUT TYPE="TEXT"  class="detalleCTK" NAME="CombusB" size="12" VALUE="<%=miComun.formatearDblMilesDec(combus[1])%>"  onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(CombusA.value,CombusB.value,CombusC.value,CombusD.value,CombusRA.value,CombusRB.value,Combus);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="CombusC" size="12" VALUE="<%=miComun.formatearDblMilesDec(combus[2])%>"  onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(CombusA.value,CombusB.value,CombusC.value,CombusD.value,CombusRA.value,CombusRB.value,Combus);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="CombusD" size="12" VALUE="<%=miComun.formatearDblMilesDec(combus[3])%>"  onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(CombusA.value,CombusB.value,CombusC.value,CombusD.value,CombusRA.value,CombusRB.value,Combus);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="CombusRA" size="12" VALUE="<%=miComun.formatearDblMilesDec(combus[4])%>"  onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(CombusA.value,CombusB.value,CombusC.value,CombusD.value,CombusRA.value,CombusRB.value,Combus);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="CombusRB" size="12" VALUE="<%=miComun.formatearDblMilesDec(combus[5])%>"  onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(CombusA.value,CombusB.value,CombusC.value,CombusD.value,CombusRA.value,CombusRB.value,Combus);return false;" > </td>				      
				      <td width="8%"><INPUT TYPE="TEXT" class="detalleCTK" style="font-weight:bold;" readOnly NAME="Combus" VALUE="<%=miComun.formatearDblMilesDec(combus[0] + combus[1] + combus[2] + combus[3] + combus[4] + combus[5])%>" size="15" ></td>
				      <td width="14%"><INPUT TYPE="TEXT" class="detalleCTK" NAME="CombusObs" VALUE="<%=combusObs%>" size="19"></td>
				    </tr>
					<tr></tr>
					<tr></tr>
				    <tr style="font-weight:bold;">
				      <td width="16%" class="inputFieldTitle"><%= res.getString("etGastosTaller")%></td>
				      <td colspan="8"></td>
				    </tr>
				    <tr>
				      <td width="16%" class="inputFieldTitleMouse" onclick="JavaScript:fncDetIntervencion()"><%= res.getString("etIntervTallerPropio")%></td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="IntervA" size="12" VALUE='<%=miComun.formatearStrMiles(""+interv[0])%>'  onblur="javascript:tratarVacio(this);if(formatNumero(this)) fncSumar(IntervA.value,IntervB.value,IntervC.value,IntervD.value,IntervRA.value,IntervRB.value,Interv);return false;" > </td>
				      <td><INPUT TYPE="TEXT"  class="detalleCTK" NAME="IntervB" size="12" VALUE='<%=miComun.formatearStrMiles(""+interv[1])%>'  onblur="javascript:tratarVacio(this);if(formatNumero(this)) fncSumar(IntervA.value,IntervB.value,IntervC.value,IntervD.value,IntervRA.value,IntervRB.value,Interv);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="IntervC" size="12" VALUE='<%=miComun.formatearStrMiles(""+interv[2])%>'  onblur="javascript:tratarVacio(this);if(formatNumero(this)) fncSumar(IntervA.value,IntervB.value,IntervC.value,IntervD.value,IntervRA.value,IntervRB.value,Interv);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="IntervD" size="12" VALUE='<%=miComun.formatearStrMiles(""+interv[3])%>'  onblur="javascript:tratarVacio(this);if(formatNumero(this)) fncSumar(IntervA.value,IntervB.value,IntervC.value,IntervD.value,IntervRA.value,IntervRB.value,Interv);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="IntervRA" size="12" VALUE='<%=miComun.formatearStrMiles(""+interv[4])%>'  onblur="javascript:tratarVacio(this);if(formatNumero(this)) fncSumar(IntervA.value,IntervB.value,IntervC.value,IntervD.value,IntervRA.value,IntervRB.value,Interv);return false;" > </td>
   				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="IntervRB" size="12" VALUE='<%=miComun.formatearStrMiles(""+interv[5])%>'  onblur="javascript:tratarVacio(this);if(formatNumero(this)) fncSumar(IntervA.value,IntervB.value,IntervC.value,IntervD.value,IntervRA.value,IntervRB.value,Interv);return false;" > </td>
				      <td width="8%"><INPUT TYPE="TEXT" class="detalleCTK" style="font-weight:bold;" readOnly NAME="Interv" VALUE='<%=miComun.formatearStrMiles(""+sumInterv)%>' size="15" ></td>
				      <td width="14%"><INPUT TYPE="TEXT" class="detalleCTK" NAME="IntervObs" VALUE="<%=intervObs%>" size="19"></td>
				    </tr>
					<tr>
				      <td width="16%" class="inputFieldTitle"><%= res.getString("etRepartoGastosTaller")%></td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="RepartoA" size="12" value="<%=miComun.formatearDblMilesDec(reparto[0])+'%'%>" onblur="javascript:fncCambiaPorc(this);return false;" > </td>
				      <td><INPUT TYPE="TEXT"  class="detalleCTK" NAME="RepartoB" size="12" value="<%=miComun.formatearDblMilesDec(reparto[1])+'%'%>" onblur="javascript:fncCambiaPorc(this);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="RepartoC" size="12" value="<%=miComun.formatearDblMilesDec(reparto[2])+'%'%>" onblur="javascript:fncCambiaPorc(this);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="RepartoD" size="12" value="<%=miComun.formatearDblMilesDec(reparto[3])+'%'%>" onblur="javascript:fncCambiaPorc(this);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="RepartoRA" size="12" value="<%=miComun.formatearDblMilesDec(reparto[4])+'%'%>" onblur="javascript:fncCambiaPorc(this);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="RepartoRB" size="12" value="<%=miComun.formatearDblMilesDec(reparto[5])+'%'%>" onblur="javascript:fncCambiaPorc(this);return false;" > </td>				      
				      <td width="8%"><INPUT TYPE="TEXT" class="detalleCTK" style="font-weight:bold;" readOnly NAME="Reparto" value="<%=(miComun.formatearDblMilesDec(sumRepartos)+'%')%>" size="15" ></td>
				      <td width="14%"><INPUT TYPE="TEXT" class="detalleCTK" NAME="RepartoObs" size="19"></td>
				    </tr>
					<tr>
				      <td width="16%" class="inputFieldTitle"><%= res.getString("etSuministrosTaller")%></td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="SuministA" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(SuministA.value,SuministB.value,SuministC.value,SuministD.value,SuministRA.value,SuministRB.value,Suminist);return false;" > </td>
				      <td><INPUT TYPE="TEXT"  class="detalleCTK" NAME="SuministB" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(SuministA.value,SuministB.value,SuministC.value,SuministD.value,SuministRA.value,SuministRB.value,Suminist);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="SuministC" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(SuministA.value,SuministB.value,SuministC.value,SuministD.value,SuministRA.value,SuministRB.value,Suminist);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="SuministD" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(SuministA.value,SuministB.value,SuministC.value,SuministD.value,SuministRA.value,SuministRB.value,Suminist);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="SuministRA" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(SuministA.value,SuministB.value,SuministC.value,SuministD.value,SuministRA.value,SuministRB.value,Suminist);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="SuministRB" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(SuministA.value,SuministB.value,SuministC.value,SuministD.value,SuministRA.value,SuministRB.value,Suminist);return false;" > </td>				      
				      <td width="8%"><INPUT TYPE="TEXT" class="detalleCTK" style="font-weight:bold;" readOnly NAME="Suminist" size="15" ></td>
				      <td width="14%"><INPUT TYPE="TEXT" class="detalleCTK" NAME="SuministObs" size="19"></td>
				    </tr>
					<tr>
				      <td width="16%" class="inputFieldTitle"><%= res.getString("etAmortizEquipoTaller")%></td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="AmortTallerA" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(AmortTallerA.value,AmortTallerB.value,AmortTallerC.value,AmortTallerD.value,AmortTallerRA.value,AmortTallerRB.value,AmortTaller);return false;" > </td>
				      <td><INPUT TYPE="TEXT"  class="detalleCTK" NAME="AmortTallerB" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(AmortTallerA.value,AmortTallerB.value,AmortTallerC.value,AmortTallerD.value,AmortTallerRA.value,AmortTallerRB.value,AmortTaller);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="AmortTallerC" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(AmortTallerA.value,AmortTallerB.value,AmortTallerC.value,AmortTallerD.value,AmortTallerRA.value,AmortTallerRB.value,AmortTaller);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="AmortTallerD" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(AmortTallerA.value,AmortTallerB.value,AmortTallerC.value,AmortTallerD.value,AmortTallerRA.value,AmortTallerRB.value,AmortTaller);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="AmortTallerRA" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(AmortTallerA.value,AmortTallerB.value,AmortTallerC.value,AmortTallerD.value,AmortTallerRA.value,AmortTallerRB.value,AmortTaller);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="AmortTallerRB" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(AmortTallerA.value,AmortTallerB.value,AmortTallerC.value,AmortTallerD.value,AmortTallerRA.value,AmortTallerRB.value,AmortTaller);return false;" > </td>				      
				      <td width="8%"><INPUT TYPE="TEXT" class="detalleCTK" style="font-weight:bold;" readOnly NAME="AmortTaller" size="15" ></td>
				      <td width="14%"><INPUT TYPE="TEXT" class="detalleCTK" NAME="AmortTallerObs" size="19"></td>
				    </tr>
					<tr>
				      <td width="16%" class="inputFieldTitleMouse" onclick="JavaScript:fncDetOtrosGastos()"><%= res.getString("etOtrosGasTalPropio")%></td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="OtrosA" size="12" VALUE="<%=miComun.formatearDblMilesDec(otros[0])%>"  onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(OtrosA.value,OtrosB.value,OtrosC.value,OtrosD.value,OtrosRA.value,OtrosRB.value,Otros);return false;" > </td>
				      <td><INPUT TYPE="TEXT"  class="detalleCTK" NAME="OtrosB" size="12" VALUE="<%=miComun.formatearDblMilesDec(otros[1])%>"  onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(OtrosA.value,OtrosB.value,OtrosC.value,OtrosD.value,OtrosRA.value,OtrosRB.value,Otros);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="OtrosC" size="12" VALUE="<%=miComun.formatearDblMilesDec(otros[2])%>"  onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(OtrosA.value,OtrosB.value,OtrosC.value,OtrosD.value,OtrosRA.value,OtrosRB.value,Otros);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="OtrosD" size="12" VALUE="<%=miComun.formatearDblMilesDec(otros[3])%>" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(OtrosA.value,OtrosB.value,OtrosC.value,OtrosD.value,OtrosRA.value,OtrosRB.value,Otros);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="OtrosRA" size="12" VALUE="<%=miComun.formatearDblMilesDec(otros[4])%>"  onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(OtrosA.value,OtrosB.value,OtrosC.value,OtrosD.value,OtrosRA.value,OtrosRB.value,Otros);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="OtrosRB" size="12" VALUE="<%=miComun.formatearDblMilesDec(otros[5])%>"  onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(OtrosA.value,OtrosB.value,OtrosC.value,OtrosD.value,OtrosRA.value,OtrosRB.value,Otros);return false;" > </td>				      
				      <td width="8%"><INPUT TYPE="TEXT" class="detalleCTK" style="font-weight:bold;" readOnly NAME="Otros" VALUE="<%=miComun.formatearDblMilesDec(otros[0] + otros[1] + otros[2] + otros[3] + otros[4] + otros[5])%>" size="15" ></td>
				      <td width="14%"><INPUT TYPE="TEXT" class="detalleCTK" NAME="OtrosObs" VALUE="<%=otrosObs%>" size="19"></td>
				    </tr>
					<tr>
				      <td width="16%" class="inputFieldTitleMouse" onclick="JavaScript:fncDetExternos()"><%= res.getString("etGastosTallerExt")%></td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="ExternA" VALUE="<%=miComun.formatearDblMilesDec(extern[0])%>" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(ExternA.value,ExternB.value,ExternC.value,ExternD.value,ExternRA.value,ExternRB.value,Extern);return false;" > </td>
				      <td><INPUT TYPE="TEXT"  class="detalleCTK" NAME="ExternB" VALUE="<%=miComun.formatearDblMilesDec(extern[1])%>" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(ExternA.value,ExternB.value,ExternC.value,ExternD.value,ExternRA.value,ExternRB.value,Extern);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="ExternC" VALUE="<%=miComun.formatearDblMilesDec(extern[2])%>" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(ExternA.value,ExternB.value,ExternC.value,ExternD.value,ExternRA.value,ExternRB.value,Extern);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="ExternD" VALUE="<%=miComun.formatearDblMilesDec(extern[3])%>" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(ExternA.value,ExternB.value,ExternC.value,ExternD.value,ExternRA.value,ExternRB.value,Extern);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="ExternRA" VALUE="<%=miComun.formatearDblMilesDec(extern[4])%>" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(ExternA.value,ExternB.value,ExternC.value,ExternD.value,ExternRA.value,ExternRB.value,Extern);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="ExternRB" VALUE="<%=miComun.formatearDblMilesDec(extern[5])%>" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(ExternA.value,ExternB.value,ExternC.value,ExternD.value,ExternRA.value,ExternRB.value,Extern);return false;" > </td>				      
				      <td width="8%"><INPUT TYPE="TEXT" class="detalleCTK" style="font-weight:bold;" readOnly NAME="Extern" VALUE="<%=miComun.formatearDblMilesDec(extern[0] + extern[1] + extern[2] + extern[3] + extern[4] + extern[5])%>" size="15" ></td>
				      <td width="14%"><INPUT TYPE="TEXT" class="detalleCTK" NAME="ExternObs" VALUE="<%=externObs%>" size="19"></td>
				    </tr>
					<tr></tr>
					<tr></tr>
				    <tr style="font-weight:bold;">
				      <td width="16%" class="inputFieldTitle"><%= res.getString("etGastosPersonal")%></td>
				      <td colspan="8"></td>
				    </tr>
				    <tr>
				      <td width="16%" class="inputFieldTitle"><%= res.getString("etPlantMediaPM")%></td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="PlantTotalA" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(PlantTotalA.value,PlantTotalB.value,PlantTotalC.value,PlantTotalD.value,PlantTotalRA.value,PlantTotalRB.value,PlantTotal);return false;" > </td>
				      <td><INPUT TYPE="TEXT"  class="detalleCTK" NAME="PlantTotalB" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(PlantTotalA.value,PlantTotalB.value,PlantTotalC.value,PlantTotalD.value,PlantTotalRA.value,PlantTotalRB.value,PlantTotal);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="PlantTotalC" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(PlantTotalA.value,PlantTotalB.value,PlantTotalC.value,PlantTotalD.value,PlantTotalRA.value,PlantTotalRB.value,PlantTotal);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="PlantTotalD" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(PlantTotalA.value,PlantTotalB.value,PlantTotalC.value,PlantTotalD.value,PlantTotalRA.value,PlantTotalRB.value,PlantTotal);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="PlantTotalRA" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(PlantTotalA.value,PlantTotalB.value,PlantTotalC.value,PlantTotalD.value,PlantTotalRA.value,PlantTotalRB.value,PlantTotal);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="PlantTotalRB" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(PlantTotalA.value,PlantTotalB.value,PlantTotalC.value,PlantTotalD.value,PlantTotalRA.value,PlantTotalRB.value,PlantTotal);return false;" > </td>				      
				      <td width="8%"><INPUT TYPE="TEXT" class="detalleCTK" style="font-weight:bold;" readOnly NAME="PlantTotal" size="15" ></td>
				      <td width="14%"><INPUT TYPE="TEXT" class="detalleCTK" NAME="PlantTotalObs" size="19"></td>
				    </tr>
				    <tr>
				      <td width="16%" class="inputFieldTitle"><%= res.getString("etTotGastosPersonal")%></td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="PersonalA" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(PersonalA.value,PersonalB.value,PersonalC.value,PersonalD.value,PersonalRA.value,PersonalRB.value,Personal);return false;" > </td>
				      <td><INPUT TYPE="TEXT"  class="detalleCTK" NAME="PersonalB" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(PersonalA.value,PersonalB.value,PersonalC.value,PersonalD.value,PersonalRA.value,PersonalRB.value,Personal);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="PersonalC" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(PersonalA.value,PersonalB.value,PersonalC.value,PersonalD.value,PersonalRA.value,PersonalRB.value,Personal);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="PersonalD" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(PersonalA.value,PersonalB.value,PersonalC.value,PersonalD.value,PersonalRA.value,PersonalRB.value,Personal);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="PersonalRA" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(PersonalA.value,PersonalB.value,PersonalC.value,PersonalD.value,PersonalRA.value,PersonalRB.value,Personal);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="PersonalRB" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(PersonalA.value,PersonalB.value,PersonalC.value,PersonalD.value,PersonalRA.value,PersonalRB.value,Personal);return false;" > </td>				      
				      <td width="8%"><INPUT TYPE="TEXT" class="detalleCTK" style="font-weight:bold;" readOnly NAME="Personal" size="15" ></td>
				      <td width="14%"><INPUT TYPE="TEXT" class="detalleCTK" NAME="PersonalObs" size="19"></td>
				    </tr>
					<tr>
				      <td width="16%" class="inputFieldTitle"><%= res.getString("etPlantMediaTaller")%></td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="PlantMediaA" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(PlantMediaA.value,PlantMediaB.value,PlantMediaC.value,PlantMediaD.value,PlantMediaRA.value,PlantMediaRB.value,PlantMedia);return false;" > </td>
				      <td><INPUT TYPE="TEXT"  class="detalleCTK" NAME="PlantMediaB" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(PlantMediaA.value,PlantMediaB.value,PlantMediaC.value,PlantMediaD.value,PlantMediaRA.value,PlantMediaRB.value,PlantMedia);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="PlantMediaC" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(PlantMediaA.value,PlantMediaB.value,PlantMediaC.value,PlantMediaD.value,PlantMediaRA.value,PlantMediaRB.value,PlantMedia);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="PlantMediaD" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(PlantMediaA.value,PlantMediaB.value,PlantMediaC.value,PlantMediaD.value,PlantMediaRA.value,PlantMediaRB.value,PlantMedia);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="PlantMediaRA" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(PlantMediaA.value,PlantMediaB.value,PlantMediaC.value,PlantMediaD.value,PlantMediaRA.value,PlantMediaRB.value,PlantMedia);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="PlantMediaRB" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(PlantMediaA.value,PlantMediaB.value,PlantMediaC.value,PlantMediaD.value,PlantMediaRA.value,PlantMediaRB.value,PlantMedia);return false;" > </td>				      
				      <td width="8%"><INPUT TYPE="TEXT" class="detalleCTK" style="font-weight:bold;" readOnly NAME="PlantMedia" size="15" ></td>
				      <td width="14%"><INPUT TYPE="TEXT" class="detalleCTK" NAME="PlantMediaObs" size="19"></td>
				    </tr>
					<tr>
				      <td width="16%" class="inputFieldTitle"><%= res.getString("etPlantMediaAdmon")%></td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK"NAME="PlantAdmonA" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(PlantAdmonA.value,PlantAdmonB.value,PlantAdmonC.value,PlantAdmonD.value,PlantAdmonRA.value,PlantAdmonRB.value,PlantAdmon);return false;" > </td>
				      <td><INPUT TYPE="TEXT"  class="detalleCTK" NAME="PlantAdmonB" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(PlantAdmonA.value,PlantAdmonB.value,PlantAdmonC.value,PlantAdmonD.value,PlantAdmonRA.value,PlantAdmonRB.value,PlantAdmon);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="PlantAdmonC" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(PlantAdmonA.value,PlantAdmonB.value,PlantAdmonC.value,PlantAdmonD.value,PlantAdmonRA.value,PlantAdmonRB.value,PlantAdmon);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="PlantAdmonD" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(PlantAdmonA.value,PlantAdmonB.value,PlantAdmonC.value,PlantAdmonD.value,PlantAdmonRA.value,PlantAdmonRB.value,PlantAdmon);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="PlantAdmonRA" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(PlantAdmonA.value,PlantAdmonB.value,PlantAdmonC.value,PlantAdmonD.value,PlantAdmonRA.value,PlantAdmonRB.value,PlantAdmon);return false;" > </td>
  				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="PlantAdmonRB" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(PlantAdmonA.value,PlantAdmonB.value,PlantAdmonC.value,PlantAdmonD.value,PlantAdmonRA.value,PlantAdmonRB.value,PlantAdmon);return false;" > </td>
				      <td width="8%"><INPUT TYPE="TEXT" class="detalleCTK" style="font-weight:bold;" readOnly NAME="PlantAdmon" size="15" ></td>
				      <td width="14%"><INPUT TYPE="TEXT" class="detalleCTK" NAME="PlantAdmonObs" size="19"></td>
				    </tr>
					<tr>
				      <td width="16%" class="inputFieldTitle"><%= res.getString("etPrimaAnualSeguro")%></td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="PrimaA" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(PrimaA.value,PrimaB.value,PrimaC.value,PrimaD.value,PrimaRA.value,PrimaRB.value,Prima);return false;" > </td>
				      <td><INPUT TYPE="TEXT"  class="detalleCTK" NAME="PrimaB" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(PrimaA.value,PrimaB.value,PrimaC.value,PrimaD.value,PrimaRA.value,PrimaRB.value,Prima);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="PrimaC" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(PrimaA.value,PrimaB.value,PrimaC.value,PrimaD.value,PrimaRA.value,PrimaRB.value,Prima);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="PrimaD" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(PrimaA.value,PrimaB.value,PrimaC.value,PrimaD.value,PrimaRA.value,PrimaRB.value,Prima);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="PrimaRA" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(PrimaA.value,PrimaB.value,PrimaC.value,PrimaD.value,PrimaRA.value,PrimaRB.value,Prima);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="PrimaRB" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(PrimaA.value,PrimaB.value,PrimaC.value,PrimaD.value,PrimaRA.value,PrimaRB.value,Prima);return false;" > </td>				      
				      <td width="8%"><INPUT TYPE="TEXT" class="detalleCTK" style="font-weight:bold;" readOnly NAME="Prima" size="15" ></td>
				      <td width="14%"><INPUT TYPE="TEXT" class="detalleCTK" NAME="PrimaObs" size="19"></td>
				    </tr>
					<tr>
				      <td width="16%" class="inputFieldTitle"><%= res.getString("etITV")%></td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="ItvA" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(ItvA.value,ItvB.value,ItvC.value,ItvD.value,ItvRA.value,ItvRB.value,Itv);return false;" > </td>
				      <td><INPUT TYPE="TEXT"  class="detalleCTK" NAME="ItvB" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(ItvA.value,ItvB.value,ItvC.value,ItvD.value,ItvRA.value,ItvRB.value,Itv);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="ItvC" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(ItvA.value,ItvB.value,ItvC.value,ItvD.value,ItvRA.value,ItvRB.value,Itv);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="ItvD" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(ItvA.value,ItvB.value,ItvC.value,ItvD.value,ItvRA.value,ItvRB.value,Itv);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="ItvRA" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(ItvA.value,ItvB.value,ItvC.value,ItvD.value,ItvRA.value,ItvRB.value,Itv);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="ItvRB" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(ItvA.value,ItvB.value,ItvC.value,ItvD.value,ItvRA.value,ItvRB.value,Itv);return false;" > </td>				      
				      <td width="8%"><INPUT TYPE="TEXT" class="detalleCTK" style="font-weight:bold;" readOnly NAME="Itv" size="15" ></td>
				      <td width="14%"><INPUT TYPE="TEXT" class="detalleCTK" NAME="ItvObs" size="19"></td>
				    </tr>
					<tr>
				      <td width="16%" class="inputFieldTitle"><%= res.getString("etImpuestos")%></td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="ImpuestosA" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(ImpuestosA.value,ImpuestosB.value,ImpuestosC.value,ImpuestosD.value,ImpuestosRA.value,ImpuestosRB.value,Impuestos);return false;" > </td>
				      <td><INPUT TYPE="TEXT"  class="detalleCTK" NAME="ImpuestosB" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(ImpuestosA.value,ImpuestosB.value,ImpuestosC.value,ImpuestosD.value,ImpuestosRA.value,ImpuestosRB.value,Impuestos);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="ImpuestosC" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(ImpuestosA.value,ImpuestosB.value,ImpuestosC.value,ImpuestosD.value,ImpuestosRA.value,ImpuestosRB.value,Impuestos);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="ImpuestosD" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(ImpuestosA.value,ImpuestosB.value,ImpuestosC.value,ImpuestosD.value,ImpuestosRA.value,ImpuestosRB.value,Impuestos);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="ImpuestosRA" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(ImpuestosA.value,ImpuestosB.value,ImpuestosC.value,ImpuestosD.value,ImpuestosRA.value,ImpuestosRB.value,Impuestos);return false;" > </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="ImpuestosRB" size="12" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(ImpuestosA.value,ImpuestosB.value,ImpuestosC.value,ImpuestosD.value,ImpuestosRA.value,ImpuestosRB.value,Impuestos);return false;" > </td>				      
				      <td width="8%"><INPUT TYPE="TEXT" class="detalleCTK" style="font-weight:bold;" readOnly NAME="Impuestos" size="15" ></td>
				      <td width="14%"><INPUT TYPE="TEXT" class="detalleCTK" NAME="ImpuestosObs" size="19"></td>
				    </tr>
					<tr>
				      <td width="16%" class="inputFieldTitleMouse" onclick="JavaScript:fncDetRenting()"><%= res.getString("etRenting")%></td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="RentingA" readonly size="12"> </td>
				      <td><INPUT TYPE="TEXT"  class="detalleCTK" NAME="RentingB" readonly size="12"> </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="RentingC" readonly size="12"> </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="RentingD" readonly size="12"> </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="RentingRA" VALUE="<%=miComun.formatearDblMilesDec(renting[0])%>" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(RentingRA.value,RentingRB.value,0,0,0,0,Renting);return false;" size="12"> </td>
				      <td><INPUT TYPE="TEXT" class="detalleCTK" NAME="RentingRB" VALUE="<%=miComun.formatearDblMilesDec(renting[1])%>" onblur="javascript:tratarVacioDec(this);if(formatNumeroDecimal(this,6,2)) fncSumar(RentingRA.value,RentingRB.value,0,0,0,0,Renting);return false;" size="12"> </td>				      
				      <td width="8%"><INPUT TYPE="TEXT" class="detalleCTK" style="font-weight:bold;" readOnly NAME="Renting" VALUE="<%=miComun.formatearDblMilesDec(renting[0] + renting[1])%>" size="15" ></td>
				      <td width="14%"><INPUT TYPE="TEXT" class="detalleCTK" NAME="RentingObs" VALUE="<%=rentingObs%>" size="19"></td>
				    </tr>
				</TABLE>
			</FORM>
		</td>
	</tr>
	<tr>
			<td colspan="3"><%@ include file="/mantenimientosJSP/includes/m05Pie_c.jsp"%></td>
	</tr>
</table>
<SCRIPT language='javascript'>
		    function fncSumar (A,B,C,D,RA,RB, result) {  
		       	var docu = document.formResulCtk;
		       	var aux=0;
		        if (A !="" ){
		        	 A=trimPuntosComas(A);
			         aux=aux+parseFloat(A);
		       	}
		        if (B !="" ){
		        	 B=trimPuntosComas(B);
			         aux=aux+parseFloat(B);
		       	}
				if (C !="" ){
		        	 C=trimPuntosComas(C);
			         aux=aux+parseFloat(C);
		       	}
				if (D !="" ){
		        	 D=trimPuntosComas(D);
			         aux=aux+parseFloat(D);
		       	}
				if (RA !="" ){
		        	 RA=trimPuntosComas(RA);
			         aux=aux+parseFloat(RA);
		       	}
		       	if (RB !="" ){
		       		 RB=trimPuntosComas(RB);
		       		 aux=aux+parseFloat(RB);
		       	}
				auxStr=""+aux;
				// Formateo y redondeo
				pos=auxStr.lastIndexOf(".");
				if (pos != -1) {  // Num con decimales
      				var intPart =  auxStr.substring(0,pos);
      				intPart = processIntPart(intPart);
          			if (auxStr.length > pos+3) {
          				// Redondeo el 2º decimal
          				if (auxStr.substring(pos+3,pos+4) >=5) {
	          				decPart = auxStr.substring(pos+1,pos+2)+ parseFloat(auxStr.substring(pos+2,pos+3)+1);
          				} else	{
          					decPart = auxStr.substring(pos+1,pos+3);
						}
          			} else if (auxStr.length > pos+2) {
          				// 2 decimales
	          				decPart = auxStr.substring(pos+1,pos+3);
          			} else { 
          				// 1 decimal
	          				decPart = auxStr.substring(pos+1,pos+2);
          			}
		        	auxStr = intPart+ ","+ decPart; 
		        	result.value=auxStr;
		        } else {  // Num entero
					result.value=auxStr;
		        	formatNumero(result);
		        }
		        //alert(parseFloat(A) + " + " + parseFloat(B) + " + " + parseFloat(C) + " + " + parseFloat(D) + " + " + parseFloat(R) +" = " + result.value);
				//formatNumeroDecimal(result,6,2);
   	        }  // Fin funcion fncSumar
   	        
   	        function fncSumarPorc (A,B,C,D,RA,RB, result) {  
		       	var docu = document.formResulCtk;
		       	var aux=0;
		        if (A !="" ){
		        	 A=trimPuntosComas(A);
			         aux=aux+parseFloat(A);
		       	}
		        if (B !="" ){
		        	 B=trimPuntosComas(B);
			         aux=aux+parseFloat(B);
		       	}
				if (C !="" ){
		        	 C=trimPuntosComas(C);
			         aux=aux+parseFloat(C);
		       	}
				if (D !="" ){
		        	 D=trimPuntosComas(D);
			         aux=aux+parseFloat(D);
		       	}
				if (RA !="" ){
		        	 RA=trimPuntosComas(RA);
			         aux=aux+parseFloat(RA);
		       	}
		       	if (RB !="" ){
		       		 RB=trimPuntosComas(RB);
		       		 aux=aux+parseFloat(RB);
		       	}
				auxStr=""+aux;
				// Formateo y redondeo
				pos=auxStr.lastIndexOf(".");
				if (pos != -1) {  // Num con decimales
      				var intPart =  auxStr.substring(0,pos);
      				intPart = processIntPart(intPart);
          			if (auxStr.length > pos+3) {
          				// Redondeo el 2º decimal
          				if (auxStr.substring(pos+3,pos+4) >=5) {
	          				decPart = auxStr.substring(pos+1,pos+2)+ parseFloat(auxStr.substring(pos+2,pos+3)+1);
          				} else	{
          					decPart = auxStr.substring(pos+1,pos+3);
						}
          			} else if (auxStr.length > pos+2) {
          				// 2 decimales
	          				decPart = auxStr.substring(pos+1,pos+3);
          			} else { 
          				// 1 decimal
	          				decPart = auxStr.substring(pos+1,pos+2);
          			}
		        	auxStr = intPart+ ","+ decPart; 
		        	result.value=auxStr;
		        } else {  // Num entero
					result.value=auxStr;
		        	formatNumero(result);
		        }
		        //alert(parseFloat(A) + " + " + parseFloat(B) + " + " + parseFloat(C) + " + " + parseFloat(D) + " + " + parseFloat(R) +" = " + result.value);
				//formatNumeroDecimal(result,6,2);
   	        }  // Fin funcion fncSumar
		    	
		    function fncDetTotal () {
		    	var docu = document.formResulCtk;
			    docu.action="m05bTotalCTKJsp.jsp?Grupo=A&Rango=&Desde=<%=fDesde%>&Hasta=<%=fHasta%>";
			    docu.submit();
		    }  // Fin funcion fncDetTotal

		    function fncDetMedia () {
		    	var docu = document.formResulCtk;
			    docu.action="m05bMediaCTKJsp.jsp?Grupo=A&Rango=&Desde=<%=fDesde%>&Hasta=<%=fHasta%>";
			    docu.submit();
		    }  // Fin funcion fncDetMedia

		    function fncDetKilometros () {
		    	var docu = document.formResulCtk;
			    docu.action="m05bKmCTKJsp.jsp?Grupo=A&Rango=&Desde=<%=fDesde%>&Hasta=<%=fHasta%>";
			    docu.submit();
		    }  // Fin funcion fncDetMedia
		    	
		    function fncDetAmortizacion () {
		    	var docu = document.formResulCtk;
			    docu.action="m05bAmortizCTKJsp.jsp?Grupo=A&Rango=&Desde=<%=fDesde%>&Hasta=<%=fHasta%>";
			    docu.submit();
		    }  // Fin funcion fncDetAmortizacion
		    	
		    function fncDetCombustible () {
		    	var docu = document.formResulCtk;
			    docu.action="m05bCombustibleCTKJsp.jsp?Grupo=A&Rango=&Desde=<%=fDesde%>&Hasta=<%=fHasta%>";
			    docu.submit();
		    }  // Fin funcion fncDetCombustible
		    	
		    function fncDetIntervencion () {
		    	var docu = document.formResulCtk;
			    docu.action="m05bGastosTallerCTKJsp.jsp?Grupo=A&Rango=&Desde=<%=fDesde%>&Hasta=<%=fHasta%>";
			    docu.submit();
		    }  // Fin funcion fncDetIntervencion

		    function fncDetOtrosGastos () {
		    	var docu = document.formResulCtk;
			    docu.action="m05bGastosTallerCTKJsp.jsp?Grupo=A&Rango=&Desde=<%=fDesde%>&Hasta=<%=fHasta%>";
			    docu.submit();
		    }  // Fin funcion fncDetOtrosGastos

		    function fncDetExternos () {
		    	var docu = document.formResulCtk;
			    docu.action="m05bGastosTallerCTKJsp.jsp?Grupo=A&Rango=&Desde=<%=fDesde%>&Hasta=<%=fHasta%>";
			    docu.submit();
		    }  // Fin funcion fncDetExternos

		    function fncDetRenting (){
		    	var docu = document.formResulCtk;
			    docu.action="m05bRentingCTKJsp.jsp?Grupo=RA&Rango=&Desde=<%=fDesde%>&Hasta=<%=fHasta%>";
			    docu.submit();
		    }  // Fin funcion fncDetRenting
		    			    				
		    function fncImprimir () {
		    	var docu = document.formResulCtk;
			        docu.action="/m05bParqueMovilWar/m05bResultadoCTKPDFJsp.jsp?Desde=<%=fDesde%>&Hasta=<%=fHasta%>";
			        docu.submit();
		    }  // Fin funcion fncImprimir
		    
		    function fncVerInformeFinal () {
		    	var docu = document.formResulCtk;
			        docu.action="/m05bParqueMovilWar/m05bResultadoCTKKmPDFJsp.jsp?Desde=<%=fDesde%>&Hasta=<%=fHasta%>";
			        docu.submit();
		    }  // Fin funcion fncVerInformeFinal
		    	
			function fncRetornar() {
				var docu = document.formResulCtk;
				docu.action="/m05bParqueMovilWar/m05bCTKJsp.jsp" ;
				docu.submit();
			}   // Fin funcion fncRetornar
			
			function fncCambiaPorc(campo){
				if(campo.value!=""){
					if(campo.value.indexOf('%')<0){
						var sinPorc =campo.value;
					}else{
						var sinPorc = campo.value.substring(0,campo.value.indexOf('%'));;
					}
					campo.value=sinPorc;
					if(formatNumeroDecimal(campo,6,2)){
						fncSumarPorc(document.formResulCtk.RepartoA.value,document.formResulCtk.RepartoB.value,document.formResulCtk.RepartoC.value,document.formResulCtk.RepartoD.value,document.formResulCtk.RepartoRA.value,document.formResulCtk.RepartoRB.value,document.formResulCtk.Reparto);
						formatNumeroDecimal(document.formResulCtk.Reparto,6,2);
						campo.value = campo.value+"%";
						document.formResulCtk.Reparto.value=document.formResulCtk.Reparto.value + "%";
					}
				}else{
					campo.value = "0,00%";
					fncSumarPorc(document.formResulCtk.RepartoA.value,document.formResulCtk.RepartoB.value,document.formResulCtk.RepartoC.value,document.formResulCtk.RepartoD.value,document.formResulCtk.RepartoRA.value,document.formResulCtk.RepartoRB.value,document.formResulCtk.Reparto);
					formatNumeroDecimal(document.formResulCtk.Reparto,6,2);	
					document.formResulCtk.Reparto.value = document.formResulCtk.Reparto.value+"%";
				}
			}
			
			function tratarVacio(campo){
				if(campo.value=="")
					campo.value = "0";
			}
			
			function tratarVacioDec(campo){
				if(campo.value=="")
					campo.value = "0,00";
			}
    	setTimeout('initSlide();', 1);
</SCRIPT>
</BODY>
</HTML>