 /**
 * <p>Title: accidentalidad</p>
 * <p>Description: Maneja funciones de validación para el formulario de accidentalidad</p>
 * <p>Copyright: Copyright (c) 2005</p>
 * <p>Company: Data Tools</p>
 * @author Alvaro Guerrero.
 * @version 1.0
 */
 
/**
 * Habilita choque con cuando la clase de accidente es choque
 * @param valor clase de accidente
 */

function habilitar_choque_con(valor)
{
		if(valor == 1){
			document.getElementById("tipo_choque").disabled = false;
		}
		else {
			document.getElementById("tipo_choque").value = "";
			document.getElementById("tipo_choque").disabled = true;
			document.getElementById("objeto_fijo").value = "";
			document.getElementById("objeto_fijo").disabled = true;
		}
}

/**
 * Habilita el objeto fijo cuando el choque es con objeto fijo
 * @param valor choque con
 */

function habilitar_objeto_fijo(valor)
{
		if(valor == 4)
		{
			document.getElementById("objeto_fijo").disabled = false;
			//document.form1.objeto_fijo.disabled = false;
		}
		else {
			document.getElementById("objeto_fijo").value = "";
			document.getElementById("objeto_fijo").disabled = true;
			//document.form1.objeto_fijo.value = "";
			//document.form1.objeto_fijo.disabled = true;
		}
}

/**
 * Habilita los campos de la dirección según sea necesario
 * tiene en cuenta si pueden restringirse variables de letras en las avenidas
 * y lo denominadores numéricos de cada via
 * @param numero_via via del cruce
 * @param valor del combo tipo_via
 */

function cambiar_tipo_via(via,valor)
{
	var numero_via = document.getElementById("lugar_accidente_numero_via_"+via);
	var sector_via = document.getElementById("lugar_accidente_sector_via_" +via);
  var sector_via_campo = document.getElementById("lugar_accidente_sector_via_" +via+ "_campo");
	var primera_letra = document.getElementById("lugar_accidente_primera_letra_via_"+via);
	var bis_via = document.getElementById("lugar_accidente_bis_via_"+via);
	var segunda_letra = document.getElementById("lugar_accidente_segunda_letra_via_"+via);
	var cardinal_via = document.getElementById("lugar_accidente_cardinal_via_"+via);
		
	switch(valor)
	{
			case "": //SELECCIONE
			case "0": //SIN INFORMACION
				numero_via.style.display = "none";
				primera_letra.disabled = true;
				bis_via.disabled = true;
				segunda_letra.disabled = true;
				cardinal_via.disabled = true;
				sector_via.style.display = "none";
				sector_via_campo.style.display = "none";
				break;
			case "3": //AVENIDA
				if(sector_via_campo.value != "")
				 sector_via.options[sector_via.selectedIndex].text = sector_via_campo.value;
				if(primera_letra.value != "")
				   primera_letra.value = "";
				if(bis_via.value != "")
				   bis_via.value = "";
				if(segunda_letra.value != "")
				   segunda_letra.value = "";   
				if(cardinal_via.value != "")
				   cardinal_via.value = "";      
			case "4": //AUTOPISTA
			  if(sector_via_campo.value != "")
				 sector_via.options[sector_via.selectedIndex].text = sector_via_campo.value;
				if(primera_letra.value != "")
				   primera_letra.value = "";
				if(bis_via.value != "")
				   bis_via.value = "";
				if(segunda_letra.value != "")
				   segunda_letra.value = "";
				if(cardinal_via.value != "")
				   cardinal_via.value = "";     
			case "8": //TRAMO
			case "9": //PASO
			case "10": //RAMAL
			case "11": //SUBRAMAL
				numero_via.style.display = "none";
				primera_letra.disabled = true;
				bis_via.disabled = true;
				segunda_letra.disabled = true;
				cardinal_via.disabled = true;
				sector_via.disabled = false;
				sector_via.style.display = "inline";
				sector_via_campo.disabled = false;
				sector_via_campo.style.display = "inline";
				break;
			case "1": //CARRERA
			case "2": //CALLE
			   //if(cardinal_via_campo.value != "")
				//	cardinal_via.value = cardinal_via_campo.value;
			case "5": //KILOMETRO
			case "6": //TRANSVERSAL
			case "7": //DIAGONAL
			case "12": //AV CARRERA
			case "13": //AV CALLE
			case "14": //DIAGONAL
				numero_via.disabled = false;
				numero_via.style.display = "inline";
				primera_letra.disabled = false;
				bis_via.disabled = false;
				segunda_letra.disabled = false;
				cardinal_via.disabled = false;
				sector_via.style.display = "none";
				sector_via_campo.style.display = "none";
				break;
	}
}

