function pintarFormFiltro()
 {
     include_once $this->configuracion["raiz_documento"] . $this->configuracion["clases"] . "/ciiu.class.php";
     include_once $this->configuracion["raiz_documento"] . "/plugin/RUP/rup.php";
     $form = new formBuilder($this->configuracion, "consultaProveedores", $this->conexion_consulta, '1', 'filtrar');
     $form->setCaptcha(false);
     /* $form->setInput(array("name"=>"search_nit","etiqueta"=>"*Nit o cedula:","tipo"=>"text","clase"=>"required number","complemento"=>"maxlength='15'","ayuda"=>"Nit o número de documento del representante legal NO INCLUIR DIGITO DE VERIFICACION"));
         $form->setInput(array("name"=>"search_nomEmpresa","etiqueta"=>"*Nombre de la empresa:","tipo"=>"text","clase"=>"required","complemento"=>"size=50"));
         $form->setInput(array("name"=>"search_tipopersona","etiqueta"=>"Tipo de Persona","tipo"=>"radio","data"=>array("Natural"=>"N","Juridica"=>"J")));
         $form->setInput(array("name"=>"search_regimen","etiqueta"=>"Regimen Contributivo","tipo"=>"radio","data"=>array("Comun"=>"C","Simplificado"=>"S")));
         $form->setInput(array("name"=>"search_pyme","etiqueta"=>"Es usted PYME:","tipo"=>"radio","data"=>array("Si"=>"S","No"=>"N")));
         $form->setInput(array("name"=>"search_importacion","etiqueta"=>"Exclusividad Productode importación","tipo"=>"radio","data"=>array("Si"=>"S","No"=>"N")));
         $form->setInput(array("name"=>"search_registro","etiqueta"=>"Registro Mercantil:","tipo"=>"radio","data"=>array("Si"=>"S","No"=>"N")));
         $form->setInput(array("name"=>"search_registroUnico","etiqueta"=>"Esta inscrito en el Registro &Uacute;nico<br> de proponentes?","tipo"=>"radio","data"=>array("Si"=>"S","No"=>"N"))); //,"complemento"=>array("S"=>"","N"=>"")
        */
     $rup = new rup($this->configuracion);
     $rup->setIdentificador('ACTRUP', 1);
     $rup->setPregunta('RUP');
     $form->setInput(array("name" => "compRUP", "etiqueta" => "DECRETO 1464 DE 2010 (RUP)", "input" => $rup->armar_rup()));
     $ciiu = new ciiu($this->configuracion);
     $ciiu->setIdentificador('ACTCIIU', 1);
     $ciiu->setPregunta('CIIU');
     $ciiu->setAction($this->configuracion["host"] . $this->configuracion["site"] . $this->configuracion["clases"] . "/ciiu.class.php");
     $ciiu->getNumActividades('ciiu_numactciiu');
     $form->setInput(array("name" => "compCIIU", "etiqueta" => "DECRETO 734 DE 2012 (CIIU)", "input" => $ciiu->armar_ciiu()));
     $form->setCSS($this->configuracion['host'] . $this->configuracion['site'] . "/estilo/consulta_proveedores/form.css");
     return $form->buildForm("", "filtrar");
     //	ACTIVIDAD ECONÓMICA SEGÚN RUP [1 o más actividades]
     //	ACTIVIDAD ECONÓMICA SEGÚN CIIU [1 o más actividades]
 }
 function armarForm2($configuracion)
 {
     include_once $configuracion["raiz_documento"] . $configuracion["clases"] . "/ciiu.class.php";
     include_once $configuracion["raiz_documento"] . "/plugin/RUP/rup.php";
     $form = new formBuilder($configuracion, $this->formulario, $this->conexion, '1', 'ftab2');
     $form->setInput(array("name" => "registroUnico", "etiqueta" => "Esta inscrito en el Registro &Uacute;nico<br> de proponentes?", "tipo" => "radio", "data" => array("Si" => "S", "No" => "N")));
     //,"complemento"=>array("S"=>"","N"=>"")
     $rup = new rup($configuracion);
     $rup->setIdentificador('ACTRUP', 1);
     $rup->setPregunta('RUP');
     $form->setInput(array("name" => "compRUP", "etiqueta" => "DECRETO 1464 DE 2010 (RUP)", "input" => $rup->armar_rup()));
     $ciiu = new ciiu($configuracion);
     $ciiu->setIdentificador('ACTCIIU', 1);
     $ciiu->setPregunta('CIIU');
     $ciiu->setAction($configuracion["host"] . $configuracion["site"] . $configuracion["clases"] . "/ciiu.class.php");
     $ciiu->getNumActividades('ciiu_numactciiu');
     $form->setInput(array("name" => "compCIIU", "etiqueta" => "DECRETO 734 DE 2012 (CIIU)", "input" => $ciiu->armar_ciiu()));
     $form->setInput(array("name" => "form2", "value" => "1", "tipo" => "data"));
     $form->setInput(array("name" => "tab", "value" => "tab2", "tipo" => "hidden"));
     return $form;
 }
    function armarForm($configuracion)
    {
        $form = new formBuilder($configuracion, $this->formulario, $this->conexion, '1', 'ftab1');
        $form->setSubmitHandler('
			if($("#filerup").val()==""){
					if($("#check_filerup").val()==""){
						alert("Porfavor adjunte el PDF del registro unico de proponentes ");
						return false;
					}
			}
			if($("#text_captcha").val()==""){
				alert("Digite el codigo de verificacion");
				return false;
			}
			document.submit();
			');
        $form->setTabs(array("tab1" => "informaci&oacute;n B&aacute;sica", "tab2" => "Actividad Comercial", "tab3" => "Descripci&oacute;n Servicio o Producto"));
        $form->setInput(array("tab" => "tab1", "name" => "cont1", "etiqueta" => "Informaci&oacute;n de la empresa", "tipo" => "label"));
        $form->setInput(array("tab" => "tab1", "name" => "nit", "etiqueta" => "*Nit o cedula:", "tipo" => "text", "clase" => "required number", "complemento" => "maxlength='10'", "ayuda" => "Nit o número de documento del representante legal"));
        $form->setInput(array("tab" => "tab1", "name" => "digitoVerificacion", "etiqueta" => "*DV:", "tipo" => "text", "clase" => "number", "complemento" => "maxlength='1'", "ayuda" => "Digito de Verificacion"));
        $form->setInput(array("tab" => "tab1", "name" => "nomEmpresa", "etiqueta" => "*Nombre de la empresa:", "tipo" => "text", "clase" => "required", "complemento" => "size=50"));
        $form->setInput(array("tab" => "tab1", "name" => "cont2", "etiqueta" => "Informaci&oacute;n del Contacto", "tipo" => "label"));
        $form->setInput(array("tab" => "tab1", "name" => "municipio", "etiqueta" => "*Ciudad", "tipo" => "text", "clase" => "required", "complemento" => "maxlength='30'"));
        $form->setInput(array("tab" => "tab1", "name" => "direccion", "etiqueta" => "*Direcci&oacute;n:", "tipo" => "text", "clase" => "required", "complemento" => "size=50"));
        $form->setInput(array("tab" => "tab1", "name" => "correo", "etiqueta" => "*Correo:", "tipo" => "text", "clase" => "required email", "complemento" => "maxlength='60'"));
        $form->setInput(array("tab" => "tab1", "name" => "web", "etiqueta" => "Sitio Web:", "tipo" => "text", "complemento" => "maxlength='60'"));
        $form->setInput(array("tab" => "tab1", "name" => "telefono1", "etiqueta" => "*Tel&eacute;fono 1:", "tipo" => "text", "clase" => "required number", "complemento" => "maxlength='15'"));
        $form->setInput(array("tab" => "tab1", "name" => "ext1", "etiqueta" => "Extensi&oacute;n (tel1):", "tipo" => "text", "clase" => "number", "complemento" => "maxlength='15'"));
        $form->setInput(array("tab" => "tab1", "name" => "telefono2", "etiqueta" => "Tel&eacute;fono 2:", "tipo" => "text", "clase" => "number", "complemento" => "maxlength='15'"));
        $form->setInput(array("tab" => "tab1", "name" => "ext2", "etiqueta" => "Extensi&oacute;n (tel2):", "tipo" => "text", "clase" => "number", "complemento" => "maxlength='15'"));
        $form->setInput(array("tab" => "tab1", "name" => "movil", "etiqueta" => "Movil:", "tipo" => "text", "clase" => "number", "complemento" => "maxlength='15'"));
        $form->setInput(array("tab" => "tab1", "name" => "fax", "etiqueta" => "Fax:", "tipo" => "text", "clase" => "number", "complemento" => "maxlength='15'"));
        $form->setInput(array("tab" => "tab1", "name" => "nomAsesor", "etiqueta" => "Asesor Comercial", "tipo" => "text", "complemento" => "maxlength='50'"));
        $form->setInput(array("tab" => "tab1", "name" => "telAsesor", "etiqueta" => "Tel&eacute;fono del Asesor:", "tipo" => "text", "clase" => "number", "complemento" => "maxlength='15'"));
        $form->setInput(array("tab" => "tab1", "name" => "cont3", "etiqueta" => "Informaci&oacute;n del Representante Legal", "tipo" => "label"));
        $form->setInput(array("tab" => "tab1", "name" => "tipdocRep", "etiqueta" => "*Tipo de documento:", "tipo" => "radio", "data" => array("CC" => "CC", "CE" => "CE", "OT" => "OT"), "ayuda" => "CC: Cédula de ciudadania CE: Cédula de Extranería OT: Otro"));
        $form->setInput(array("tab" => "tab1", "name" => "numdocRep", "etiqueta" => "*Documento:", "tipo" => "text", "clase" => "required number", "complemento" => "maxlength='15'"));
        $form->setInput(array("tab" => "tab1", "name" => "ape1Rep", "etiqueta" => "*Primer Apellido:", "tipo" => "text", "clase" => "required", "complemento" => "maxlength='30'"));
        $form->setInput(array("tab" => "tab1", "name" => "ape2Rep", "etiqueta" => "Segundo Apellido:", "tipo" => "text", "complemento" => "maxlength='30'"));
        $form->setInput(array("tab" => "tab1", "name" => "nom1Rep", "etiqueta" => "*Primer Nombre:", "tipo" => "text", "clase" => "required", "complemento" => "maxlength='30'"));
        $form->setInput(array("tab" => "tab1", "name" => "nom2Rep", "etiqueta" => "Segundo Nombre:", "tipo" => "text", "complemento" => "maxlength='30'"));
        $form->setInput(array("tab" => "tab1", "name" => "cont4", "etiqueta" => "Informaci&oacute;n Adicional", "tipo" => "label"));
        $form->setInput(array("tab" => "tab1", "name" => "tipopersona", "etiqueta" => "Tipo de Persona", "tipo" => "radio", "data" => array("Natural" => "N", "Juridica" => "J"), "ayuda" => "N: Natural J: Juridica"));
        $form->setInput(array("tab" => "tab1", "name" => "regimen", "etiqueta" => "Regimen Contributivo", "tipo" => "radio", "data" => array("Comun" => "C", "Simplificado" => "S"), "ayuda" => "C: Comun S: Simplificado"));
        $form->setInput(array("tab" => "tab1", "name" => "importacion", "etiqueta" => "Exclusividad Producto de importaci&oacute;n", "tipo" => "radio", "data" => array("Si" => "S", "No" => "N"), "ayuda" => "S: Si N: No"));
        $form->setInput(array("tab" => "tab1", "name" => "pyme", "etiqueta" => "Es usted PYME:", "tipo" => "radio", "data" => array("Si" => "S", "No" => "N"), "ayuda" => "S: Si N: No"));
        $form->setInput(array("tab" => "tab1", "name" => "registro", "etiqueta" => "Registro Mercantil:", "tipo" => "radio", "data" => array("Si" => "S", "No" => "N"), "ayuda" => "S: Si N: No"));
        $form->setInput(array("tab" => "tab1", "name" => "form1", "value" => "1", "tipo" => "data"));
        $form->setInput(array("tab" => "tab1", "name" => "identificador", "value" => $this->tiempo, "tipo" => "data"));
        $form->setInput(array("tab" => "tab1", "name" => "tab", "value" => "tab1", "tipo" => "hidden"));
        $form->setCSS($configuracion['host'] . $configuracion['site'] . "/bloque/registro_proveedor/form.css");
        // tab2
        include_once $configuracion["raiz_documento"] . $configuracion["clases"] . "/ciiu.class.php";
        include_once $configuracion["raiz_documento"] . "/plugin/RUP/rup.php";
        $form->setInput(array("tab" => "tab2", "name" => "registroUnico", "etiqueta" => "Esta inscrito en el Registro &Uacute;nico<br> de proponentes?", "tipo" => "radio", "data" => array("Si" => "S", "No" => "N"), "ayuda" => "S: Si N: No"));
        //,"complemento"=>array("S"=>"","N"=>"")
        $rup = new rup($configuracion);
        $rup->setIdentificador('ACTRUP', 1);
        $rup->setPregunta('RUP');
        $form->setInput(array("tab" => "tab2", "name" => "compRUP", "etiqueta" => "DECRETO 1464 DE 2010 (RUP)", "input" => $rup->armar_rup()));
        $ciiu = new ciiu($configuracion);
        $ciiu->setIdentificador('ACTCIIU', 1);
        //$ciiu->usuario=$this->tiempo;
        $ciiu->setPregunta('CIIU');
        $ciiu->setAction($configuracion["host"] . $configuracion["site"] . $configuracion["clases"] . "/ciiu.class.php");
        $ciiu->getNumActividades('ciiu_numactciiu');
        $form->setInput(array("tab" => "tab2", "name" => "compCIIU", "etiqueta" => "DECRETO 734 DE 2012 (CIIU)", "input" => $ciiu->armar_ciiu()));
        //tab3
        $form->setInput(array("tab" => "tab3", "name" => "descripcion", "etiqueta" => "* Realice una descripci&oacute;n detallada del producto<br/> (max. 200 car&aacute;teres)", "tipo" => "textarea", "clase" => "required", "complemento" => "maxlength='200' cols='94' rows='8'"));
        $form->setInput(array("tab" => "tab3", "name" => "filerup", "etiqueta" => "* Adjuntar PDF Registro Único de Proponentes:", "clase" => "", "tipo" => "file"));
        return $form;
    }
        $i = 0;
        $cadena_sql = $this->sql("ciiu_traer_actividades", array($this->usuario, $PREGUNTA), "registro");
        $registro = $this->ejecutarSQL($this->configuracion, $this->conexion, $cadena_sql, "busqueda");
        $this->numActividades = count($registro);
        echo "<input type='hidden' id='" . $this->nameActividades . "' name='" . $this->nameActividades . "' value='" . $this->numActividades . "' />";
        while (isset($registro[$i][0])) {
            echo "<br/><a class='ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only' href='javascript:eliminar_" . $this->tiempo . "(\"" . $this->usuario . "\",\"" . $_REQUEST['PREGUNTA'] . "\",\"" . $registro[$i][0] . "\")'>Eliminar</a> " . $registro[$i][0] . "-" . $registro[$i][1];
            $i++;
        }
    }
}
if (isset($_REQUEST['xajax'])) {
    require_once "config.class.php";
    $esta_configuracion = new config();
    $configuracion = $esta_configuracion->variable("../");
    $ciiu = new ciiu($configuracion);
    switch ($_REQUEST['xajax']) {
        case 'ciiu_division':
            $ciiu->rescatar_ciiu_division();
            break;
        case 'ciiu_clase':
            $ciiu->rescatar_ciiu_clase($_REQUEST['valor']);
            break;
        case 'ciiu_subclase':
            $ciiu->rescatar_ciiu_sub_clase($_REQUEST['valor']);
            break;
        case 'ciiu_actividad':
            $ciiu->rescatar_ciiu_actividad($_REQUEST['valor']);
            break;
        case 'ciiu_eliminaractividad':
            $ciiu->eliminar_ciiu_actividad($_REQUEST['PREGUNTA'], $_REQUEST['valor']);