<?
session_start();
if ($_SESSION['estado'] != "ON")
		{
		?>
		<script>
			parent.location.href = 'index.php';
		</script>
		<? 
		exit();
		}
include "../conex.php";                // ***************  29/11(09 ********************
$comproban_buscar = $_GET["num"];


$cont=0;
$sql_bc = "SELECT comprobante FROM cabeza_pago_cliente WHERE comprobante = '$comproban_buscar'";
	$res_bc = mysql_query($sql_bc,$enlace);
	if(mysql_fetch_object($res_bc))
		{
		$bc_rsoc = mysql_result($res_bc, $cont, "comprobante");
		$cont=$cont+1;
        }
	
?>
	
<script language="javascript" type="text/javascript">
	
	
	if ('<? echo $cont;?>'!=0)
	  {
	  window.opener.document.form1.comproban.value ='';
	  window.opener.document.form1.comproban.focus();
		alert("Comprobante Existe !!!");
	  }
	
		window.close();
		
	</script>
