<?php
session_start();

include("conexion.php");

@$xid = $_REQUEST['xid'];
@$xprovincia = $_REQUEST['xprovincia'];
@$xdistrito = $_REQUEST['xdistrito'];

@$xs_empresa=$_SESSION['s_empresa'];	

	?>			
	<script language="javascript">
	//alert("Tipooooooo")

	</script>										
	
	<?php

	
?>

<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>

			<select onchange="filtrar_distritos(this.value,''); return false;" class="input_texto"  style="padding:3px; letter-spacing:-1px;"  name="xprovincia" id="xprovincia" >

			<option value=""></option>

					<?php
					
					$r_provincia=mysqli_query($conexion,"SELECT * FROM ubprovincia u WHERE idDepa=$xid;");											
					
					while($row_provincia=mysqli_fetch_array($r_provincia)){
					
					
					?>
					
			<option value="<?php echo $row_provincia['idProv']; ?>" <?php if($xprovincia==$row_provincia['idProv']){ ?> selected="selected" <?php } ?> ><?php echo $row_provincia['provincia']; ?></option>									

					
					<?php
					
					
					}
					
					
					?>
			</select>
			
			<script language="javascript">
				document.getElementById('xprovincia').value = '<?php echo $xprovincia; ?>';	
				filtrar_distritos('<?php echo $xprovincia; ?>','<?php echo $xdistrito; ?>')
			</script>
			
				
									