/**
 * Valida que no se puedan repetir los mismos tipos de via cuando 
 * el denominador es numérico (calles y diagonales , carreras y transversales)
 * @param numero de la via del cruce
 * @param obj combo tipo_via
 */

function validarCruce(numero_via,obj)
{
	var otra_via = numero_via==1?2:1;
	var obj_otra_via = document.getElementById("lugar_accidente_tipo_via_"+otra_via);
	var valor_otra_via = document.getElementById("lugar_accidente_tipo_via_"+otra_via).value;
	

	if(obj.value==1)
		{
			if(valor_otra_via==1)
			{
				display(obj.name+"_span", "Cruce inv&aacute;lido");
				//obj_otra_via.value == "";
				obj_otra_via.focus();
				//obj.focus();
					
			}
			else
				display(obj.name+"_span", "");
		}
		else if(obj.value==2)
		{
			if(valor_otra_via==2)
			{
				display(obj.name+"_span", "Cruce inv&aacute;lido");
				//obj_otra_via.value == "";
				obj_otra_via.focus();
				//obj.focus();
			}
			else
				display(obj.name+"_span", "");
		}
		else if(obj.value==5)
		{
			if(valor_otra_via==5)
			{
				display(obj.name+"_span", "Cruce inv&aacute;lido");
				//obj_otra_via.value == "";
				obj_otra_via.focus();
				//obj.focus();
			}
			else
				display(obj.name+"_span", "");
			}
		else if(obj.value==6)
		{
			if(valor_otra_via==6)
			{
				display(obj.name+"_span", "Cruce inv&aacute;lido");
				//obj_otra_via.value == "";
				obj_otra_via.focus();
				//obj.focus();
			}
			else
				display(obj.name+"_span", "");
		}
		else if(obj.value==7)
		{
			if(valor_otra_via==7)
			{
				display(obj.name+"_span", "Cruce inv&aacute;lido");
				//obj_otra_via.value == "";
				obj_otra_via.focus();
				//obj.focus();
			}
			else
				display(obj.name+"_span", "");
		}
		else if(obj.value==12)
		{
			if(valor_otra_via==12)
			{
				display(obj.name+"_span", "Cruce inv&aacute;lido");
				//obj_otra_via.value == "";
				obj_otra_via.focus();
				//obj.focus();
			}
			else
				display(obj.name+"_span", "");
		}
		else if(obj.value==13)
		{
			if(valor_otra_via==13)
			{
				display(obj.name+"_span", "Cruce inv&aacute;lido");
				//obj_otra_via.value == "";
				obj_otra_via.focus();
				//obj.focus();
			}
			else
				display(obj.name+"_span", "");
		}
			
		else
		display(obj.name+"_span", "");
}

/**
 * Habilita la segunda letra de la direccion si se escogió 'BIS'
 * @param numero_via numero de la via del cruce
 * @param valor del combo BIS
 */

function habilitar_letra(numero_via,valor) {
	if ( valor == "" ) {
		document.getElementById("lugar_accidente_segunda_letra_via_"+numero_via).value = "";
		document.getElementById("lugar_accidente_segunda_letra_via_"+numero_via).disabled = true;
	}
	else {
		document.getElementById("lugar_accidente_segunda_letra_via_"+numero_via).disabled = false;
	}
}

/**
 * Cambia el dia de la semana
 * @param obj objeto con la fecha
 */

 //hora_ocurrencia_horas
