/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

function insertarCalendario(formulario, campo, pFecha, pCampoFechaFin){
            //pFecha debe venir en formato dd-mm-yyyy
            if (pFecha==''){
                new tcal ({
                    // form name
                    'formname': formulario,
                    // input name
                    'controlname': campo,
                    'ffin': pCampoFechaFin
                });
            }else {
                var year = parseInt(pFecha.substring(6,10),10);
                var month = parseInt(pFecha.substring(3,5),10);
                var day = parseInt(pFecha.substring(0,2),10);

                var fechaAux = new Date(year, (month-1), day);
                fechaAux.setDate(fechaAux.getDate()+3)
                var fechaCalendario =f_tcalGenerDate(fechaAux);
                new tcal ({
                    // form name
                    'formname': formulario,
                    // input name
                    'controlname': campo,
                    'selected': fechaCalendario,
                    'ffin': pCampoFechaFin
                });
            }
}
