<?php use_helper( 'UrlFunctions' ); ?>
<?php use_helper( 'IncludePartial' ); ?>
<div id="resultContent" style=""></div>
<script>
modoBusquedaDescripcion = function( type )
{
    pr( type );
    if( type == "DIVISION" )
    {
        var s_elm_html = '<select class="combo" id="cbo_division" name="cbo_division"></select>';
        $( "#td_elm_value" ).html( s_elm_html );

        publicForSelectAjaxJSON( '<?php echo buildUrl( 'pro/request' ) ?>', 'TipoProc=getDivision', 'cbo_division' );
    }
    else
    {
        var s_elm_html = '<input type="text" class="text" name="Documento" id="Documento">';
        $( "#td_elm_value" ).html( s_elm_html );
    }
}
</script>
<div class="block">
    <form action="" method="post" name="form1" id="form1">
        <table class="marco" style="background:#E3E9E2" width="99%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td>
                    <table width="100%" cellspacing="0" cellpadding="0" border="0">
                        <tr>
                            <td nowrap="nowrap">
                                <table  cellspacing="1" cellpadding="0" border="0" class="SubCabecera">
                                    <tr>
                                        <td  nowrap="nowrap"><label for=IdPersona class="label">C&oacute;digo :</label></td>
                                        <td nowrap="nowrap"><input type="text" class="text" name="IdPersona" id="IdPersona" style="width:90%"></td>
                                        <td  nowrap="nowrap"><label for=NombreCompleto class="label">Nombre :</label></td>
                                        <td nowrap="nowrap"><input type="text" class="text" name="NombreCompleto" id="NombreCompleto"></td>
                                    </tr>
                                    <tr>
                                        <td  nowrap="nowrap"><label for=Documento class="label">Tipo :</label></td>
                                        <td nowrap="nowrap">
                                            <select class="combo" name="TipoDocumento" id="TipoDocumento" onchange="modoBusquedaDescripcion( this.value );">
                                                <option value=""> - Seleccione - </option>
                                                <option value="RUC"> RUC </option>
                                                <option value="DNI"> DNI </option>
                                                <option value="PASAPORTE"> PASAPORTE </option>
                                                <option value="DIVISION"> DIVISION </option>
					                        </select>
                                        </td>
                                        <td  nowrap="nowrap"><label for=Documento class="label">Documento :</label></td>
                                        <td nowrap="nowrap" id="td_elm_value">
                                            <input type="text" class="text" name="Documento" id="Documento">
                                        </td>
                                    </tr>
                                </table>
                            </td>
                            <td>
                                <input type="hidden" name="IdCompania" value="<?=myUser::getUser()->getIdBusiness()?>">
                                <input type="button" onclick="findControl();" value="Buscar" class="button">
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </form>
</div>
<br>
<?php include_partial( "clieGrid" ); ?>