function DeshabilitarClickDerecho(){ 
    return false;
}

function ExpandirColapsar(Fila){
    var imagen = 'img' + Fila;

    if(document.getElementById(Fila).style.display == 'none'){
        document.getElementById(Fila).style.display = '';
        document.getElementById(imagen).src = '../imagenes/colapsar.gif';
    }
    else
    {
        document.getElementById(Fila).style.display = 'none';
        document.getElementById(imagen).src = '../imagenes/expandir.gif';
    }
}

function SoloNumeros(evt){
    var nav4 = window.Event ? true : false;
    var key = nav4 ? evt.which : evt.keyCode; 

    return (key <= 13 || (key >= 48 && key <= 57));
}

function solonumerostelefono(evt){
    var nav4 = window.Event ? true : false;
    var key = nav4 ? evt.which : evt.keyCode; 

    return ((key <= 13) || (key == 35) || (key == 42) || (key == 45) || (key >= 48 && key <= 57));
}

function sololetras(evt){
    var nav4 = window.Event ? true : false;
    var key = nav4 ? evt.which : evt.keyCode; 

    return ((key <= 13) || (key >= 65 && key <= 90)||(key >= 97 && key <= 122));
}
function sololetrasconespacio(evt){
    var nav4 = window.Event ? true : false;
    var key = nav4 ? evt.which : evt.keyCode; 

    return ((key <= 13) || (key == 32) ||(key >= 65 && key <= 90)||(key >= 97 && key <= 122));
}

function SoloDecimales(evt, txt){
    var nav4 = window.Event ? true : false;
    var key = nav4 ? evt.which : evt.keyCode; 

    //return (key = 46 || key <= 13 || (key >= 48 && key <= 57));

    if((key < 48 || key > 57) && key != 46) return false;

    if(key == 46 && txt.indexOf('.') != -1) return false;
}

function EjecutarValidators(){
    if(typeof(Page_ClientValidate) == 'function'){
        Page_ClientValidate();
    }
}
function openvistaprevia() {
        var w = 300, h = 340;
        if (document.all) {
           w = document.body.clientWidth;
           h = document.body.clientHeight;
        }
        else if (document.layers) {
           w = window.innerWidth;
           h = window.innerHeight;
        }

        var popW = 670, popH = 800;
        var leftPos = (w-popW)/2, topPos = (h-popH)/2;

window.open('../Documentos/resumenestadodecta.aspx', 'Resumen', 'toolbar=no, menubar=no,scrollbars=yes, status=no,width=' + popW + ',height='+popH+',top='+ topPos +',left='+leftPos);
}

function abrirpopup1() {
        var w = 300, h = 340;
        if (document.all) {
           w = document.body.clientWidth;
           h = document.body.clientHeight;
        }
        else if (document.layers) {
           w = window.innerWidth;
           h = window.innerHeight;
        }

        var popW = 800, popH = 700;
        var leftPos = (w-popW)/2, topPos = (h-popH)/2;

window.open('../Documentos/Reporte.aspx', 'Comprobante', 'toolbar=no, menubar=no, scrollbars=no, directories=no, status=no, width=' + popW + ',height='+popH+',top='+topPos+',left='+leftPos);
}
function abrirpopup(num) {
        var w = 300, h = 340;
        if (document.all) {
           w = document.body.clientWidth;
           h = document.body.clientHeight;
        }
        else if (document.layers) {
           w = window.innerWidth;
           h = window.innerHeight;
        }

        var popW = 200, popH = 100;
        var leftPos = (w-popW)/2, topPos = (h-popH)/2;

window.open('../Documentos/Reporte.aspx?Ctnumber='+ num, 'Procesando', 'toolbar=no,  menubar=no, scrollbars=yes, directories=no, status=no, width=' + popW + ',height='+popH+',top='+topPos+',left='+leftPos);
}