$xBtn = new cHButton();
$xTxt = new cHText();
$xDate = new cHDate();
$xSel = new cHSelect();
$xFMT = new cFormato(false);
$jxc = new TinyAjax();
function jsAgregarContrato($id, $nombre)
{
    $xForma = new cFormato();
}
//$jxc ->exportFunction('jsAgregarContrato', array('idsolicitud', 'idparcialidad'), "#iddatos_pago");
$jxc->process();
//ini_set("display_errors", "on");
$xHP->init("initComponents()");
if ($action == SYS_NINGUNO) {
    $xFRM->addHElem($xFMT->getSelectDeFormatos()->get(true));
    $xFRM->addSubmit();
} elseif ($action == SYS_UNO) {
    //editar
    $xFMT->init($idcontrato);
    $titulo = $xFMT->getTitulo();
    $xFRM->setTitle($titulo);
    $xFRM->addHElem($xFMT->getSelectVariables("", "onchange=\"jsAddText()\" "));
    $xFRM->addSubmit("", "", "");
    $text_default = $xFMT->get();
    $xFRM->addHTML("<textarea class=\"ckeditor\" name=\"ckeditor\" id=\"ckeditor\" rows=\"20\" cols=\"15\">{$text_default}</textarea>");
    $xFRM->addFootElement("<input type='hidden' value='{$idcontrato}' name='idcontrato' />");
    $xFRM->setAction("frmeditor_contratos.php?action=2");
} elseif ($action == SYS_DOS) {
    //guardar
    $s = isset($_REQUEST["ckeditor"]) ? $_REQUEST["ckeditor"] : "";