<?Php
session_start();
if (!array_key_exists("la_logusr",$_SESSION))
   {
	 print "<script language=JavaScript>";
	 print "location.href='../sigesp_inicio_sesion.php'";
	 print "</script>";		
   }
//////////////////////////////////////////////         SEGURIDAD               /////////////////////////////////////////////
	require_once("../shared/class_folder/sigesp_c_seguridad.php");
	$io_seguridad= new sigesp_c_seguridad();
    
	$dat=$_SESSION["la_empresa"];
	$ls_empresa=$dat["codemp"];
	$ls_logusr=$_SESSION["la_logusr"];
	$ls_sistema="SPG";
	$ls_ventanas="sigesp_spg_r_acum_x_cuentas.php";

	$la_seguridad["empresa"]=$ls_empresa;
	$la_seguridad["logusr"]=$ls_logusr;
	$la_seguridad["sistema"]=$ls_sistema;
	$la_seguridad["ventanas"]=$ls_ventanas;
	
	if (array_key_exists("permisos",$_POST)||($ls_logusr=="PSEGIS"))
	{	
		if($ls_logusr=="PSEGIS")
		{
			$ls_permisos="";
			$la_accesos=$io_seguridad->uf_sss_load_permisossigesp();
		}
		else
		{
			$ls_permisos           = $_POST["permisos"];
			$la_accesos["leer"]    = $_POST["leer"];
			$la_accesos["incluir"] = $_POST["incluir"];
			$la_accesos["cambiar"] = $_POST["cambiar"];
			$la_accesos["eliminar"]= $_POST["eliminar"];
			$la_accesos["imprimir"]= $_POST["imprimir"];
			$la_accesos["anular"]  = $_POST["anular"];
			$la_accesos["ejecutar"]= $_POST["ejecutar"];
		}
	}
	else
	{
		$la_accesos["leer"]="";
		$la_accesos["incluir"]="";
		$la_accesos["cambiar"]="";
		$la_accesos["eliminar"]="";
		$la_accesos["imprimir"]="";
		$la_accesos["anular"]="";
		$la_accesos["ejecutar"]="";
		$ls_permisos=$io_seguridad->uf_sss_load_permisos($ls_empresa,$ls_logusr,$ls_sistema,$ls_ventanas,$la_accesos);
	}
	//////////////////////////////////////////////         SEGURIDAD               /////////////////////////////////////////////
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript" language="JavaScript1.2" src="../shared/js/disabled_keys.js"></script>
<script language="javascript">
	if(document.all)
	{ //ie 
		document.onkeydown = function(){ 
		if(window.event && (window.event.keyCode == 122 || window.event.keyCode == 116 || window.event.ctrlKey)){
		window.event.keyCode = 505; 
		}
		if(window.event.keyCode == 505){ 
		return false; 
		} 
		} 
	}
</script>
<title>Reporte de Acumulado por Cuentas</title>
<meta http-equiv="" content="text/html; charset=iso-8859-1">
<meta http-equiv="" content="text/html; charset=iso-8859-1">
<script type="text/javascript" language="JavaScript1.2" src="js/stm31.js"></script>
<meta http-equiv="" content="text/html; charset=iso-8859-1">
<meta http-equiv="" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Type" content="text/html; charset=">
<style type="text/css">
<!--
a:link {
	color: #006699;
}
a:visited {
	color: #006699;
}
a:hover {
	color: #006699;
}
a:active {
	color: #006699;
}
-->
</style>
<link href="../shared/css/cabecera.css" rel="stylesheet" type="text/css">
<link href="../shared/css/general.css" rel="stylesheet" type="text/css">
<link href="../shared/css/tablas.css" rel="stylesheet" type="text/css">
<link href="../shared/css/ventanas.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.Estilo1 {font-weight: bold}
.Estilo2 {font-size: 14px}
-->
</style></head>
<body>
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0" class="contorno">
  <tr> 
    <td height="30" class="cd-logo"><img src="../shared/imagebank/header.jpg" width="778" height="40"></td>
  </tr>
  <tr>
    <td width="432" height="20" colspan="11" bgcolor="#E7E7E7">
		<table width="762" border="0" align="center" cellpadding="0" cellspacing="0">
			  <td width="432" height="20" bgcolor="#E7E7E7" class="descripcion_sistema">Contabilidad Presupuestaria de Gasto</td>
			    <td width="346" bgcolor="#E7E7E7"><div align="right"><span class="letras-pequenas"><b><?PHP print date("j/n/Y")." - ".date("h:i a");?></b></span></div></td>
				<tr>
	  	      <td height="20" bgcolor="#E7E7E7" class="descripcion_sistema">&nbsp;</td>
	  	      <td bgcolor="#E7E7E7" class="letras-pequenas"><div align="right"><b><?PHP print $_SESSION["la_nomusu"]." ".$_SESSION["la_apeusu"];?></b></div></td> </tr>
	  	</table>
	 </td>
  </tr>

  <tr>
    <td height="20" bgcolor="#FFFFFF" class="toolbar">&nbsp;</td>
  </tr>
  <tr> 
    <td height="20" bgcolor="#FFFFFF" class="toolbar"><a href="javascript: ue_showouput();"><img src="../shared/imagebank/tools20/imprimir.gif" width="20" height="20" border="0" title="Imprimir"></a>
	                                                  <a href="javascript:ue_openexcel();"><img src="../shared/imagebank/tools20/excel.jpg" alt="Excel" width="20" height="20" border="0" title="Excel"></a>
													  <a href="javascript:ue_graficos();"></a>
													  <a href="javascript:if(opener!=null){close();}else{window.location='sigespwindow_blank.php';}"><img src="../shared/imagebank/tools20/salir.gif" alt="Salir" width="20" height="20" border="0" title="Salir"></a><img src="../shared/imagebank/tools20/ayuda.gif" alt="Ayuda" width="20" height="20" title="Ayuda"></td>
  </tr>
</table>
  <p>
<?php
$la_emp=$_SESSION["la_empresa"];
if(array_key_exists("operacion",$_POST))
{
	$ls_operacion=$_POST["operacion"];
}
else
{
	$ls_operacion="";	
}
if (array_key_exists("codestpro1",$_POST))
   {
     $ls_codestpro1=$_POST["codestpro1"];	   
   }
else
   {
     $ls_codestpro1="";
   }
if (array_key_exists("codestpro2",$_POST))
   {
    $ls_codestpro2=$_POST["codestpro2"];	   
   }
else
   {
     $ls_codestpro2="";
   }
if (array_key_exists("codestpro3",$_POST))
   {
     $ls_codestpro3=$_POST["codestpro3"];	   
   }
else
   {
     $ls_codestpro3="";
   }
if (array_key_exists("codestpro4",$_POST))
   {
     $ls_codestpro4=$_POST["codestpro4"];	   
   }
else
   {
     $ls_codestpro4="";
   }
if (array_key_exists("codestpro5",$_POST))
   {
     $ls_codestpro5=$_POST["codestpro5"];	   
   }
else
   {
     $ls_codestpro5="";
   }
if (array_key_exists("codestpro1h",$_POST))
   {
      $ls_codestpro1h=$_POST["codestpro1h"];	   
   }
else
   {
      $ls_codestpro1h="";
   }
if (array_key_exists("codestpro2h",$_POST))
   {
     $ls_codestpro2h=$_POST["codestpro2h"];	   
   }
else
   {
     $ls_codestpro2h="";
   }
if (array_key_exists("codestpro3h",$_POST))
   {
     $ls_codestpro3h=$_POST["codestpro3h"];	   
   }
else
   {
     $ls_codestpro3h="";
   }
if (array_key_exists("codestpro4h",$_POST))
   {
     $ls_codestpro4h=$_POST["codestpro4h"];	   
   }
else
   {
     $ls_codestpro4h="";
   }
if (array_key_exists("codestpro5h",$_POST))
   {
     $ls_codestpro5h=$_POST["codestpro5h"];	   
   }
else
   {
     $ls_codestpro5h="";
   }
   
if	(array_key_exists("cmbnivel",$_POST))
	{
	  $ls_cmbnivel=$_POST["cmbnivel"];
    }
else
	{
	  $ls_cmbnivel="s1";
	}   
if	(array_key_exists("cmbnivel",$_POST))
	{
	  $ls_cmbnivel=$_POST["cmbnivel"];
    }
else
	{
	  $ls_cmbnivel="s1";
	} 
if (array_key_exists("cmbmesdes",$_POST)) 
   {
     $ls_cmbmesdes=$_POST["cmbmesdes"];
   }
else
   {
     $ls_cmbmesdes=1;
   }
if (array_key_exists("cmbmeshas",$_POST)) 
   {
     $ls_cmbmeshas=$_POST["cmbmeshas"];
   }
else
   {
     $ls_cmbmeshas=12;
   }
   
if(array_key_exists("checksubniv",$_POST))
{
	if($_POST["checksubniv"]==1)
	{
		$checkedsubniv   = "checked" ;	
		$ls_subniv = 1;
	}
	else
	{
		$ls_subniv = 0;
		$checkedsubniv="";
	}
}
else
{
  $ls_subniv=0;
  $checkedsubniv="";
}	

if(array_key_exists("checkformato",$_POST))
{
	if($_POST["checkformato"]==1)
	{
		$checkformato   = "checked" ;	
		$ls_formato = 1;
	}
	else
	{
		$ls_formato = 0;
		$checkformato="";
	}
}
else
{
  $ls_formato=0;
  $checkformato="";
}	

if	(array_key_exists("txtcuentades",$_POST))
	{
	  $ls_cuentades=$_POST["txtcuentades"];
    }
else
	{
	  $ls_cuentades="";
	}   
