function addGarantiaReal($tipo, $tipo_de_valuacion = false, $valor = 0, $persona_propietaria = false, $nombre_del_propietario = "", $fecha_de_adquisicion = false, $documento_presentado = "", $estado_fisico = false, $descripcion = "", $observaciones = "", $fecha_actual = false)
 {
     $xgar = new cCreditosGarantias();
     $xgar->setClaveDeCredito($this->getNumeroDeCredito());
     $xgar->setClaveDePersona($this->getClaveDePersona());
     $xgar->add($tipo, $tipo_de_valuacion, $valor, $persona_propietaria, $nombre_del_propietario, $fecha_de_adquisicion, $documento_presentado, $estado_fisico, $descripcion, $observaciones, $fecha_actual);
 }
if ($permiso === false) {
    header("location:../404.php?i=999");
}
$_SESSION["current_file"] = addslashes($theFile);
//=====================================================================================================
$xHP = new cHPage("REPORTE DE ", HP_REPORT);
$xHP->setTitle($xHP->lang("catalogo de", "riesgo"));
$oficial = elusuario($iduser);
/**
 */
$xF = new cFecha();
$clave = isset($_GET["clave"]) ? $_GET["clave"] : SYS_NINGUNO;
echo $xHP->getHeader();
echo $xHP->setBodyinit("initComponents();");
$xFMT = new cFormato(151);
$xGar = new cCreditosGarantias($clave);
$xGar->init();
$xFMT->setPersona($xGar->getClaveDePersona());
$xFMT->setCredito($xGar->getClaveDeCredito());
$xFMT->setGarantiaDeCredito($clave);
$xFMT->setProcesarVars();
echo $xFMT->get();
echo $xHP->setBodyEnd();
?>
<script>
function initComponents(){
	window.print();
}
</script>
<?php 
$xHP->end();