<?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='mostrardetservicio()'>";
$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 class ='FacetDataTextC' align='center' colspan='3' width='480'><b><font color='red'>LISTA DE SERVICIOS</font></b></td></tr>";
$cadena = $cadena."<tr><td align='center' colspan='3' width='480'><input type='button' onClick='nuevaServicio();' value='Agregar Nuevo'></td></tr>";
$cadena = $cadena."<tr><td align='center' colspan='3' width='480'>".$cadenajef."</td></tr>";
$cadena = $cadena."<tr><td align='center' colspan='3' width='480'><div id='divdetserv'></div></td></tr>";
$cadena = $cadena."</table>";
echo $cadena;
?>