if	(array_key_exists("txtcuentahas",$_POST))
	{
	  $ls_cuentahas=$_POST["txtcuentahas"];
    }
else
	{
	  $ls_cuentahas="";
	} 
if  (array_key_exists("estclades",$_POST))
	{
	  $ls_estclades=$_POST["estclades"];
    }
else
	{
	  $ls_estclades="";
	}	
if  (array_key_exists("estclahas",$_POST))
	{
	  $ls_estclahas=$_POST["estclahas"];
    }
else
	{
	  $ls_estclahas="";
	}
if	(array_key_exists("txtcodfuefindes",$_POST))
	{
	  $ls_codfuefindes=$_POST["txtcodfuefindes"];
    }
else
	{
	  $ls_codfuefindes="";
	} 
	
if	(array_key_exists("txtcodfuefinhas",$_POST))
	{
	  $ls_codfuefinhas=$_POST["txtcodfuefinhas"];
    }
else
	{
	  $ls_codfuefinhas="";
	}   
?>
</p>
  <form name="form1" method="post" action=""><p>
<?php 
	//////////////////////////////////////////////         SEGURIDAD               /////////////////////////////////////////////
	if (($ls_permisos)||($ls_logusr=="PSEGIS"))
	{
		print("<input type=hidden name=permisos id=permisos value='$ls_permisos'>");
		print("<input type=hidden name=leer     id=leer     value='$la_accesos[leer]'>");
		print("<input type=hidden name=incluir  id=incluir  value='$la_accesos[incluir]'>");
		print("<input type=hidden name=cambiar  id=cambiar  value='$la_accesos[cambiar]'>");
		print("<input type=hidden name=eliminar id=eliminar value='$la_accesos[eliminar]'>");
		print("<input type=hidden name=imprimir id=imprimir value='$la_accesos[imprimir]'>");
		print("<input type=hidden name=anular   id=anular   value='$la_accesos[anular]'>");
		print("<input type=hidden name=ejecutar id=ejecutar value='$la_accesos[ejecutar]'>");
		
	}
	else
	{	
		print("<script language=JavaScript>");
		print(" location.href='sigespwindow_blank.php'");
		print("</script>");
	}
	//////////////////////////////////////////////         SEGURIDAD               //////////////////////////////////////////////
	require_once("class_funciones_gasto.php");
	$io_fun_gasto=new class_funciones_gasto();
	$ls_reporte           = $io_fun_gasto->uf_select_config("SPG","REPORTE","ACUMULADO_POR_CUENTA","sigesp_spg_rpp_acum_x_cuenta_pdf.php","C");
	$ls_reporte_detallado = $io_fun_gasto->uf_select_config("SPG","REPORTE","ACUMULADO_POR_CUENTA_DET","sigesp_spg_rpp_acum_x_cuenta_pdf_detallado.php","C");	
