
		  	  <tr>
		  	  <!-- ************************************************  INICIACION PROFESIONAL *************************************************************************************** -->
		  	    <td class=fichaden colspan="0" style="font-weight:bold;border-bottom:1px solid #ccc">
		  	    	Iniciaci&oacute;n Profesional
		  	    </td>
		  	  </tr>
		  	  <tr>
		  	  	<td>
		  	  		<table border="0" cellspacing="0" cellpadding="0" style="width:100%;height:100%">
		  	  			<tr>
		  	  				<td>
			  	  				<table border="0" style="width:100%;margin-bottom:-4">
			  	  					<tr>
					  	  				<td class=fichaden style="background-color:#fea;text-align:center;width:65">Curso</td>
					  	  				<td class=fichaden style="background-color:#fea;text-align:center;width:90">A&ntilde;o Academico</td>
					  	  				<td class=fichaden style="background-color:#fea;text-align:center;width:140">Centro Educativo</td>
					  	  				<td class=fichaden style="background-color:#fea;text-align:center;width:180">Denominaci&oacute;n del programa</td>
					  	  				<td class=fichaden style="background-color:#fea;text-align:center">Modalidad</td>
					  	  				<td class=fichaden style="background-color:#fea;text-align:center;width:90">Supera Prueba</td>
					  	  				<td class=fichaden style="background-color:#fea;text-align:center;width:50">G.E.S.O.</td>
					  	  				<td class=fichaden style="background-color:#fea;text-align:center;width:20">&nbsp;</td>
			  	  					<tr>
			  	  				</table>
		  	  				</td>
		  	  			</tr>
					  	  <?php
					  	  	$consultaHistorial=mysql_query("SELECT * FROM historial WHERE idAlumno=".$filaAl['id']." and nivel=2 ORDER BY id", $conexion);
					  	  	$cont=0;
					  	  	while($filaHistorial=mysql_fetch_array($consultaHistorial))
					  	  	{
					  	  ?>
					  	  <tr id=ip<?php echo $cont?>>
		  	  				<td>
		  	  					<table border="0" style="width:100%;margin-bottom:-4">
		  	  						<tr>
					  	  				<td class=fichaden style="background-color:#ddd;text-align:center;width:65;">
								  	      <select name="Ip<?php echo $cont?>cur" class=caja style="width:100%">
								  	      <?php
												$consultacur=mysql_query("SELECT * FROM cursos WHERE id=".$filaHistorial['idCurso'],$conexion);
												$filacur=mysql_fetch_array($consultacur);
								  	      ?>
								  	      		<option value="<?php echo $filacur['id']?>"><?php echo $filacur['cursos']?>
								  	      <?php
								  	      	$tipocurso=2;
								  	      	include("rellenarcurso.php")
								  	      ?>
								  	      </select>
					  	  				</td>
					  	  				<td class=fichaden style="background-color:#ddd;text-align:center;width:90">
								  	      <select name="Ip<?php echo $cont?>anio" id="Ip<?php echo $cont?>anio" class=caja style="width:100%" onChange="comprobarOtra('Ip<?php echo $cont?>anio','OtroIp<?php echo $cont?>anio')">
								  	      <?php
												$consultaanio=mysql_query("SELECT * FROM anioacademico WHERE id=".$filaHistorial['idAnio'],$conexion);
												$filaanio=mysql_fetch_array($consultaanio);
								  	      ?>
								  	      		<option value="<?php echo $filaanio['id']?>"><?php echo $filaanio['anioAcademico']?>
								  	      <?php
								  	      	include("rellenaranio.php")
								  	      ?>
								  	      		<option value="Otra">Otra
								  	      </select>
								  	      <input type="text" name="OtroIp<?php echo $cont?>anio" id="OtroIp<?php echo $cont?>anio" class="caja" value="" style="width:100%;display:none">
					  	  				</td>
					  	  				<td class=fichaden style="background-color:#ddd;text-align:center;width:140">
					  	  					<input type="text" name="Ip<?php echo $cont?>centro" maxlength="20" class="caja" value="<?php echo $filaHistorial['centro']?>" style="width:100%">
					  	  				</td>
					  	  				<td class=fichaden style="background-color:#ddd;text-align:center;width:180">
					  	  					<input type="text" name="Ip<?php echo $cont?>denpro" maxlength="50" class="caja" value="<?php echo $filaHistorial['programa']?>" style="width:100%">
					  	  				</td>
					  	  				<td class=fichaden style="background-color:#ddd;text-align:center">
								  	      <select name="Ip<?php echo $cont?>mod" id="Ip<?php echo $cont?>mod" class="caja" style="width:100%" onChange="comprobarOtra('Ip<?php echo $cont?>mod','OtroIp<?php echo $cont?>mod')">
								  	      		<option value="<?php echo $filaHistorial['modalidad']?>"><?php echo $filaHistorial['modalidad']?>
								  	      		<option value="Iniciaci&oacute;n profesional">Iniciaci&oacute;n profesional
								  	      		<option value="Formaci&oacute;n-empleo">Formaci&oacute;n-empleo
								  	      		<option value="Talleres profesionales">Talleres profesionales
								  	      		<option value="Necesidades educativas especiales">Necesidades educativas especiales
								  	      		<option value="Otra">Otra
								  	      </select>
								  	      <input type="text" name="OtroIp<?php echo $cont?>mod" id="OtroIp<?php echo $cont?>mod" class="caja" value="" style="width:100%;display:none">
					  	  				</td>
					  	  				<td class=fichaden style="background-color:#ddd;text-align:center;width:90">
								  	      <select name="Ip<?php echo $cont?>sup" class=caja style="width:100%">
								  	      		<option value="<?php echo $filaHistorial['superaPrueba']?>"><?php echo $filaHistorial['superaPrueba']?>
								  	      		<option value="SI">SI
								  	      		<option value="NO">NO
								  	      </select>
					  	  				</td>
					  	  				<td class=fichaden style="background-color:#ddd;text-align:center;width:50">
								  	      <select name="Ip<?php echo $cont?>obgeso" class=caja style="width:100%">
								  	      		<option value="<?php echo $filaHistorial['obtieneGeso']?>"><?php echo $filaHistorial['obtieneGeso']?>
								  	      		<option value="SI">SI
								  	      		<option value="NO">NO
								  	      </select>
					  	  				</td>
					  	  				<td class=fichaden style="background-color:#ddd;text-align:center;width:20"><a href="javascript:confBorrar('<?php echo $filaHistorial['id']?>.<?php echo $filaAl['id']?>',4)" title="Eliminar Fila"><img src="../../imagenes/cruz.gif" style="border:0;width:14;height:14"></a></td>
		  	  						<tr>
		  	  					</table>
		  	  				</td>
		  	  			</tr>
		  	  			  <input type="hidden" name="idIp<?php echo $cont?>" value="<?php echo $filaHistorial['id']?>">
					  	  <?php
					  	  		$cont++;
					  	  	}
					  	  ?>
					  	  <input type="hidden" name="numExistentesIp" value="<?php echo $cont?>">
					  	  <?php
							$j=$cont; //esta variable nos va a decir cual es el primer elemento de la lista vacia
					  	  	for(;$cont<=2;$cont++)
					  	  	{
					  	  		if($j==$cont)
					  	  		{
					  	  			$display="block";
					  	  		} else
					  	  		{
					  	  			$display="none";
					  	  		}
					  	  ?>
					  	  <tr>
		  	  				<td>
		  	  					<span id=ip<?php echo $cont?> style="display:<?php echo $display?>">
		  	  					<table border="0" style="width:100%;margin-bottom:-4">
		  	  						<tr>
					  	  				<td class=fichaden style="background-color:#ddd;text-align:center;width:65;">
								  	      <select name="Ip<?php echo $cont?>cur" class=caja style="width:100%"  onchange="document.getElementById('ip<?php echo $cont+1?>').style.display='block'">
								  	      		<option value="0">
								  	      <?php
								  	      	$tipocurso=2;
								  	      	include("rellenarcurso.php")
								  	      ?>
								  	      </select>
					  	  				</td>
					  	  				<td class=fichaden style="background-color:#ddd;text-align:center;width:90">
								  	      <select name="Ip<?php echo $cont?>anio" id="Ip<?php echo $cont?>anio" class=caja style="width:100%" onChange="comprobarOtra('Ip<?php echo $cont?>anio','OtroIp<?php echo $cont?>anio')">
								  	      		<option value="0">
								  	      <?php
								  	      	include("rellenaranio.php")
								  	      ?>
								  	      		<option value="Otra">Otra
								  	      </select>
								  	      <input type="text" name="OtroIp<?php echo $cont?>anio" id="OtroIp<?php echo $cont?>anio" class="caja" value="" style="width:100%;display:none">
					  	  				</td>
					  	  				<td class=fichaden style="background-color:#ddd;text-align:center;width:140">
					  	  					<input type="text" name="Ip<?php echo $cont?>centro" maxlength="20" class="caja" value="" style="width:100%">
					  	  				</td>
					  	  				<td class=fichaden style="background-color:#ddd;text-align:center;width:180">
					  	  					<input type="text" name="Ip<?php echo $cont?>denpro" maxlength="50" class="caja" value="" style="width:100%">
					  	  				</td>
					  	  				<td class=fichaden style="background-color:#ddd;text-align:center">
								  	      <select name="Ip<?php echo $cont?>mod" id="Ip<?php echo $cont?>mod" class="caja" style="width:100%" onChange="comprobarOtra('Ip<?php echo $cont?>mod','OtroIp<?php echo $cont?>mod')">
								  	      		<option value="">
								  	      		<option value="Iniciaci&oacute;n profesional">Iniciaci&oacute;n profesional
								  	      		<option value="Formaci&oacute;n-empleo">Formaci&oacute;n-empleo
								  	      		<option value="Talleres profesionales">Talleres profesionales
								  	      		<option value="Necesidades educativas especiales">Necesidades educativas especiales
								  	      		<option value="Otra">Otra
								  	      </select>
								  	      <input type="text" name="OtroIp<?php echo $cont?>mod" id="OtroIp<?php echo $cont?>mod" class="caja" value="" style="width:100%;display:none">
					  	  				</td>
					  	  				<td class=fichaden style="background-color:#ddd;text-align:center;width:90">
								  	      <select name="Ip<?php echo $cont?>sup" class=caja style="width:100%">
								  	      		<option value="">
								  	      		<option value="SI">SI
								  	      		<option value="NO">NO
								  	      </select>
					  	  				</td>
					  	  				<td class=fichaden style="background-color:#ddd;text-align:center;width:50">
								  	      <select name="Ip<?php echo $cont?>obgeso" class=caja style="width:100%">
								  	      		<option value="">
								  	      		<option value="SI">SI
								  	      		<option value="NO">NO
								  	      </select>
					  	  				</td>
					  	  				<td class=fichaden style="background-color:#ddd;text-align:center;width:20">&nbsp;</td>
		  	  						<tr>
		  	  					</table>
		  	  					</span>
		  	  				</td>
		  	  			</tr>
					  	  <?php
					  	  	}
					  	  ?>
		  	  		</table>
		  	  	</td>
		  	  </tr>
