var qvalMAN = false;
var qIslas = "";
var notifPoll = 60000; //Tiempo en ms de polling de notificaciones
function showFirm( tipoPersona, nameField, typeField ) {
qxIni("showFirm( tipoPersona, nameField, typeField )", 1, "mascara.js");
if(typeField == null) {
valora = document.forms["fb"][nameField].value;
ventana = window.open( '', 'FIT_FIRM', 'width=728,height=387,status,scrollbars=no,resizable');
contenidoX = "
";
contenidoX += "";
contenidoX += "

";
contenidoX += "
";
ventana.document.writeln("FIT-BANK APPLICATION FIRMS"+contenidoX);
ventana.document.writeln("");
/*self.onfocus = ventana.focus;*/
}else {
ruta = '';
//alert('tipoPersona: ' + tipoPersona );
valueType = document.forms["fb"][typeField].value;
dimension = 'width=728,height=387,status,scrollbars=no,resizable';
limite = "height='386'";
extension = ".GIF";
if( tipoPersona == 'JUR' ) {
if( valueType == '3' ) {
ruta = 'balance/';
extension = ".xls";
valora = document.forms["fb"][nameField].value;
url = "imagenes/san/documents/" + ruta + valora + extension;
ventana = window.open(url, 'FIT_DOCUMENT', dimension);
return;
}
if( valueType == '1' ) {
ruta = 'escrituracons/';
extension = ".GIF";
valora = document.forms["fb"][nameField].value;
dimension = 'width=787,height=900,status,scrollbars=no,resizable';
limite = "height='899'";
}
}else {
if( valueType=='1' )
ruta = 'cedula/';
else if( valueType == '3' )
ruta = 'libreta/';
else if( valueType == '4' )
ruta = 'licencia/';
else if( valueType == '5' )
ruta = 'votacion/';
else if( valueType == '8' ) {
ruta = 'pagare/';
dimension = 'width=787,height=900,status,scrollbars=no,resizable';
limite = "height='899'";
}
}
if( tipoPersona == 'CHQ' ) {
ruta = 'vista/';
}
valora = document.forms["fb"][nameField].value;
//alert('ruta: ' + ruta + ' valora: '+ valora+ ' extension: ' + extension );
ventana = window.open('', 'FIT_DOCUMENT', dimension);
contenidoX = "";
contenidoX += "";
contenidoX += "

";
contenidoX += "
";
ventana.document.writeln("FIT-BANK APPLICATION DIGITAL DOCUMENTS" + contenidoX);
ventana.document.writeln("");
/*self.onfocus = ventana.focus;*/
}
qxEnd();
}
function sa(e) {
qxIni("sa(e)", 1, "mascara.js");
if(this.value) this.select(0, this.value.length);
qxEnd();
}
/*
* Función que identifica pluggins maliciosos
*/
function seguridad(){
/*if(window.////console && window.////console.firebug){
window.location="html/seguridad.htm";
return false;
}*/
}
/*
* Función que arma el menú de dojo
*/
function armaMenu(){
dojo.addOnLoad(function(){
setTimeout('refreshMenu()',1000);
}
);
}
/*
* Función que se encarga de cargar los componentes del menú y lanza el mensaje cuando este ha finalizado
*/
function refreshMenu(){
try{
var obj=dojo.byId('barraMenu');
var menu = new dijit.layout.ContentPane( {
href:"menudj.jsp"
}, dojo.byId("barraMenu"));
menu.onDownloadEnd=function () {
st("MENU CARGADO CORRECTAMENTE", false, 0);
}
menu.refresh();
}catch(e){
alert(e.message);
}
}
function ol(standalone){ //onload
qxIni("ol()", 1, "mascara.js");
seguridad();
if(document.forms["fb"]) document.forms["fb"].onsubmit = "return false;";
document.onkeydown = procesaEventoOnKeyDown;
document.onkeyup = calcular;
document.onContextMenu = "return false;";
document.onmousemove = function() {
globalVars["tiempoCad"] = new Date().getTime();
}
if(!standalone) {
window.onbeforeunload = funcionCerrarVentana;
}
window.onfocus = "document.focus();";
window.focus();
if(!qFgCV && document.getElementById("ps")) {
document.getElementById("ps").onfocus = sa;
document.getElementById("pt").onfocus = sa;
document.getElementById("ps").onkeydown = pp;
document.getElementById("pt").onkeydown = pp;
document.getElementById("ps").onkeydownOld = null;
document.getElementById("pt").onkeydownOld = null;
try { document.getElementById("ps").focus(); } catch(e) {}
}
if(!qFgCV) retrNotif(notifPoll);
if(standalone) {
mo(null, true);
}
qxEnd();
}
function pp(e) { //subsistema:transaccion
var evento = new Evento(e);
if(evento.tecla == evento.ENTER) {
globalVars['cambio'] = "pt('" + document.getElementById("ps").value + ":" + document.getElementById("pt").value + "')";
pt(document.getElementById("ps").value + ":" + document.getElementById("pt").value);
}
if(document.all){
if(evento.elemento.id == "ps" && evento.elemento.value.length == 2 &&
(!document.selection || document.selection.createRange().text.length == 0) &&
evento.tecla != evento.TAB && evento.tecla != evento.SUPR && evento.tecla != evento.BACKSPACE && evento.tecla != evento.ENTER) {
document.getElementById("pt").focus();
}
}else{
if(evento.elemento.id == "ps" && evento.elemento.value.length == 2 &&
evento.tecla != evento.TAB && evento.tecla != evento.SUPR && evento.tecla != evento.BACKSPACE && evento.tecla != evento.ENTER) {
var start = evento.elemento.selectionStart;
var end = evento.elemento.selectionEnd;
if(start == 0 && end == 2){
//No hacer nada
}else{
document.getElementById("pt").focus();
}
}
}
if(document.getElementById("mc") != null) document.getElementById("mc").selectedIndex = 0;
}
function pt(d) { //ir a proxima transaccion subsistema:transaccion
if(d!=":" && d!="" && d.substring(0,1) != ":" && d.substring(d.length-1) != ":" && valCam(qvalMAN)) {
globalVars['bloqueo'] = false;
st("Cargando",true);
cargaDate();
callGclock();
as = split(d, ":")[0];
at = split(d, ":")[1];
d = (as.length == 1 ? "0" : "") + as;
d += ":" + (at.length == 1 ? "000" : at.length == 2 ? "00" : at.length == 3 ? "0" : "") + at;
ac = d;
/*document.getElementById("fi").src = "FBSMF?s=" + d;*/
new Ajax.Request(
"FBSMF"+obtieneSesion(),
{
method: 'post',
parameters: "s=" + d,
onComplete: mo
}
);
document.getElementById("ps").value = split(d, ":")[0];
document.getElementById("pt").value = split(d, ":")[1];
window.status = "";
parent.document.title = "FIT-BANK APPLICATION ENVIRONMENT - " + d.replace(":", " : ");
closePop();
cerrarCal();
cerrarWins();
}else {
document.getElementById('ps').value = (as.length == 1 ? "0" : "") + as;
document.getElementById('pt').value = (at.length == 1 ? "000" : at.length == 2 ? "00" : at.length == 3 ? "0" : "") + at;
}
}
function pt2(d) { //ir a proxima transaccion subsistema:transaccion
if(d!=":" && d!="" && d.substring(0,1)!=":" && d.substring(d.length-1)!=":" && valCam(qvalMAN)) {
globalVars['bloqueo'] = false;
//st("Cargando",true);
//cargaDate();
//callGclock();
as = split(d,":")[0];
at = split(d,":")[1];
d = (as.length==1? "0" : "") + as;
d += ":" + (at.length==1 ? "000" : at.length==2 ? "00" : at.length==3 ? "0" : "") + at;
ac = d;
/*document.getElementById("fi").src = "FBSMF?s=" + d;*/
new Ajax.Request(
"FBSMF",
{
method: 'post',
parameters: "s=" + d,
onComplete: mo
}
);
document.getElementById("ps").value = split(d,":")[0];
document.getElementById("pt").value = split(d,":")[1];
window.status = "";
//parent.document.title = "FIT-BANK APPLICATION ENVIRONMENT - " + d.replace(":", " : ");
closePop();
cerrarCal();
cerrarWins();
}else {
document.getElementById('ps').value = (as.length==1? "0" : "") + as;
document.getElementById('pt').value = (at.length==1 ? "000" : at.length==2 ? "00" : at.length==3 ? "0" : "") + at;
}
}
function abrirConVals() {
qxIni("abrirConVals()", 1, "mascara.js");
var forma = opener.flag['Forma'];
ac = forma;
document.getElementById("fi").src = "FBSMF?s=" + forma;
document.getElementById("ps").value = split(forma,":")[0];
document.getElementById("pt").value = split(forma,":")[1];
window.status = "";
qxEnd();
}
function consultaConVals() {
if(document.getElementById('estatus') == null) return;
qxIni("consultaConVals()", 1, "mascara.js");
as = document.getElementById('ps').value;
at = document.getElementById('pt').value;
if(qFgCV && opener.flag['Filtros'].length > 0) {
var filtros = split(opener.flag['Filtros'], "|");
var names = split(filtros[0], ","); // nombres de los campos de criterio
var valores = split(filtros[1], ","); // valores correspondientes para filtrar consulta
for(var i=0; i e ? d.value.substring(0, e) : d.value;
qxEnd();
}
function maxLong(d, e) {
qxIni("maxLong(d, e)", 1, "mascara.js");
//var pressedKey = String.fromCharCode(event.keyCode).toLowerCase();
ev = event.keyCode;
if(event.ctrlKey && ev == 86) {
if(d.value.length < e)
setTimeout("document.getElementById('" + d.name + "').value=document.getElementById('" +
d.name + "').value.substring(0," + e + ");", 140);
else {
event.returnValue = false;
d.value = d.value.substring(0, e);
}
}else if(d.value.length == e && !(ev == 8 || ev == 46 || (ev > 34 && ev < 41))) {
event.returnValue = false;
}else if(d.value.length > e) {
event.returnValue = false;
d.value = d.value.substring(0, e);
}
qxEnd();
}
function crireq() {
qxIni("crireq()", 1, "mascara.js");
for(var i in dtc) {
if(qdf.qzRegistro && qdf[i] && qdf[i].value != dtc[i].value) {
qdf.qzBloqueActivo.value = dtc[i].bloque;
findElByName("qzPagina" )[dtc[i].bloque].value = "1";
findElByName("qzRegistro")[dtc[i].bloque].value = "1";
break;
}
}
for(var p=0; p 0) {
if(i==0) g = document.forms["fb"].elements[valor - auxcount];
else g = document.forms["fb"].elements[valor + auxcount];
if(g == null) break;
if(g.type == "text" || g.type == "password" || g.type == "file") {
if(g.value != "") {
vacio = true;
break;
}
counter--;
}
auxcount++;
}
}
}else if(f.length == 1) {
vacio = true;
}
if(vacio) {
MostrarTab(td[p]);
dt[p].style.background = "rgb(255,255,140)";
st("CONSULTA NO ENVIADA, FALTA COMPLETAR PARAMETROS DE BUSQUEDA", false, 1);
dt[p].focus();
globalVars['cambio'] = "";
qxEnd();
return false;
}
}
}
qxEnd();
return true;
}
function camreq() {
//Sección de requerido especial para campos con OrigenDB con filas (no aplica para criterio ni orden)
qxIni("camreq()", 1, "mascara.js");
if(dtn.length > 0) {
for(var a=0; a 1 && dte[ini].tagName == null) { // analiza filas clonadas
for(var bb=0; bb= 0)) {
qxEnd();
return answer + "VACIO";
}
if(!cri || cri.indexOf("R") >= 0) {
var repetido = false;
for(var i=0; i= 0) {
var sinSecuencia = true;
var contar = 1;
for(var j=1; j<=lleno; j++) {
for(var i=0; i 0 && noms.length == tabs.length) {
for(var i=0; i 0 ? valores.substring(1) : valores;
if(document.getElementById('estatus') != null) {
f2();
}else {
limpiarRegistroF2();
}
}catch(exc) {
globalVars["postLIMPIAR"] = null;
}
}else {
if(document.getElementById('estatus') == null) {
campos = findElementByTagFN(qdf, "input");
for(var i=0; i 0) {
for(var b=0; b 0) { //para clonado
if(clon != null && clon < qdf[lista[i]].length) qdf[lista[i]][clon].value = ""; //borra sólo el registro especificado en clon.
else for(var j=0; j0) || (tcx!=null && tcx.length>0)) ) {
if(tcc!=null && tcc.length>0) {
for(var a=0; a0) {
for(var a=0; a 0) {
for(var a=0; a 0) {
for(var a=0; a 0) {
for(var i=0; i";
wt += "