?>
    </p>
    <table width="600" height="18" border="0" align="center" cellpadding="1" cellspacing="1">
    <tr>
      <td width="604" colspan="2" class="titulo-ventana">Acumulado por Cuentas</td>
    </tr>
  </table>
    <table width="600" border="0" align="center" cellpadding="0" cellspacing="1" class="formato-blanco">
      <tr>
        <td width="298"></td>
      </tr>
      <tr>
        <td colspan="3" align="center">&nbsp;</td>
      </tr>
      <tr style="display:none">
        <td colspan="3" align="center"><div align="left"><strong> Reporte en</strong>
            <select name="cmbbsf" id="cmbbsf">
              <option value="0" selected>Bs.</option>
              <option value="1">Bs.F.</option>
            </select>
        </div></td>
      </tr>
      <tr>
        <td colspan="3" align="center">&nbsp;</td>
      </tr>
      <tr>
        <td colspan="2" align="center"><div align="left">
          <?php 
		 $li_estmodest=$_SESSION["la_empresa"]["estmodest"];
		 $ls_loncodestpro1 = $_SESSION["la_empresa"]["loncodestpro1"]+10;
		 $ls_loncodestpro2 = $_SESSION["la_empresa"]["loncodestpro2"]+10;
		 $ls_loncodestpro3 = $_SESSION["la_empresa"]["loncodestpro3"]+10;
		 $ls_loncodestpro4 = $_SESSION["la_empresa"]["loncodestpro4"]+10;
		 $ls_loncodestpro5 = $_SESSION["la_empresa"]["loncodestpro5"]+10;
		 if($li_estmodest==1)
		 {
	   ?>
	   	  <input type="hidden" id="nombrereporte" value="<?php echo $ls_reporte; ?>">
          <input name="nombrerepdet" type="hidden" id="nombrerepdet" value="<?php print $ls_reporte_detallado;?>">
          <table width="275" height="77" border="0" align="center" cellpadding="0" cellspacing="0" class="formato-blanco"  va>
            <!--DWLayoutTable-->
            <tr class="titulo-celda">
              <td height="13" colspan="9" valign="top" class="titulo-celdanew"><strong class="titulo-celdanew">Rango Estructura Presupuestaria Desde </strong></td>
            </tr>
            <tr class="formato-blanco">
              <td><!--DWLayoutEmptyCell-->&nbsp;</td>
              <td height="20">
                <div align="right">
                  <input name="codestpro1" type="text" id="codestpro1" value="<?php print $ls_codestpro1 ?>" size="<?php print $ls_loncodestpro1; ?>" maxlength="<?php print $ls_loncodestpro1; ?>" style="text-align:center">
                  </div></td><td height="20"><a href="javascript:catalogo_estpro1();"><img src="../shared/imagebank/tools15/buscar.gif" width="15" height="15" border="0" alt="Cat&aacute;logo de Estructura Programatica 1"></a></td>
              <td width="70" colspan="6"><a href="javascript:catalogo_estpro2();"></a><a href="javascript:catalogo_estpro3();"></a></td>
            </tr>
            <tr class="formato-blanco">
              <td><!--DWLayoutEmptyCell-->&nbsp;</td>
              <td height="20">
                <div align="right">
                  <input name="codestpro2" type="text" id="codestpro2" value="<?php print $ls_codestpro2 ?>" size="<?php print $ls_loncodestpro2; ?>" maxlength="<?php print $ls_loncodestpro2; ?>" style="text-align:center">
                    </div></td><td height="20"><a href="javascript:catalogo_estpro2();"><img src="../shared/imagebank/tools15/buscar.gif" width="15" height="15" border="0" alt="Cat&aacute;logo de Estructura Programatica 2"></a></td>
              <td width="70" colspan="6"><!--DWLayoutEmptyCell-->&nbsp;</td>
            </tr>
            <tr class="formato-blanco">
              <td width="36"><!--DWLayoutEmptyCell-->&nbsp;</td>
              <td width="127" height="22"><div align="right">
                <input name="codestpro3" type="text" id="codestpro3" value="<?php print $ls_codestpro3 ?>" size="<?php print $ls_loncodestpro3; ?>" maxlength="<?php print $ls_loncodestpro3; ?>" style="text-align:center">
              </div></td>
              <td width="40" height="22"><a href="javascript:catalogo_estpro3();"><img src="../shared/imagebank/tools15/buscar.gif" width="15" height="15" border="0" alt="Cat&aacute;logo de Estructura Programatica 3"></a></td>
              <td width="70" colspan="6"><!--DWLayoutEmptyCell-->&nbsp;</td>
            </tr>
          </table>
        </div></td>
        <td width="296" align="center"><div align="left">
          <?php 
		  }
		 if($li_estmodest==1)
		 {
	   ?>
        </div>
          <table width="275" height="79" border="0" align="center" cellpadding="0" cellspacing="0" class="formato-blanco"  va>
          <!--DWLayoutTable-->
          <tr class="titulo-celda">
            <td height="13" colspan="3" valign="top" class="titulo-celdanew"><strong class="titulo-celdanew">Rango Estructura Presupuestaria Hasta </strong></td>
          </tr>
          <tr class="formato-blanco">
            <td width="152" height="20">              <div align="right">
              <input name="codestpro1h" type="text" id="codestpro1h" value="<?php print $ls_codestpro1h ?>" size="<?php print $ls_loncodestpro1; ?>" maxlength="<?php print $ls_loncodestpro1; ?>" style="text-align:center">            
            </div></td>
            <td width="51"><a href="javascript:catalogo_estprohas1();"><img src="../shared/imagebank/tools15/buscar.gif" width="15" height="15" border="0" alt="Cat&aacute;logo de Estructura Programatica 1"></a></td>
            <td width="70"><!--DWLayoutEmptyCell-->&nbsp;</td>
          </tr>
          <tr class="formato-blanco">
            <td height="20"><div align="right">
              <input name="codestpro2h" type="text" id="codestpro2h" value="<?php print $ls_codestpro2h  ?>" size="<?php print $ls_loncodestpro2; ?>" maxlength="<?php print $ls_loncodestpro2; ?>" style="text-align:center">
            </div></td>
            <td><a href="javascript:catalogo_estprohas2();"><img src="../shared/imagebank/tools15/buscar.gif" width="15" height="15" border="0" alt="Cat&aacute;logo de Estructura Programatica 2"></a></td>
            <td><!--DWLayoutEmptyCell-->&nbsp;</td>
          </tr>
          <tr class="formato-blanco">
            <td height="22"><div align="right">
              <input name="codestpro3h" type="text" id="codestpro3h" value="<?php print $ls_codestpro3h ?>" size="<?php print $ls_loncodestpro3; ?>" maxlength="<?php print $ls_loncodestpro3; ?>" style="text-align:center">
            </div></td>
            <td><a href="javascript:catalogo_estprohas3();"><img src="../shared/imagebank/tools15/buscar.gif" width="15" height="15" border="0" alt="Cat&aacute;logo de Estructura Programatica 3"></a></td>
            <td></td>
          </tr>
        </table></td>
      </tr>
      
      <tr>
        <td colspan="2" align="center"><div align="left">
          <?php 
		  }
		 if($li_estmodest==2)
		 {
             //el otro tipo de estructura presupuestaria que debia tomarse en cuenta
		?>
        <input type="hidden" id="nombrereporte" value="<?php echo $ls_reporte; ?>">
        <input name="nombrerepdet" type="hidden" id="nombrerepdet" value="<?php print $ls_reporte_detallado;?>">    
          <table width="275" height="117" border="0" align="center" cellpadding="0" cellspacing="0" class="formato-blanco"  va>
            <!--DWLayoutTable-->
            <tr class="titulo-celda">
              <td height="13" colspan="4" valign="top" class="titulo-celdanew"><strong class="titulo-celdanew">Rango Codigo Programatico Desde </strong></td>
            </tr>
            <tr class="formato-blanco">
              <td><!--DWLayoutEmptyCell-->&nbsp;</td>
              <td height="20"><input name="codestpro1" type="text" id="codestpro1" value="<?php print $ls_codestpro1 ?>" size="<?php print $ls_loncodestpro1; ?>" maxlength="<?php print $ls_loncodestpro1; ?>" style="text-align:center">
              <a href="javascript:catalogo_estpro1();"></a></td>
              <td width="44" height="20"><a href="javascript:catalogo_estpro1();"><img src="../shared/imagebank/tools15/buscar.gif" width="15" height="15" border="0" alt="Cat&aacute;logo de Estructura Programatica 1"></a></td>
              <td></td>
            </tr>
            <tr class="formato-blanco">
              <td><!--DWLayoutEmptyCell-->&nbsp;</td>
              <td height="20"><input name="codestpro2" type="text" id="codestpro2" value="<?php print $ls_codestpro2 ?>" size="<?php print $ls_loncodestpro2; ?>" maxlength="<?php print $ls_loncodestpro2; ?>" style="text-align:center">
              <a href="javascript:catalogo_estpro2();"></a></td>
              <td height="20"><a href="javascript:catalogo_estpro2();"><img src="../shared/imagebank/tools15/buscar.gif" width="15" height="15" border="0" alt="Cat&aacute;logo de Estructura Programatica 2"></a></td>
              <td></td>
            </tr>
            <tr class="formato-blanco">
              <td><!--DWLayoutEmptyCell-->&nbsp;</td>
              <td height="20"><input name="codestpro3" type="text" id="codestpro3" value="<?php print $ls_codestpro3 ?>" size="<?php print $ls_loncodestpro3; ?>" maxlength="<?php print $ls_loncodestpro3; ?>" style="text-align:center">
              <a href="javascript:catalogo_estpro3();"></a></td>
              <td height="20"><a href="javascript:catalogo_estpro3();"><img src="../shared/imagebank/tools15/buscar.gif" width="15" height="15" border="0" alt="Cat&aacute;logo de Estructura Programatica 3"></a></td>
              <td></td>
            </tr>
            <tr class="formato-blanco">
              <td><!--DWLayoutEmptyCell-->&nbsp;</td>
              <td height="20"><input name="codestpro4" type="text" id="codestpro4" value="<?php print $ls_codestpro4 ?>" size="<?php print $ls_loncodestpro4; ?>" maxlength="<?php print $ls_loncodestpro4; ?>" style="text-align:center">
              <a href="javascript:catalogo_estpro4();"></a></td>
              <td height="20"><a href="javascript:catalogo_estpro4();"><img src="../shared/imagebank/tools15/buscar.gif" width="15" height="15" border="0" alt="Cat&aacute;logo de Estructura Programatica 3"></a></td>
              <td></td>
            </tr>
            <tr class="formato-blanco">
              <td width="53"><!--DWLayoutEmptyCell-->&nbsp;</td>
              <td width="129" height="18"><input name="codestpro5" type="text" id="codestpro5" value="<?php print $ls_codestpro5 ?>" size="<?php print $ls_loncodestpro5; ?>" maxlength="<?php print $ls_loncodestpro5; ?>" style="text-align:center">
              <a href="javascript:catalogo_estpro5();"></a></td>
              <td height="22"><a href="javascript:catalogo_estpro5();"></a><a href="javascript:catalogo_estpro5();"><img src="../shared/imagebank/tools15/buscar.gif" width="15" height="15" border="0" alt="Cat&aacute;logo de Estructura Programatica 3"></a><a href="javascript:catalogo_estpro1();"></a></td>
              <td width="172"></td>
            </tr>
          </table>
          <?php
		  }
		 ?>
        </div></td>
        <td align="center"><?php 
		 if($li_estmodest==2)
		  {
		?>
          <table width="275" height="117" border="0" align="center" cellpadding="0" cellspacing="0" class="formato-blanco"  va>
            <!--DWLayoutTable-->
            <tr class="titulo-celda">
              <td height="13" colspan="4" valign="top" class="titulo-celdanew"><strong class="titulo-celdanew">Rango Codigo Programatico Hasta </strong></td>
            </tr>

            <tr class="formato-blanco">
              <td><!--DWLayoutEmptyCell-->&nbsp;</td>
              <td height="20"><input name="codestpro1h" type="text" id="codestpro1h" value="<?php print $ls_codestpro1h ?>" size="<?php print $ls_loncodestpro1; ?>" maxlength="<?php print $ls_loncodestpro1; ?>" style="text-align:center"></td>
              <td width="37" height="20"><a href="javascript:catalogo_estprohas1();"><img src="../shared/imagebank/tools15/buscar.gif" width="15" height="15" border="0" alt="Cat&aacute;logo de Estructura Programatica 1"></a></td>
              <td><!--DWLayoutEmptyCell-->&nbsp;</td>
            </tr>
            <tr class="formato-blanco">
              <td><!--DWLayoutEmptyCell-->&nbsp;</td>
              <td height="20"><input name="codestpro2h" type="text" id="codestpro2h" value="<?php print $ls_codestpro2h  ?>" size="<?php print $ls_loncodestpro2; ?>" maxlength="<?php print $ls_loncodestpro2; ?>" style="text-align:center"></td>
              <td height="20"><a href="javascript:catalogo_estprohas2();"><img src="../shared/imagebank/tools15/buscar.gif" width="15" height="15" border="0" alt="Cat&aacute;logo de Estructura Programatica 2"></a></td>
              <td><!--DWLayoutEmptyCell-->&nbsp;</td>
            </tr>
            <tr class="formato-blanco">
              <td><!--DWLayoutEmptyCell-->&nbsp;</td>
              <td height="20"><input name="codestpro3h" type="text" id="codestpro3h" value="<?php print $ls_codestpro3h ?>" size="<?php print $ls_loncodestpro3; ?>" maxlength="<?php print $ls_loncodestpro3; ?>" style="text-align:center"></td>
              <td height="20"><a href="javascript:catalogo_estprohas3();"><img src="../shared/imagebank/tools15/buscar.gif" width="15" height="15" border="0" alt="Cat&aacute;logo de Estructura Programatica 3"></a></td>
              <td><!--DWLayoutEmptyCell-->&nbsp;</td>
            </tr>
            <tr class="formato-blanco">
              <td><!--DWLayoutEmptyCell-->&nbsp;</td>
              <td height="20"><input name="codestpro4h" type="text" id="codestpro4h" value="<?php print  $ls_codestpro4h ?>" size="<?php print $ls_loncodestpro4; ?>" maxlength="<?php print $ls_loncodestpro4; ?>" style="text-align:center"></td>
              <td height="20"><a href="javascript:catalogo_estprohas4();"><img src="../shared/imagebank/tools15/buscar.gif" width="15" height="15" border="0" alt="Cat&aacute;logo de Estructura Programatica 3"></a></td>
              <td><!--DWLayoutEmptyCell-->&nbsp;</td>
            </tr>
            <tr class="formato-blanco">
              <td width="38"><!--DWLayoutEmptyCell-->&nbsp;</td>
              <td width="127" height="20"><input name="codestpro5h" type="text" id="codestpro5h" value="<?php print  $ls_codestpro5h ?>" size="<?php print $ls_loncodestpro5; ?>" maxlength="<?php print $ls_loncodestpro5; ?>" style="text-align:center"></td>
              <td height="22"><a href="javascript:catalogo_estprohas5();"><img src="../shared/imagebank/tools15/buscar.gif" width="15" height="15" border="0" alt="Cat&aacute;logo de Estructura Programatica 3"></a><a href="javascript:catalogo_estprohas1();"></a></td>
              <td width="87"><a href="javascript:catalogo_estprohas5();"></a></td>
            </tr>
        </table>
        <?php
		  }
		 ?></td>
      </tr>
      
      <tr>
        <td height="13" colspan="3" align="center">&nbsp;</td>
      </tr>
      <tr>
        <td height="13" colspan="3" align="center"><table width="567" height="39" border="0" align="center" cellpadding="0" cellspacing="0" class="formato-blanco">
          <tr class="titulo-celdanew">
            <td height="13" colspan="5"><strong>Intervalo de Fuente de Financiamiento </strong></td>
          </tr>
          <tr>
            <td width="96" height="22"><div align="right"><span class="style1 style14">Desde</span></div></td>
            <td width="167"><div align="left">
              <input name="txtcodfuefindes" type="text" id="txtcodfuefindes"  style="text-align:center" value="<?php print $ls_codfuefindes; ?>" size="10" readonly>
              <a href="javascript:catalogo_fuefindes();"><img src="../shared/imagebank/tools15/buscar.gif" width="15" height="15" border="0" alt="Cat&aacute;logo de Estructura Programatica 1"></a></div></td>
            <td width="94"><div align="right">Hasta</div></td>
            <td width="120"><input name="txtcodfuefinhas" type="text" id="txtcodfuefinhas" style="text-align:center" value="<?php print $ls_codfuefinhas; ?>" size="10" readonly>
              <a href="javascript:catalogo_fuefinhas();"><img src="../shared/imagebank/tools15/buscar.gif" width="15" height="15" border="0" alt="Cat&aacute;logo de Estructura Programatica 1"></a></td>
            <td width="80"><a href="javascript:catalogo_fuefinhas();"></a></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td height="13" colspan="3" align="center">&nbsp;</td>
      </tr>
      <tr>
        <td height="17" colspan="3" align="center"><div align="left"><span class="Estilo2"></span>
          <table width="567" height="39" border="0" align="center" cellpadding="0" cellspacing="0" class="formato-blanco">
            <tr class="titulo-celdanew">
              <td height="13" colspan="5"><strong>Intervalo de Cuentas </strong></td>
            </tr>
            <tr>
              <td width="91" height="22"><div align="right"><span class="style1 style14">Desde</span></div></td>
              <td width="164"><div align="left">
                  <input name="txtcuentades" readonly="true" type="text"  style="text-align:center" id="txtcuentades" value="<?php print $ls_cuentades; ?>">
              <a href="javascript:catalogo_cuentas();"><img src="../shared/imagebank/tools15/buscar.gif" width="15" height="15" border="0" alt="Cat&aacute;logo de Estructura Programatica 1"></a></div></td>
              <td width="89"><div align="right">Hasta</div></td>
              <td width="127"><input name="txtcuentahas" readonly="true" type="text" style="text-align:center" id="txtcuentahas" value="<?php print $ls_cuentahas; ?>"></td>
              <td width="87"><a href="javascript:catalogo_cuentahas();"><img src="../shared/imagebank/tools15/buscar.gif" width="15" height="15" border="0" alt="Cat&aacute;logo de Estructura Programatica 1"></a></td>
            </tr>
          </table>
        </div></td>
      </tr>
      <tr>
        <td height="13" colspan="3" align="center">&nbsp;</td>
      </tr>
      <tr>
        <td height="13" colspan="3" align="left"><table width="567" height="40" border="0" align="center" cellpadding="0" cellspacing="0" class="formato-blanco">
          <tr class="titulo-celdanew">
            <td height="13" colspan="5"><strong class="titulo-celdanew">Nivel de Cuentas </strong></td>
          </tr>
          <tr>
            <td width="59"><div align="right"><span class="style1 style14">Nivel</span></div></td>
            <td width="161" height="22"><select name="cmbnivel" id="cmbnivel">
                <option value="s1">Seleccione un Nivel </option>
                <option value="1">1</option>
                <option value="2">2</option>
                <option value="3">3</option>
                <option value="4">4</option>
                <option value="5">5</option>
                <option value="6">6</option>
                <option value="7">7</option>
            </select></td>
            <td width="103">
              <div align="left">
                <input name="checksubniv" type="checkbox" id="checksubniv" value="1"  <?php print $checkedsubniv;?> >
                Sub - Niveles
                <div align="left"></div>
            </div></td>
            <td width="77" style="display:none"><div align="right">
              <input name="checkformato" type="checkbox" id="checkformato" value="1"  <?php print $checkformato;?> >
            </div></td>
            <td width="165" style="display:none">Formato # 2 </td>
          </tr>
        </table></td>
      </tr>
      
      <tr>
        <td height="13" colspan="3" align="center">&nbsp;</td>
      </tr>
      <tr>
        <td height="48" colspan="3" align="center"><table width="567" height="34" border="0" align="center" cellpadding="0" cellspacing="0" class="formato-blanco" <?php echo $ls_mostrar_estruc; ?>>
          <tr class="titulo-celdanew">
            <td height="13">Nivel del Reporte</td>
          </tr>
          <tr>
            <td height="21"><div align="center">
                <label>
                <input name="rdotipo" type="radio" id="rdotipo" checked>
                  Consolidado</label>
                <input type="radio" name="rdotipo" id="rdotipo">
              Detallado
              </label>
            </div></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td height="68" colspan="3" align="center"><div align="left">
              <table width="567" border="0" align="center" cellpadding="0" cellspacing="0" class="formato-blanco">
                <tr class="titulo-celdanew">
                  <td height="13" colspan="3"><strong>Acumulado Hasta</strong></td>
                </tr>
                <tr>
                <td width="231"><div align="right"></div></td>
                  <td width="334" align="left">
				  <input type="hidden" name="cmbmesdes" id="cmbmesdes" value="01">
                  <select name="cmbmeshas" id="cmbmeshas">
                      <option value="01">Enero</option>
                      <option value="02">Febrero</option>
                      <option value="03">Marzo</option>
                      <option value="04">Abril</option>
                      <option value="05">Mayo</option>
                      <option value="06">Junio</option>
                      <option value="07">Julio</option>
                      <option value="08">Agosto</option>
                      <option value="09">Septiembre</option>
                      <option value="10">Octubre</option>
                      <option value="11">Noviembre</option>
                      <option value="12">Diciembre</option>
                  </select>                  </td>
                </tr>
            </table>
        </div></td>
      </tr>
      <tr>
        <td colspan="3" align="center" class="titulo-celdanew">Graficos</td>
      </tr>
      <tr>
        <td colspan="3" align="center"><input name="rdgrafico" type="radio" class="sin-borde" value="radiobutton" checked>
          Torta 
          <input name="rdgrafico" type="radio" class="sin-borde" value="radiobutton">
        Barras</td>
      </tr>
      <tr>
        <td colspan="3" align="center"><div align="right"><span class="Estilo1"> </span><span class="Estilo1">
            <input name="estclades" type="hidden" id="estclades" value="<?php print $ls_estclades;?>">
            <input name="estclahas" type="hidden" id="estclahas" value="<?php print $ls_estclahas;?>">
            <input name="estmodest" type="hidden" id="estmodest" value="<?php print  $li_estmodest; ?>">
            <input name="operacion" type="hidden" id="operacion" value="<?php print $ls_operacion;?>">
        </span></div></td>
      </tr>
    </table>
    <p align="center">
      <input name="total" type="hidden" id="total" value="<?php print $totrow;?>">
    </p>
