﻿function formatLength(str)
{
    ctrl = document.getElementById(str);
    textbox = document.getElementById('txtFiltro');

    if (ctrl.value == "0")
        textbox.length = 7;
    else if (ctrl.value == "11")
        textbox.length = 15;
    else
        textbox.length = 20;

    textbox.Value = "";
}

function LoadDocsPopUp(value, tipo, numProcesso, width, height) {
    if (value > 0) {
        window.open('DocsPopUp.aspx?IdMotivo=' + value + '&TipoMotivo=' + tipo + '&NumProcesso=' + numProcesso, null, 'height=' + height + ',width=' + width + ',status=yes,toolbar=no,menubar=no,location=no');
    }
}

function ViewLinha(disp, ctrlName, ctrlName2, dropDownName, dropDownName2) {
    ctrl = document.getElementById(ctrlName);
    ctrl2 = document.getElementById(ctrlName2);
    ctrlDdl = document.getElementById(dropDownName);
    ctrlDdl2 = document.getElementById(dropDownName2);
    if (disp == "D") {
        ctrl.style.display = 'block';
        ctrl2.style.display = 'none';
        ctrlDdl2.selectedIndex = 0;
    }
    else if (disp == "I") {
        ctrl.style.display = 'none';
        ctrl2.style.display = 'block';
        ctrlDdl.selectedIndex = 0;
    }
    else {
        ctrl.style.display = 'none';
        ctrl2.style.display = 'none';
        ctrlDdl.selectedIndex = 0;
        ctrlDdl2.selectedIndex = 0;
    }
}

function Teste(value) {
    debugger;
    alert(value);
}

