<?php
include("../bd/sql_variables.php");
$db_conexion= mysql_connect("$sql_host", "$sql_usuario", "$sql_pass") or die(header ("No Disponible Servidor de Base de Datos"));
mysql_select_db("$sql_db");

//nombre de la jefatura
$sqljefatura = "select j_id as idj, j_desc as nom from tb_jefatura";
$cadenajef = "";
$cadenajef = $cadenajef."<select id='cbjef' onChange='mostrarserviciotp()'>";
$cadenajef = $cadenajef."<option value='0'>Seleccione Area/Dpto</option>";
$askjef=false;
$resultjefatura = mysql_query($sqljefatura);
while ($rowj= mysql_fetch_array($resultjefatura)){
	$cadenajef = $cadenajef."<option value='".$rowj['idj']."'>".$rowj['nom']."</option>";
	if($askjef==false){
	$idj=$rowj['idj'];
	$askjef=true;
	}
}
$cadenajef = $cadenajef."</select>";


$cadena = $cadena."<table>";
$cadena = $cadena."<tr><td width='480' colspan='2'><b><font color='red'>Relacion Jefatura y Tipo de Personal</font></b></td></tr>";
$cadena = $cadena."<tr><td class ='FacetDataTextC' align='left' width='80'>Area / Dpto:</td><td class ='FacetDataTextC' align='left' width='400'>".$cadenajef."</td></tr>";
$cadena = $cadena."<tr><td class ='FacetDataTextC' align='left' >Servicio:</td><td class ='FacetDataTextC' align='left' ><div id='divserv'></div></td></tr>";
$cadena = $cadena."<tr><td class ='FacetDataTextC' align='left' >Tipo Personal:</td><td class ='FacetDataTextC' align='left' ><div id='divservtp'></div></td></tr></table>";
$cadena = $cadena."<table><tr><td align='center'><input type='button' onClick='RelacionarTipoPersonal();' value='Relacionar'></td></tr>";
$cadena = $cadena."</table>";
echo $cadena;
?>