</form>      
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</body>
<script language="JavaScript">

function rellenar_cad(cadena,longitud,objeto)
{
	var mystring=new String(cadena);
	cadena_ceros="";
	lencad=mystring.length;

	total=longitud-lencad;
	if (cadena!="")
	   {
		for (i=1;i<=total;i++)
			{
			  cadena_ceros=cadena_ceros+"0";
			}
		cadena=cadena_ceros+cadena;
		if (objeto=="txtcodprov1")
		   {
			 document.form1.txtcodprov1.value=cadena;
		   }
		 else
		   {
			 document.form1.txtcodprov2.value=cadena;
		   }  
        }
}

function ue_showouput()
{
	f=document.form1;
	nombreformato    = document.getElementById('nombrereporte').value;
	nombreformatodet = document.getElementById('nombrerepdet').value;
	li_imprimir=f.imprimir.value;
	if(li_imprimir==1)
	{
		codestpro1  = f.codestpro1.value;
		codestpro2  = f.codestpro2.value;
		codestpro3  = f.codestpro3.value;
		codestpro1h = f.codestpro1h.value;
		codestpro2h = f.codestpro2h.value;
		codestpro3h = f.codestpro3h.value;
		estmodest   = f.estmodest.value;
		txtcuentades = f.txtcuentades.value;
		txtcuentahas = f.txtcuentahas.value;
		tipoformato = f.cmbbsf.value;
		txtcodfuefindes = f.txtcodfuefindes.value;
		txtcodfuefinhas = f.txtcodfuefinhas.value;
	    estclades=f.estclades.value;
	    estclahas=f.estclahas.value;
		
		if(estmodest==1)
		{
			if(f.checksubniv.checked==true)
			{
			  checksubniv = f.checksubniv.value;
			} 
			else
			{
			  checksubniv = 0;
			} 
			cmbnivel = f.cmbnivel.value;
			cmbmesdes = f.cmbmesdes.value;
			cmbmeshas = f.cmbmeshas.value;
			if((cmbmesdes=="")||(cmbmeshas==""))
			{
			  alert("Por Favor Seleccionar todos los parametros de busqueda");
			}
			else
			{
			   if(f.checkformato.checked==true)
			   {
				   pagina="reportes/sigesp_spg_rpp_acum_x_cuenta_formato2.php?codestpro1="+codestpro1
				   +"&codestpro2="+codestpro2+"&codestpro3="+codestpro3+"&codestpro1h="+codestpro1h
				   +"&codestpro2h="+codestpro2h+"&codestpro3h="+codestpro3h+"&cmbnivel="+cmbnivel
				   +"&cmbmesdes="+cmbmesdes+"&cmbmeshas="+cmbmeshas+"&checksubniv="+checksubniv
				   +"&txtcuentades="+txtcuentades+"&txtcuentahas="+txtcuentahas+"&tipoformato="+tipoformato
				   +"&txtcodfuefindes="+txtcodfuefindes+"&txtcodfuefinhas="+txtcodfuefinhas+"&estclades="+estclades
				   +"&estclahas="+estclahas;
				   window.open(pagina,"catalogo","menubar=no,toolbar=no,scrollbars=yes,width=800,height=600,resizable=yes,location=no");
			   }
			   else
			   {
				   if(f.rdotipo[0].checked)
				   {
				    pagina="reportes/"+nombreformato+"?codestpro1="+codestpro1
				    +"&codestpro2="+codestpro2+"&codestpro3="+codestpro3+"&codestpro1h="+codestpro1h
				    +"&codestpro2h="+codestpro2h+"&codestpro3h="+codestpro3h+"&cmbnivel="+cmbnivel
				    +"&cmbmesdes="+cmbmesdes+"&cmbmeshas="+cmbmeshas+"&checksubniv="+checksubniv
				    +"&txtcuentades="+txtcuentades+"&txtcuentahas="+txtcuentahas+"&tipoformato="+tipoformato
				    +"&txtcodfuefindes="+txtcodfuefindes+"&txtcodfuefinhas="+txtcodfuefinhas+"&estclades="+estclades
				    +"&estclahas="+estclahas;
				    window.open(pagina,"catalogo","menubar=no,toolbar=no,scrollbars=yes,width=800,height=600,resizable=yes,location=no");
				   }
				   else if(f.rdotipo[1].checked)
				   {
				    pagina="reportes/"+nombreformatodet+"?codestpro1="+codestpro1
				    +"&codestpro2="+codestpro2+"&codestpro3="+codestpro3+"&codestpro1h="+codestpro1h
				    +"&codestpro2h="+codestpro2h+"&codestpro3h="+codestpro3h+"&cmbnivel="+cmbnivel
				    +"&cmbmesdes="+cmbmesdes+"&cmbmeshas="+cmbmeshas+"&checksubniv="+checksubniv
				    +"&txtcuentades="+txtcuentades+"&txtcuentahas="+txtcuentahas+"&tipoformato="+tipoformato
				    +"&txtcodfuefindes="+txtcodfuefindes+"&txtcodfuefinhas="+txtcodfuefinhas+"&estclades="+estclades
				    +"&estclahas="+estclahas;
				    window.open(pagina,"catalogo","menubar=no,toolbar=no,scrollbars=yes,width=800,height=600,resizable=yes,location=no");
				   }
			   } 
			}
		}
		else
		{
			codestpro4  = f.codestpro4.value;
			codestpro5  = f.codestpro5.value;
			codestpro4h = f.codestpro4h.value;
			codestpro5h = f.codestpro5h.value;
			if(f.checksubniv.checked==true)
			{
			  checksubniv = f.checksubniv.value;
			} 
			else
			{
			  checksubniv = 0;
			} 
			cmbnivel = f.cmbnivel.value;
			cmbmesdes = f.cmbmesdes.value;
			cmbmeshas = f.cmbmeshas.value;
			if((cmbmesdes=="")||(cmbmeshas==""))
			{
			  alert("Por Favor Seleccionar todos los parametros de busqueda");
			}
			else
			{
			   if(f.checkformato.checked==true)
			   {
				   pagina="reportes/sigesp_spg_rpp_acum_x_cuenta_formato2.php?codestpro1="+codestpro1
				   +"&codestpro2="+codestpro2+"&codestpro3="+codestpro3+"&codestpro4="+codestpro4+"&codestpro5="+codestpro5
				   +"&codestpro1h="+codestpro1h+"&codestpro2h="+codestpro2h+"&codestpro3h="+codestpro3h+"&codestpro4h="+codestpro4h
				   +"&codestpro5h="+codestpro5h+"&cmbnivel="+cmbnivel+"&cmbmesdes="+cmbmesdes+"&cmbmeshas="+cmbmeshas
				   +"&checksubniv="+checksubniv+"&txtcuentades="+txtcuentades+"&txtcuentahas="+txtcuentahas+"&tipoformato="+tipoformato
				   +"&txtcodfuefindes="+txtcodfuefindes+"&txtcodfuefinhas="+txtcodfuefinhas+"&estclades="+estclades
				   +"&estclahas="+estclahas;
				   window.open(pagina,"catalogo","menubar=no,toolbar=no,scrollbars=yes,width=800,height=600,resizable=yes,location=no");
			   }
			   else
			   {
				   if(f.rdotipo[0].checked)
				   {
					   pagina="reportes/"+nombreformato+"?codestpro1="+codestpro1
					   +"&codestpro2="+codestpro2+"&codestpro3="+codestpro3+"&codestpro4="+codestpro4+"&codestpro5="+codestpro5
					   +"&codestpro1h="+codestpro1h+"&codestpro2h="+codestpro2h+"&codestpro3h="+codestpro3h+"&codestpro4h="+codestpro4h
					   +"&codestpro5h="+codestpro5h+"&cmbnivel="+cmbnivel+"&cmbmesdes="+cmbmesdes+"&cmbmeshas="+cmbmeshas
					   +"&checksubniv="+checksubniv+"&txtcuentades="+txtcuentades+"&txtcuentahas="+txtcuentahas+"&tipoformato="+tipoformato
					   +"&txtcodfuefindes="+txtcodfuefindes+"&txtcodfuefinhas="+txtcodfuefinhas+"&estclades="+estclades
					   +"&estclahas="+estclahas;
					   window.open(pagina,"catalogo","menubar=no,toolbar=no,scrollbars=yes,width=800,height=600,resizable=yes,location=no");
				   }
				   else if(f.rdotipo[1].checked)
				   {
				       pagina="reportes/"+nombreformatodet+"?codestpro1="+codestpro1
					   +"&codestpro2="+codestpro2+"&codestpro3="+codestpro3+"&codestpro4="+codestpro4+"&codestpro5="+codestpro5
					   +"&codestpro1h="+codestpro1h+"&codestpro2h="+codestpro2h+"&codestpro3h="+codestpro3h+"&codestpro4h="+codestpro4h
					   +"&codestpro5h="+codestpro5h+"&cmbnivel="+cmbnivel+"&cmbmesdes="+cmbmesdes+"&cmbmeshas="+cmbmeshas
					   +"&checksubniv="+checksubniv+"&txtcuentades="+txtcuentades+"&txtcuentahas="+txtcuentahas+"&tipoformato="+tipoformato
					   +"&txtcodfuefindes="+txtcodfuefindes+"&txtcodfuefinhas="+txtcodfuefinhas+"&estclades="+estclades
					   +"&estclahas="+estclahas;
					   window.open(pagina,"catalogo","menubar=no,toolbar=no,scrollbars=yes,width=800,height=600,resizable=yes,location=no");
				   }
			   } 
			}
		}	 
	}
	else
	{
       alert("No tiene permiso para realizar esta operacion");	
	}	
}