function cambiar_dia_semana(obj)
{
	if(!isBlank(obj.value))
	{
		var fecha = obj.value;	
		var SplitDate;
		var day;
		var month;
		var year;
		if ( /\//.test(fecha) && obj.value.length ==10 )
		{
			SplitDate = fecha.split("/");
			//display(obj.name+"_span", "");
			day = SplitDate[1];
			month = SplitDate[0];
			year = SplitDate[2];

			var oyear=year
			var dob = year + "/" + day + "/" + month;
			var thenx = new Date(dob);
			var theday = thenx.getDay()==0?7:thenx.getDay();//para convertir el 0 en 7
			document.getElementById("dia_accidente").value = (theday);
			document.getElementById("dia_accidente1").value = (theday);
		}
		else
		{			
			document.getElementById("fecha_accidente").focus();
			document.getElementById("fecha_accidente").select();
		}
	}
	else
	{
		//display(obj.name+"_span", "");
	}
}
/**
 * un mensaje en un span obteniéndolo del id
 * @param id Id asignado al span
 * @param id str Cadena a mostrar en el span
 */

function TabNext(obj,event,len,next_field) {
	var phone_field_length=0;
	if (event == "down") {
		phone_field_length=obj.value.length;
	}
	else if (event == "up") {
		if (obj.value.length != phone_field_length) {
			phone_field_length=obj.value.length;
			if (phone_field_length == len) {
				next_field.focus();
			}
		}
	}
}

////////////////////////////////////
//**********************************
//PROPIAS DE LA SECCIÓN DE VEHICULOS
//**********************************

/**
 * Habilita los campos de caracteristicas del vehiculo para todos los 
 * tipos vehiculos excepto 13(BICICLETA)
 * @param valor campo SI-NO
 */

function habilitar_caracteristicas_vehiculo()
{
	var longitud = document.form1.clase_vehiculo.value.length;
	
	if ((document.form1.clase_vehiculo.value == 13) || (longitud == 0))
		valor = 'S';
	else
		valor = 'N';

	if(valor == 'N')
	{
		
		document.form1.placa.disabled = false;
				document.form1.marca_vehiculo.disabled = false;
				document.form1.marca_vehiculo_campo.disabled = false;
				document.form1.linea_vehiculo.disabled = false;
				document.form1.linea_vehiculo_campo.disabled = false;
				document.form1.modelo_vehiculo.disabled = false;
				document.form1.carga_toneladas_vehiculo.disabled = false;
				document.form1.numero_pasajeros.disabled = false;
				document.form1.color.disabled = false;
				document.form1.color_campo.disabled = false;
				document.form1.empresa_vehiculo.disabled = false;
				document.form1.empresa_vehiculo_campo.disabled = false;
				document.form1.servicio_vehiculo.disabled = false;
	}
	else
	{
	
	document.form1.placa.disabled = true;
				document.form1.marca_vehiculo.disabled = true;
				document.form1.marca_vehiculo_campo.disabled = true;
				document.form1.linea_vehiculo.disabled = true;
				document.form1.linea_vehiculo_campo.disabled = true;
				document.form1.modelo_vehiculo.disabled = true;
				document.form1.carga_toneladas_vehiculo.disabled = true;
				document.form1.numero_pasajeros.disabled = true;
				document.form1.color.disabled = true;
				document.form1.color_campo.disabled = true;
				document.form1.empresa_vehiculo.disabled = true;
				document.form1.empresa_vehiculo_campo.disabled = true;
		document.form1.servicio_vehiculo.disabled = true;
	}
}


/**
 * Habilita los campos de la licencia cuando se marca 'SI' en posee licencia
 * @param valor campo SI-NO
 */

function habilitar_licencia_conduccion()
{
	if (document.form1.conductor_porta_licencia.value == 'S')
		valor = 'S';
	else
		valor = 'N';

	if(valor == 'S')
	{
		document.form1.numero_licencia_conductor.disabled = false;
		document.form1.categoria_licencia_conductor.disabled = false;
		document.form1.restriccion_conductor.disabled = false;
		document.form1.tipo_fecha.disabled = false;
	}
	else
	{
		document.form1.numero_licencia_conductor.disabled = true;
		document.form1.categoria_licencia_conductor.disabled = true;
		document.form1.restriccion_conductor.disabled = true;
		document.form1.tipo_fecha.disabled = true;
	}

	habilitar_fecha(document.form1.fecha_licencia_conductor,valor);
	habilitar_lista_campo(document.form1.lugar_expedicion,valor);
}

/**
 * Habilita los campos del SOAT cuando se marca 
 * @param valor valor del campo del SOAT (S-N)
 */

function habilitar_soat()
{
	if (document.form1.vehiculo_soat.value == 'S')
		valor = 'S';
	else
		valor = 'N';

	if(valor == "S")
		document.form1.numero_soat.disabled = false;
	else if (document.form1.vehiculo_soat.value != 'S')
		document.form1.numero_soat.disabled = true;

	habilitar_fecha(document.form1.fecha_vencimiento_soat,valor);
	habilitar_lista_campo(document.form1.aseguradora_soat,valor);
}


/**
 * Habilita los campos del examen cuando se marca 
 * @param valor valor del campo del examen
 */

function habilitar_examen(valor)
{
	if(valor == 1 || valor == 2)
	{
		document.form1.res_exa_cond.disabled = false;
		document.form1.grado_examen_conductor.disabled = false;
	}
	else
	{
		document.form1.res_exa_cond.disabled = true;
		document.form1.grado_examen_conductor.disabled = true;
	}
}


/**
 * Igualar los campos del propietario con los 
 * valores del conductor cuando se marca que corresponde a la misma persona
 * @param valor valor del campo de control (S-N)
 */

function habilitar_datos_propietario(valor)
{
	if(valor == "S")
	{
		/*document.form1.primer_apellido_propietario.disabled = true;
		document.form1.segundo_apellido_propietario.disabled = true;
		document.form1.primer_nombre_propietario.disabled = true;
		document.form1.segundo_nombre_propietario.disabled = true;
		document.form1.tipo_documento_propietario.disabled = true;
		document.form1.numero_documento_propietario.disabled = true;*/
		
		document.getElementById("primer_apellido_propietario").value = document.getElementById("primer_apellido_conductor").value;
		document.getElementById("segundo_apellido_propietario").value = document.getElementById("segundo_apellido_conductor").value;
		document.getElementById("primer_nombre_propietario").value = document.getElementById("primer_nombre_conductor").value;
		document.getElementById("segundo_nombre_propietario").value = document.getElementById("segundo_nombre_conductor").value;
		document.getElementById("tipo_documento_propietario").value = document.getElementById("tipo_documento_conductor").value;
		document.getElementById("numero_documento_propietario").value = document.getElementById("numero_documento_conductor").value;
		document.getElementById("huella_frenado").focus();
		
		/*document.form1.primer_apellido_propietario.value = document.form1.primer_apellido_conductor.value;
		document.form1.segundo_apellido_propietario.value = document.form1.segundo_apellido_conductor.value;
		document.form1.primer_nombre_propietario.value = document.form1.primer_nombre_conductor.value;
		document.form1.segundo_nombre_propietario.value = document.form1.segundo_nombre_conductor.value;
		document.form1.tipo_documento_propietario.value = document.form1.tipo_documento_conductor.value;
		document.form1.numero_documento_propietario.value = document.form1.numero_documento_conductor.value;*/
	}
	else {
		document.getElementById("primer_apellido_propietario").value = "";
		document.getElementById("segundo_apellido_propietario").value = "";
		document.getElementById("primer_nombre_propietario").value = "";
		document.getElementById("segundo_nombre_propietario").value = "";
		document.getElementById("tipo_documento_propietario").value = "";
		document.getElementById("numero_documento_propietario").value = "";
		
		
		/*document.form1.primer_apellido_propietario.value = "";
		document.form1.segundo_apellido_propietario.value = "";
		document.form1.primer_nombre_propietario.value = "";
		document.form1.segundo_nombre_propietario.value = "";
		document.form1.tipo_documento_propietario.value = "";
		document.form1.numero_documento_propietario.value = "";*/
	}
}



function cambiar_tipo_usuario(valor)
{
	var numero_empresa = document.getElementById("obj_nro_doc_empresa");
	var tipo_empresa= document.getElementById("obj_tipo_doc_empresa");
	var tipo_empresa_campo = document.getElementById("obj_tipo_doc_empresa_campo");
	
			
	switch(valor)
	{
			case "": 
						numero_empresa.style.display = "none";
						tipo_empresa.style.display = "none";
						tipo_empresa_campo.style.display = "none";
				break;
			case "DI": 
			numero_empresa.style.display = "none";
			tipo_empresa.style.display = "none";
			tipo_empresa_campo.style.display = "none";
				break;
		

			case "TP":
			numero_empresa.style.display = "inline";
			tipo_empresa.style.display = "inline";
			tipo_empresa_campo.style.display = "inline";
			break;
			case "TI":
						numero_empresa.style.display = "inline";
						tipo_empresa.style.display = "inline";
						tipo_empresa_campo.style.display = "inline";
			break;
			case "TM":
						numero_empresa.style.display = "inline";
						tipo_empresa.style.display = "inline";
						tipo_empresa_campo.style.display = "inline";
			break;
		
			default:
			      numero_empresa.style.display = "none";
												tipo_empresa.style.display = "none";
						tipo_empresa_campo.style.display = "none";

						
	}
}


/**
 * Habilita los campos de ingreso de fecha de digitacion de accidentes
 * en caso de que la fecha de generacion de informe a ministerio
 * sea fecha_digitacion
 */

function habilita_fecha_digitacion(valor)
{
	var digitacion = document.getElementById("consulta_fecha_digitacion");
	var ocurrencia = document.getElementById("consulta_fecha_ocurrencia");
	
				
	switch(valor)
	{
			case "": 
						digitacion.style.display = "none";
						ocurrencia.style.display = "none";
						
						
				break;
			case "1": 
						digitacion.style.display = "none";
						ocurrencia.style.display = "inline";
				break;
		

			case "2":
						digitacion.style.display = "inline";
						ocurrencia.style.display = "none";
			break;
			
		
			default:
						digitacion.style.display = "none";
						ocurrencia.style.display = "none";
						
	}
}
/**
 * Compara dos rangos de fechas y verifica que la fecha inicial
 * no sea mayor a la fecha2, de ser asi muestra un mensaje de alerta
 * posteriormente borra el dato de la fecha final para que sea ingresado
 * nuevamente
 */


function Compara_fechas(fecha_inicial,fecha_final,mensaje)
{
			var mensaje1 = "LA FECHA INICIAL DE OCURRENCIA ES MAYOR A LA FECHA FINAL DE OCURRENCIA";
			var mensaje2 = "LA FECHA INICIAL DE DIGITACION ES MAYOR A LA FECHA FINAL DE DIGITACION";
			
			var bandera1 = -1;
			var bandera2 = -1;
			
			if(isDate(fecha_inicial.value,"dd/MM/yyyy"))
				{
				 bandera1 = 1;
				}
				

			if(isDate(fecha_final.value,"dd/MM/yyyy"))
				{
				bandera2 = 1;
				}
				

			if(bandera1 == 1 && bandera2 == 1)
			{	
							
				if((fecha_inicial.value)>(fecha_final.value))
				 {
				  if(mensaje == 1)
				   alert(mensaje1);
				  else
				   alert(mensaje2);
				 	fecha_final.focus();
				 	fecha_final.value="";
				 }
				 else
				 {
				   document.getElementById("boton_generar").disabled = false;
				 } 
			} 
	}
	

function valida_fecha_licencia(valor)
{
	var f_licencia_cond = document.getElementById("fecha_licencia_conductor");
	var fecha_actual = new Date(); 
	var f_actual = formatDate(fecha_actual,"dd/MM/y");
	var tipo_fecha = document.getElementById("tipo_fecha");
		
	if(tipo_fecha.value == 1)
	{
	 if (compareDates(valor,"dd/MM/y",f_actual,"dd/MM/y") == 1)
	 {
			display(f_licencia_cond.name+"_span","La fecha no puede ser mayor a "+f_actual);
			f_licencia_cond.focus();				
	 }
	}		
		
}


function ocultarObjeto_formulario(obj,id)
{	
	var gravedad_accidente = document.getElementById("obj_gravedad_accidente[]");
	var clase_accidente = document.getElementById("obj_clase_accidente[]");
	var tipo_choque = document.getElementById("obj_tipo_choque[]");
	var hora_ocurrencia = document.getElementById("hora_ocurrencia");
	var hora_levantamiento_horas = document.getElementById("hora_levantamiento"+"_horas");
	var hora_levantamiento_minutos = document.getElementById("hora_levantamiento"+"_minutos");
	var totalheridos = document.getElementById("total_heridos");
	var totalmuertos = document.getElementById("total_muertos");
	var totalvehiculos = document.getElementById("total_vehiculos");
	var dia_accidente = document.getElementById("obj_dia_accidente[]");
	var estado_tiempo = document.getElementById("obj_estado_tiempo[]");
	var causas_probables = document.getElementById("obj_causas_probables[]");
	
	var numero_vehiculo = document.getElementById("numero_vehiculo");
	var primer_nombre_conductor = document.getElementById("primer_nombre_conductor");
	var segundo_nombre_conductor = document.getElementById("segundo_nombre_conductor");
	var primer_apellido_conductor = document.getElementById("primer_apellido_conductor");
	var segundo_apellido_conductor = document.getElementById("segundo_apellido_conductor");
	var edad_conductor = document.getElementById("edad_conductor");
	var sexo_conductor = document.getElementById("obj_sexo_conductor[]");
	var estado_conductor = document.getElementById("obj_estado_conductor[]");
	var porta_licencia = document.getElementById("obj_porta_licencia[]");
	var tipo_fecha_lic_conductor = document.getElementById("obj_tipo_fecha_lic_conductor[]");
	var fecha_lic_conduccion = document.getElementById("obj_fecha_lic_conduccion");
	var categoria_licencia = document.getElementById("obj_categoria_licencia[]");
	var restricciones_licencia = document.getElementById("obj_restricciones_licencia[]");
	var cinturon_conductor = document.getElementById("obj_cinturon_conductor[]");
	var casco_conductor = document.getElementById("obj_casco_conductor[]");
	var tipo_vehiculo = document.getElementById("obj_tipo_vehiculo[]");
	var servicio_vehiculo = document.getElementById("obj_servicio_vehiculo[]");
	var defectos_en = document.getElementById("obj_defectos_en[]");
	var empresa = document.getElementById("obj_empresa[]");
	var causa_conductor = document.getElementById("obj_causa_conductor[]");
	
	var numero_victima = document.getElementById("numero_victima");
	var numero_vehiculo_vic = document.getElementById("numero_vehiculo_vic");
	var primer_nombre_victima = document.getElementById("primer_nombre_victima");
	var segundo_nombre_victima = document.getElementById("segundo_nombre_victima");
	var primer_apellido_victima = document.getElementById("primer_apellido_victima");
	var segundo_apellido_victima = document.getElementById("segundo_apellido_victima");
	var edad_victima = document.getElementById("edad_victima");
	var sexo_victima = document.getElementById("obj_sexo_victima[]");
	var cinturon_victima = document.getElementById("obj_cinturon_victima[]");
	var casco_victima	 = document.getElementById("obj_casco_victima[]");
	var condicion_victima = document.getElementById("obj_condicion_victima[]");
	var gravedad_victima = document.getElementById("obj_gravedad_victima[]");
		
	if (obj.checked == false) {
     document.getElementById(id).style.display = "none";
     
     switch(obj.id)
		 {
		  	case "adicional[0]": //FORMULARIO CONSULTA GENERAL
		  		gravedad_accidente.selectedIndex = -1;
		 			clase_accidente.selectedIndex = -1;
		 			tipo_choque.selectedIndex = -1;
		 			hora_ocurrencia.value = ""; 
		 			hora_levantamiento_horas.value = "";
		 			hora_levantamiento_minutos.value = "";
		 			totalheridos.value = '';
		 			totalmuertos.value = ''; 
		 			totalvehiculos.value = "";
		 			dia_accidente.selectedIndex = -1;
		 			estado_tiempo.selectedIndex = -1; 
		 			causas_probables.selectedIndex = -1;
		 						
		 		break;	
		 		case "adicional1[0]": //FORMULARIO CONSULTA CONDUCTOR
					numero_vehiculo.value = "";
					primer_nombre_conductor.value = "";
					segundo_nombre_conductor.value = "";
					primer_apellido_conductor.value = "";
					segundo_apellido_conductor.value = "";
					edad_conductor.value = "";
					sexo_conductor.selectedIndex = -1;
					estado_conductor.selectedIndex = -1;
					porta_licencia.selectedIndex = -1;
					tipo_fecha_lic_conductor.selectedIndex = -1;
					fecha_lic_conduccion.value= "";
					categoria_licencia.selectedIndex = -1;	
					restricciones_licencia.selectedIndex = -1; 		
					cinturon_conductor.selectedIndex = -1;	 		
					casco_conductor.selectedIndex = -1;
					tipo_vehiculo .selectedIndex = -1;
					servicio_vehiculo.selectedIndex = -1;
					defectos_en.selectedIndex = -1;
					empresa = document.getElemen	 		
					causa_conductor.selectedIndex = -1;	
								
		 		break;
		 		case "adicional2[0]": //FORMULARIO CONSULTA VICTIMAS
					numero_victima.value = "";
					numero_vehiculo_vic.value = "";
					primer_nombre_victima.value = "";	
					segundo_nombre_victima.value = "";
					primer_apellido_victima.value = "";	
					segundo_apellido_victima.value = ""; 	
					edad_victima.value = ""; 	
					sexo_victima.selectedIndex = -1;	
					cinturon_victima.selectedIndex = -1; 	
					casco_victima.selectedIndex = -1;
					condicion_victima.selectedIndex = -1; 	
					gravedad_victima.selectedIndex = -1;
								 	
		 		break;
		 }	
	}
	else if (obj.checked == true){
     document.getElementById(id).style.display = "inline";
  }	
}