function ue_graficos()
{
	f=document.form1;
	nombreformato    = document.getElementById('nombrereporte').value;
	nombreformatodet = document.getElementById('nombrerepdet').value;
	li_imprimir=f.imprimir.value;
	if(li_imprimir==1)
	{
		codestpro1  = f.codestpro1.value;
		codestpro2  = f.codestpro2.value;
		codestpro3  = f.codestpro3.value;
		codestpro1h = f.codestpro1h.value;
		codestpro2h = f.codestpro2h.value;
		codestpro3h = f.codestpro3h.value;
		estmodest   = f.estmodest.value;
		txtcuentades = f.txtcuentades.value;
		txtcuentahas = f.txtcuentahas.value;
		tipoformato = f.cmbbsf.value;
		txtcodfuefindes = f.txtcodfuefindes.value;
		txtcodfuefinhas = f.txtcodfuefinhas.value;
	    estclades=f.estclades.value;
	    estclahas=f.estclahas.value;
		
		if(estmodest==1)
		{
			if(f.checksubniv.checked==true)
			{
			  checksubniv = f.checksubniv.value;
			} 
			else
			{
			  checksubniv = 0;
			} 
			cmbnivel = f.cmbnivel.value;
			cmbmesdes = f.cmbmesdes.value;
			cmbmeshas = f.cmbmeshas.value;
			if((cmbmesdes=="")||(cmbmeshas==""))
			{
			  alert("Por Favor Seleccionar todos los parametros de busqueda");
			}
			else
			{
				   if(f.rdgrafico[0].checked)
				   {
				    pagina="reportes/sigesp_spg_rpp_acum_x_cuenta_torta.php?codestpro1="+codestpro1
				    +"&codestpro2="+codestpro2+"&codestpro3="+codestpro3+"&codestpro1h="+codestpro1h
				    +"&codestpro2h="+codestpro2h+"&codestpro3h="+codestpro3h+"&cmbnivel="+cmbnivel
				    +"&cmbmesdes="+cmbmesdes+"&cmbmeshas="+cmbmeshas+"&checksubniv="+checksubniv
				    +"&txtcuentades="+txtcuentades+"&txtcuentahas="+txtcuentahas+"&tipoformato="+tipoformato
				    +"&txtcodfuefindes="+txtcodfuefindes+"&txtcodfuefinhas="+txtcodfuefinhas+"&estclades="+estclades
				    +"&estclahas="+estclahas;
				    window.open(pagina,"catalogo","menubar=no,toolbar=no,scrollbars=yes,width=800,height=600,resizable=yes,location=no");
				   }
				   else
				   {
				    pagina="reportes/sigesp_spg_rpp_acum_x_cuenta_barra.php?codestpro1="+codestpro1
				    +"&codestpro2="+codestpro2+"&codestpro3="+codestpro3+"&codestpro1h="+codestpro1h
				    +"&codestpro2h="+codestpro2h+"&codestpro3h="+codestpro3h+"&cmbnivel="+cmbnivel
				    +"&cmbmesdes="+cmbmesdes+"&cmbmeshas="+cmbmeshas+"&checksubniv="+checksubniv
				    +"&txtcuentades="+txtcuentades+"&txtcuentahas="+txtcuentahas+"&tipoformato="+tipoformato
				    +"&txtcodfuefindes="+txtcodfuefindes+"&txtcodfuefinhas="+txtcodfuefinhas+"&estclades="+estclades
				    +"&estclahas="+estclahas;
				    window.open(pagina,"catalogo","menubar=no,toolbar=no,scrollbars=yes,width=800,height=600,resizable=yes,location=no");
				   }
			   } 
		}
		else
		{
			codestpro4  = f.codestpro4.value;
			codestpro5  = f.codestpro5.value;
			codestpro4h = f.codestpro4h.value;
			codestpro5h = f.codestpro5h.value;
			if(f.checksubniv.checked==true)
			{
			  checksubniv = f.checksubniv.value;
			} 
			else
			{
			  checksubniv = 0;
			} 
			cmbnivel = f.cmbnivel.value;
			cmbmesdes = f.cmbmesdes.value;
			cmbmeshas = f.cmbmeshas.value;
			if((cmbmesdes=="")||(cmbmeshas==""))
			{
			  alert("Por Favor Seleccionar todos los parametros de busqueda");
			}
			else
			{
			   if(f.checkformato.checked==true)
			   {
				   pagina="reportes/sigesp_spg_rpp_acum_x_cuenta_formato2.php?codestpro1="+codestpro1
				   +"&codestpro2="+codestpro2+"&codestpro3="+codestpro3+"&codestpro4="+codestpro4+"&codestpro5="+codestpro5
				   +"&codestpro1h="+codestpro1h+"&codestpro2h="+codestpro2h+"&codestpro3h="+codestpro3h+"&codestpro4h="+codestpro4h
				   +"&codestpro5h="+codestpro5h+"&cmbnivel="+cmbnivel+"&cmbmesdes="+cmbmesdes+"&cmbmeshas="+cmbmeshas
				   +"&checksubniv="+checksubniv+"&txtcuentades="+txtcuentades+"&txtcuentahas="+txtcuentahas+"&tipoformato="+tipoformato
				   +"&txtcodfuefindes="+txtcodfuefindes+"&txtcodfuefinhas="+txtcodfuefinhas+"&estclades="+estclades
				   +"&estclahas="+estclahas;
				   window.open(pagina,"catalogo","menubar=no,toolbar=no,scrollbars=yes,width=800,height=600,resizable=yes,location=no");
			   }
			   else
			   {
				   if(f.rdotipo[0].checked)
				   {
					   pagina="reportes/"+nombreformato+"?codestpro1="+codestpro1
					   +"&codestpro2="+codestpro2+"&codestpro3="+codestpro3+"&codestpro4="+codestpro4+"&codestpro5="+codestpro5
					   +"&codestpro1h="+codestpro1h+"&codestpro2h="+codestpro2h+"&codestpro3h="+codestpro3h+"&codestpro4h="+codestpro4h
					   +"&codestpro5h="+codestpro5h+"&cmbnivel="+cmbnivel+"&cmbmesdes="+cmbmesdes+"&cmbmeshas="+cmbmeshas
					   +"&checksubniv="+checksubniv+"&txtcuentades="+txtcuentades+"&txtcuentahas="+txtcuentahas+"&tipoformato="+tipoformato
					   +"&txtcodfuefindes="+txtcodfuefindes+"&txtcodfuefinhas="+txtcodfuefinhas+"&estclades="+estclades
					   +"&estclahas="+estclahas;
					   window.open(pagina,"catalogo","menubar=no,toolbar=no,scrollbars=yes,width=800,height=600,resizable=yes,location=no");
				   }
				   else if(f.rdotipo[1].checked)
				   {
				       pagina="reportes/"+nombreformatodet+"?codestpro1="+codestpro1
					   +"&codestpro2="+codestpro2+"&codestpro3="+codestpro3+"&codestpro4="+codestpro4+"&codestpro5="+codestpro5
					   +"&codestpro1h="+codestpro1h+"&codestpro2h="+codestpro2h+"&codestpro3h="+codestpro3h+"&codestpro4h="+codestpro4h
					   +"&codestpro5h="+codestpro5h+"&cmbnivel="+cmbnivel+"&cmbmesdes="+cmbmesdes+"&cmbmeshas="+cmbmeshas
					   +"&checksubniv="+checksubniv+"&txtcuentades="+txtcuentades+"&txtcuentahas="+txtcuentahas+"&tipoformato="+tipoformato
					   +"&txtcodfuefindes="+txtcodfuefindes+"&txtcodfuefinhas="+txtcodfuefinhas+"&estclades="+estclades
					   +"&estclahas="+estclahas;
					   window.open(pagina,"catalogo","menubar=no,toolbar=no,scrollbars=yes,width=800,height=600,resizable=yes,location=no");
				   }
			   } 
			}
		}	 
	}
	else
	{
       alert("No tiene permiso para realizar esta operacion");	
	}	
}

function ue_openexcel()
{
	f=document.form1;
	li_imprimir=f.imprimir.value;
	if(li_imprimir==1)
	{
		codestpro1  = f.codestpro1.value;
		codestpro2  = f.codestpro2.value;
		codestpro3  = f.codestpro3.value;
		codestpro1h = f.codestpro1h.value;
		codestpro2h = f.codestpro2h.value;
		codestpro3h = f.codestpro3h.value;
		estmodest   = f.estmodest.value;
		txtcuentades = f.txtcuentades.value;
		txtcuentahas = f.txtcuentahas.value;
		tipoformato = f.cmbbsf.value;
		txtcodfuefindes = f.txtcodfuefindes.value;
		txtcodfuefinhas = f.txtcodfuefinhas.value;
	    estclades = f.estclades.value;
	    estclahas = f.estclahas.value;
		if(estmodest==1)
		{
			if(f.checksubniv.checked==true)
			{
			  checksubniv = f.checksubniv.value;
			} 
			else
			{
			  checksubniv = 0;
			} 
			cmbnivel = f.cmbnivel.value;
			cmbmesdes = f.cmbmesdes.value;
			cmbmeshas = f.cmbmeshas.value;
			if((cmbmesdes=="")||(cmbmeshas==""))
			{
			  alert("Por Favor Seleccionar todos los parametros de busqueda");
			}
			else
			{
			   
			   if(f.rdotipo[0].checked)
			   {
				   pagina="reportes/sigesp_spg_rpp_acum_x_cuenta_excel.php?codestpro1="+codestpro1
				   +"&codestpro2="+codestpro2+"&codestpro3="+codestpro3+"&codestpro1h="+codestpro1h
				   +"&codestpro2h="+codestpro2h+"&codestpro3h="+codestpro3h+"&cmbnivel="+cmbnivel
				   +"&cmbmesdes="+cmbmesdes+"&cmbmeshas="+cmbmeshas+"&checksubniv="+checksubniv
				   +"&txtcuentades="+txtcuentades+"&txtcuentahas="+txtcuentahas+"&tipoformato="+tipoformato
				   +"&txtcodfuefindes="+txtcodfuefindes+"&txtcodfuefinhas="+txtcodfuefinhas+"&estclades="+estclades
				   +"&estclahas="+estclahas;
				   window.open(pagina,"catalogo","menubar=no,toolbar=no,scrollbars=yes,width=800,height=600,resizable=yes,location=no");
			   }
			   else if (f.rdotipo[1].checked)
			   {
			       pagina="reportes/sigesp_spg_rpp_acum_x_cuenta_excel_detallado.php?codestpro1="+codestpro1
				   +"&codestpro2="+codestpro2+"&codestpro3="+codestpro3+"&codestpro1h="+codestpro1h
				   +"&codestpro2h="+codestpro2h+"&codestpro3h="+codestpro3h+"&cmbnivel="+cmbnivel
				   +"&cmbmesdes="+cmbmesdes+"&cmbmeshas="+cmbmeshas+"&checksubniv="+checksubniv
				   +"&txtcuentades="+txtcuentades+"&txtcuentahas="+txtcuentahas+"&tipoformato="+tipoformato
				   +"&txtcodfuefindes="+txtcodfuefindes+"&txtcodfuefinhas="+txtcodfuefinhas+"&estclades="+estclades
				   +"&estclahas="+estclahas;
				   window.open(pagina,"catalogo","menubar=no,toolbar=no,scrollbars=yes,width=800,height=600,resizable=yes,location=no");
			   
			   }
			   
			}
		}
		else
		{
			codestpro4  = f.codestpro4.value;
			codestpro5  = f.codestpro5.value;
			codestpro4h = f.codestpro4h.value;
			codestpro5h = f.codestpro5h.value;
			if(f.checksubniv.checked==true)
			{
			  checksubniv = f.checksubniv.value;
			} 
			else
			{
			  checksubniv = 0;
			} 
			cmbnivel = f.cmbnivel.value;
			cmbmesdes = f.cmbmesdes.value;
			cmbmeshas = f.cmbmeshas.value;
			if((cmbmesdes=="")||(cmbmeshas==""))
			{
			  alert("Por Favor Seleccionar todos los parametros de busqueda");
			}
			else
			{
			   if(f.rdotipo[0].checked)
			   {
			    pagina="reportes/sigesp_spg_rpp_acum_x_cuenta_excel.php?codestpro1="+codestpro1
			    +"&codestpro2="+codestpro2+"&codestpro3="+codestpro3+"&codestpro4="+codestpro4+"&codestpro5="+codestpro5
			    +"&codestpro1h="+codestpro1h+"&codestpro2h="+codestpro2h+"&codestpro3h="+codestpro3h+"&codestpro4h="+codestpro4h
			    +"&codestpro5h="+codestpro5h+"&cmbnivel="+cmbnivel+"&cmbmesdes="+cmbmesdes+"&cmbmeshas="+cmbmeshas
			    +"&checksubniv="+checksubniv+"&txtcuentades="+txtcuentades+"&txtcuentahas="+txtcuentahas+"&tipoformato="+tipoformato
			    +"&txtcodfuefindes="+txtcodfuefindes+"&txtcodfuefinhas="+txtcodfuefinhas+"&estclades="+estclades
			    +"&estclahas="+estclahas;
			    window.open(pagina,"catalogo","menubar=no,toolbar=no,scrollbars=yes,width=800,height=600,resizable=yes,location=no");
			   }
			   else if(f.rdotipo[1].checked)
			   {
			    pagina="reportes/sigesp_spg_rpp_acum_x_cuenta_excel_detallado.php?codestpro1="+codestpro1
			    +"&codestpro2="+codestpro2+"&codestpro3="+codestpro3+"&codestpro4="+codestpro4+"&codestpro5="+codestpro5
			    +"&codestpro1h="+codestpro1h+"&codestpro2h="+codestpro2h+"&codestpro3h="+codestpro3h+"&codestpro4h="+codestpro4h
			    +"&codestpro5h="+codestpro5h+"&cmbnivel="+cmbnivel+"&cmbmesdes="+cmbmesdes+"&cmbmeshas="+cmbmeshas
			    +"&checksubniv="+checksubniv+"&txtcuentades="+txtcuentades+"&txtcuentahas="+txtcuentahas+"&tipoformato="+tipoformato
			    +"&txtcodfuefindes="+txtcodfuefindes+"&txtcodfuefinhas="+txtcodfuefinhas+"&estclades="+estclades
			    +"&estclahas="+estclahas;
			    window.open(pagina,"catalogo","menubar=no,toolbar=no,scrollbars=yes,width=800,height=600,resizable=yes,location=no");
			   }
			}
		}	 
	}
	else
	{
       alert("No tiene permiso para realizar esta operacion");	
	}	
}

function catalogo_estpro1()
{
	   pagina="sigesp_cat_public_estpro1.php?tipo=reporte";
	   window.open(pagina,"_blank","menubar=no,toolbar=no,scrollbars=yes,width=568,height=400,resizable=yes,location=no");
}
function catalogo_estpro2()
{
	f=document.form1;
	codestpro1=f.codestpro1.value;	
	estmodest=f.estmodest.value;
	estcla=f.estclades.value;
	if(estmodest==1)
	{
		if(codestpro1!="")
		{
			pagina="sigesp_cat_public_estpro2.php?codestpro1="+codestpro1+"&tipo=reporte"+"&estcla="+estcla;
			window.open(pagina,"_blank","menubar=no,toolbar=no,scrollbars=yes,width=568,height=400,resizable=yes,location=no");
		}
		else
		{
			alert("Seleccione nivel anterior");
		}
	}
	else
	{
		
		if(codestpro1=='**')
		{
			pagina="sigesp_cat_estpro2.php?codestpro1="+codestpro1+"&tipo=reporte"+"&estcla="+estcla;
			window.open(pagina,"_blank","menubar=no,toolbar=no,scrollbars=yes,width=568,height=400,resizable=yes,location=no");
		}
		else
		{
			if(codestpro1!="")
			{
				pagina="sigesp_cat_public_estpro2.php?codestpro1="+codestpro1+"&tipo=reporte"+"&estcla="+estcla;
				window.open(pagina,"_blank","menubar=no,toolbar=no,scrollbars=yes,width=568,height=400,resizable=yes,location=no");
			}
			else
			{
				alert("Seleccione  nivel anterior");
			}
		}
	}	
}
function catalogo_estpro3()
{
	f=document.form1;
	codestpro1=f.codestpro1.value;
	codestpro2=f.codestpro2.value;
	codestpro3=f.codestpro3.value;
	estmodest=f.estmodest.value;
	estcla=f.estclades.value;
	if(estmodest==1)
	{
		if((codestpro1!="")&&(codestpro2!="")&&(codestpro3==""))
		{
			pagina="sigesp_cat_public_estpro3.php?codestpro1="+codestpro1+"&codestpro2="+codestpro2+"&tipo=reporte"
			+"&estcla="+estcla;
			window.open(pagina,"_blank","menubar=no,toolbar=no,scrollbars=yes,width=568,height=400,resizable=yes,location=no");
		}
		else
		{
			pagina="sigesp_cat_public_estpro.php?tipo=reporte"+"&estcla="+estcla;
			window.open(pagina,"_blank","menubar=no,toolbar=no,scrollbars=yes,width=568,height=400,resizable=yes,location=no");
		}
	}
	else
	{
		if((codestpro2=='**')||(codestpro1=='**'))
		{
			if((codestpro2!="")&&(codestpro1!=""))
			{
				pagina="sigesp_cat_estpro3.php?tipo=reporte&codestpro1="+codestpro1+"&codestpro2="+codestpro2+"&estcla="+estcla;
				window.open(pagina,"_blank","menubar=no,toolbar=no,scrollbars=yes,width=568,height=400,resizable=yes,location=no");
			}
			else
			{
				alert("Seleccione niveles anteriores");
			}
		}
		else
		{
			if((codestpro2!="")&&(codestpro1!=""))
			{
				pagina="sigesp_cat_public_estpro3.php?codestpro1="+codestpro1+"&codestpro2="+codestpro2+"&tipo=reporte"
				+"&estcla="+estcla;
				window.open(pagina,"_blank","menubar=no,toolbar=no,scrollbars=yes,width=568,height=400,resizable=yes,location=no");	
			}
			else
			{
				alert("Seleccione niveles anteriores");
			}
		}	
	}	
}
function catalogo_estpro4()
{
	f=document.form1;
	codestpro1=f.codestpro1.value;
	codestpro2=f.codestpro2.value;
	codestpro3=f.codestpro3.value;
	estcla=f.estclades.value;
	if((codestpro2=='**')||(codestpro1=='**')||(codestpro3=='**'))
	{
		if((codestpro2!="")&&(codestpro1!="")&&(codestpro3!=""))
		{
			pagina="sigesp_cat_estpro4.php?tipo=reporte&codestpro1="+codestpro1+"&codestpro2="+codestpro2
			+"&codestpro3="+codestpro3+"&estcla="+estcla;
			window.open(pagina,"_blank","menubar=no,toolbar=no,scrollbars=yes,width=568,height=400,resizable=yes,location=no");
		}
		else
		{
			alert("Seleccione niveles anteriores");
		}
	}
	else
	{
		if((codestpro2!="")&&(codestpro1!="")&&(codestpro3!=""))
		{
			pagina="sigesp_cat_public_estpro4.php?codestpro1="+codestpro1+"&codestpro2="+codestpro2+"&codestpro3="+codestpro3
			+"&tipo=reporte"+"&estcla="+estcla;
			window.open(pagina,"_blank","menubar=no,toolbar=no,scrollbars=yes,width=568,height=400,resizable=yes,location=no");	
		}
		else
		{
			alert("Seleccione niveles anteriores");
		}
	}	
}
function catalogo_estpro5()
{
	f=document.form1;
	codestpro1=f.codestpro1.value;
	codestpro2=f.codestpro2.value;
	codestpro3=f.codestpro3.value;
	codestpro4=f.codestpro4.value;
	codestpro5=f.codestpro5.value;
	estcla=f.estclades.value;
	if((codestpro2=='**')||(codestpro1=='**')||(codestpro3=='**')||(codestpro4=='**'))
	{
		if((codestpro2!="")&&(codestpro1!="")&&(codestpro3!="")&&(codestpro4!=""))
		{
			pagina="sigesp_cat_estpro5.php?tipo=reporte&codestpro1="+codestpro1+"&codestpro2="+codestpro2
			+"&codestpro3="+codestpro3+"&codestpro4="+codestpro4+"&estcla="+estcla;
			window.open(pagina,"_blank","menubar=no,toolbar=no,scrollbars=yes,width=568,height=400,resizable=yes,location=no");
		}
		else
		{
			alert("Seleccione niveles anteriores");
		}
	}
	else
	{
		if((codestpro2!="")&&(codestpro1!="")&&(codestpro3!="")&&(codestpro4!=""))
		{
			pagina="sigesp_cat_public_estpro5.php?codestpro1="+codestpro1+"&codestpro2="+codestpro2
													 +"&codestpro3="+codestpro3+"&codestpro4="+codestpro4
													 +"&tipo=reporte"+"&estcla="+estcla;
			window.open(pagina,"_blank","menubar=no,toolbar=no,scrollbars=yes,width=568,height=400,resizable=yes,location=no");
		}
		else
		{
			alert("Seleccione niveles anteriores");
		}
	}
}
function catalogo_estprohas1()
{
	   pagina="sigesp_cat_public_estpro1.php?tipo=rephas";
	   window.open(pagina,"_blank","menubar=no,toolbar=no,scrollbars=yes,width=568,height=400,resizable=yes,location=no");
}
function catalogo_estprohas2()
{
	f=document.form1;
	codestpro1=f.codestpro1h.value;
	estmodest=f.estmodest.value;
	estcla=f.estclahas.value;
	if(estmodest==1)
	{
		if(codestpro1!="")
		{
			pagina="sigesp_cat_public_estpro2.php?codestpro1="+codestpro1+"&tipo=rephas"+"&estcla="+estcla;
			window.open(pagina,"_blank","menubar=no,toolbar=no,scrollbars=yes,width=568,height=400,resizable=yes,location=no");
		}
		else
		{
			alert("Seleccione nivel anterior");
		}
	}
	else
	{
		if(codestpro1=='**')
		{
			pagina="sigesp_cat_estpro2.php?tipo=rephas"+"&estcla="+estcla;
			window.open(pagina,"_blank","menubar=no,toolbar=no,scrollbars=yes,width=568,height=400,resizable=yes,location=no");
		}
		else
		{
			if(codestpro1!="")
			{
				pagina="sigesp_cat_public_estpro2.php?codestpro1="+codestpro1+"&tipo=rephas"+"&estcla="+estcla;
				window.open(pagina,"_blank","menubar=no,toolbar=no,scrollbars=yes,width=568,height=400,resizable=yes,location=no");
			}
			else
			{
				alert("Seleccione  nivel anterior");
			}
		}
	}	
}
function catalogo_estprohas3()
{
	f=document.form1;
	codestpro1=f.codestpro1h.value;
	codestpro2=f.codestpro2h.value;
	codestpro3=f.codestpro3h.value;
	estmodest=f.estmodest.value;
	estcla=f.estclahas.value;
	if(estmodest==1)
	{
		if((codestpro1!="")&&(codestpro2!="")&&(codestpro3==""))
		{
			pagina="sigesp_cat_public_estpro3.php?codestpro1="+codestpro1+"&codestpro2="+codestpro2+"&tipo=rephas"+"&estcla="+estcla;
			window.open(pagina,"_blank","menubar=no,toolbar=no,scrollbars=yes,width=568,height=400,resizable=yes,location=no");
		}
		else
		{
			pagina="sigesp_cat_public_estpro.php?tipo=rephas"+"&estcla="+estcla;
			window.open(pagina,"_blank","menubar=no,toolbar=no,scrollbars=yes,width=568,height=400,resizable=yes,location=no");
		}
	}
	else
	{
		if((codestpro2=='**')||(codestpro1=='**'))
		{
			if((codestpro2!="")&&(codestpro1!=""))
			{
				pagina="sigesp_cat_estpro3.php?tipo=rephas&codestpro1="+codestpro1+"&codestpro2="+codestpro2+"&estcla="+estcla;
				window.open(pagina,"_blank","menubar=no,toolbar=no,scrollbars=yes,width=568,height=400,resizable=yes,location=no");
			}
			else
			{
				alert("Seleccione niveles anteriores");
			}
		}
		else
		{
			if((codestpro2!="")&&(codestpro1!=""))
			{
				pagina="sigesp_cat_public_estpro3.php?codestpro1="+codestpro1+"&codestpro2="+codestpro2+"&tipo=rephas"+"&estcla="+estcla;
				window.open(pagina,"_blank","menubar=no,toolbar=no,scrollbars=yes,width=568,height=400,resizable=yes,location=no");	
			}
			else
			{
				alert("Seleccione niveles anteriores");
			}
		}	
	}	
}
function catalogo_estprohas4()
{
	f=document.form1;
	codestpro1=f.codestpro1h.value;
	codestpro2=f.codestpro2h.value;
	codestpro3=f.codestpro3h.value;
	estcla=f.estclahas.value;
	if((codestpro2=='**')||(codestpro1=='**')||(codestpro3=='**'))
	{
		if((codestpro2!="")&&(codestpro1!="")&&(codestpro3!=""))
		{
			pagina="sigesp_cat_estpro4.php?tipo=rephas&codestpro1="+codestpro1+"&codestpro2="+codestpro2
			+"&codestpro3="+codestpro3+"&estcla="+estcla;
			window.open(pagina,"_blank","menubar=no,toolbar=no,scrollbars=yes,width=568,height=400,resizable=yes,location=no");
		}
		else
		{
			alert("Seleccione niveles anteriores");

		}
	}
	else
	{
		if((codestpro2!="")&&(codestpro1!="")&&(codestpro3!=""))
		{
			pagina="sigesp_cat_public_estpro4.php?codestpro1="+codestpro1+"&codestpro2="+codestpro2+"&codestpro3="+codestpro3
			+"&tipo=rephas"+"&estcla="+estcla;
			window.open(pagina,"_blank","menubar=no,toolbar=no,scrollbars=yes,width=568,height=400,resizable=yes,location=no");	
		}
		else
		{
			alert("Seleccione niveles anteriores");
		}
	}	
}
function catalogo_estprohas5()
{
	f=document.form1;
	codestpro1=f.codestpro1h.value;
	codestpro2=f.codestpro2h.value;
	codestpro3=f.codestpro3h.value;
	codestpro4=f.codestpro4h.value;
	codestpro5=f.codestpro5h.value;
	estcla=f.estclahas.value;
	if((codestpro2=='**')||(codestpro1=='**')||(codestpro3=='**')||(codestpro4=='**'))
	{
		if((codestpro2!="")&&(codestpro1!="")&&(codestpro3!="")&&(codestpro4!=""))
		{
			pagina="sigesp_cat_estpro5.php?tipo=rephas&codestpro1="+codestpro1+"&codestpro2="+codestpro2+"&codestpro3="+codestpro3
			+"&codestpro4="+codestpro4+"&estcla="+estcla;
			window.open(pagina,"_blank","menubar=no,toolbar=no,scrollbars=yes,width=568,height=400,resizable=yes,location=no");
		}
		else
		{
			alert("Seleccione niveles anteriores");
		}
	}
	else
	{
		if((codestpro2!="")&&(codestpro1!="")&&(codestpro3!="")&&(codestpro4!=""))
		{
			pagina="sigesp_cat_public_estpro5.php?codestpro1="+codestpro1+"&codestpro2="+codestpro2
													 +"&codestpro3="+codestpro3+"&codestpro4="+codestpro4
													 +"&tipo=rephas"+"&estcla="+estcla;
			window.open(pagina,"_blank","menubar=no,toolbar=no,scrollbars=yes,width=568,height=400,resizable=yes,location=no");
		}
		else
		{
			alert("Seleccione niveles anteriores");
		}
	}
}

function catalogo_cuentas()
{
	f=document.form1;
	codestpro1  = f.codestpro1.value;
	codestpro2  = f.codestpro2.value;
	codestpro3  = f.codestpro3.value;
	codestpro1h = f.codestpro1h.value;
	codestpro2h = f.codestpro2h.value;
	codestpro3h = f.codestpro3h.value;
	estmodest   = f.estmodest.value;
	estclades   = f.estclades.value;
	estclahas   = f.estclahas.value;
	if(estmodest==1)
    {
		pagina="sigesp_cat_ctasrep.php?codestpro1="+codestpro1+"&codestpro2="+codestpro2+"&codestpro3="+codestpro3
				+"&codestpro1h="+codestpro1h+"&codestpro2h="+codestpro2h+"&codestpro3h="+codestpro3h+"&estclades="+estclades
				+"&estclahas="+estclahas;
		window.open(pagina,"_blank","menubar=no,toolbar=no,scrollbars=yes,width=568,height=400,resizable=yes,location=no");
	}
	else
	{
		codestpro4=f.codestpro4.value;
		codestpro5=f.codestpro5.value;
		codestpro4h=f.codestpro4h.value;
		codestpro5h=f.codestpro5h.value;
		pagina="sigesp_cat_ctasrep.php?codestpro1="+codestpro1+"&codestpro2="+codestpro2+"&codestpro3="+codestpro3
				+"&codestpro4="+codestpro4+"&codestpro5="+codestpro5+"&codestpro1h="+codestpro1h+"&codestpro2h="+codestpro2h
				+"&codestpro3h="+codestpro3h+"&codestpro4h="+codestpro4h+"&codestpro5h="+codestpro5h+"&estclades="+estclades
				+"&estclahas="+estclahas;
		window.open(pagina,"_blank","menubar=no,toolbar=no,scrollbars=yes,width=568,height=400,resizable=yes,location=no");
	}	
}

function catalogo_cuentahas()
{
	f=document.form1;
	codestpro1  = f.codestpro1.value;
	codestpro2  = f.codestpro2.value;
	codestpro3  = f.codestpro3.value;
	codestpro1h = f.codestpro1h.value;
	codestpro2h = f.codestpro2h.value;
	codestpro3h = f.codestpro3h.value;
	estmodest   = f.estmodest.value;
	estclades   = f.estclades.value;
	estclahas   = f.estclahas.value;
	
	if(estmodest==1)
	{
		pagina="sigesp_cat_ctasrephas.php?codestpro1="+codestpro1+"&codestpro2="+codestpro2+"&codestpro3="+codestpro3
			   +"&codestpro1h="+codestpro1h+"&codestpro2h="+codestpro2h+"&codestpro3h="+codestpro3h+"&estclades="+estclades
			   +"&estclahas="+estclahas+"";
		window.open(pagina,"_blank","menubar=no,toolbar=no,scrollbars=yes,width=568,height=400,resizable=yes,location=no");
	}
	else
	{
		codestpro4=f.codestpro4.value;
		codestpro5=f.codestpro5.value;
		codestpro4h=f.codestpro4h.value;
		codestpro5h=f.codestpro5h.value;
		pagina="sigesp_cat_ctasrephas.php?codestpro1="+codestpro1+"&codestpro2="+codestpro2+"&codestpro3="+codestpro3
				+"&codestpro4="+codestpro4+"&codestpro5="+codestpro5+"&codestpro1h="+codestpro1h+"&codestpro2h="+codestpro2h
				+"&codestpro3h="+codestpro3h+"&codestpro4h="+codestpro4h+"&codestpro5h="+codestpro5h+"&estclades="+estclades
				+"&estclahas="+estclahas;
		window.open(pagina,"_blank","menubar=no,toolbar=no,scrollbars=yes,width=568,height=400,resizable=yes,location=no");
	}	
}

function catalogo_fuefindes()
{
    f=document.form1;
    pagina="sigesp_spg_cat_fuente.php?tipo=REPORTE_DESDE";
    window.open(pagina,"catalogo","menubar=no,toolbar=no,scrollbars=yes,width=520,height=400,resizable=yes,location=no");
}

function catalogo_fuefinhas()
{
    f=document.form1;
    pagina="sigesp_spg_cat_fuente.php?tipo=REPORTE_HASTA";
    window.open(pagina,"catalogo","menubar=no,toolbar=no,scrollbars=yes,width=520,height=400,resizable=yes,location=no");
}
</script>
</html>