function showfileUpl() {
    document.getElementById("txt1").className = "hid";
    document.getElementById("showfileUpl").className = "hid";
    document.getElementById("txt2").className = "";
    document.getElementById("fileUplwrp").className = "";
}

function hidefileUpl() {
    document.getElementById("txt1").className = "";
    document.getElementById("showfileUpl").className = "";
    document.getElementById("txt2").className = "hid";
    document.getElementById("fileUplwrp").className = "hid";
    document.getElementById("fileUpl").value = "";
}

function showZ_alk() {
    document.getElementById("p_zalk").className = "pole";
    document.getElementById("p_drAlk").className = "pole_h";
    document.getElementById("p_drBAlk").className = "pole_h hid";
    document.getElementById("czp_tak").checked = true;
    document.getElementById("czp_nie").checked = false;
}

function showB_alk() {
    document.getElementById("p_zalk").className = "hid";
    document.getElementById("p_drAlk").className = "pole_h hid";
    document.getElementById("p_drBAlk").className = "pole_h";
    document.getElementById("czp_tak").checked = false;
    document.getElementById("czp_nie").checked = true;
}

function showMoreButton(id) {
    document.getElementById(id + "_more").className = "more";
}

function showList(id) {
    var acctualText = document.getElementById(id).innerHTML;
    document.getElementById(id + "_list").className = "";
    document.getElementById(id).onclick = function(){hideList(this, acctualText)};
    document.getElementById(id).innerHTML = "zwiń";
}

function hideList(obj, txt) {
    document.getElementById(obj.id + "_list").className = "hid";
    document.getElementById(obj.id).onclick = function(){showList(this.id)};
    document.getElementById(obj.id).innerHTML = txt;
}

function hideRows(id, fact) {
    var count = document.getElementById(id + "Count").innerHTML;
    for (var i = 0; i < count; i++) {
        if ((i != 0) && (i != 1) && (i != 2) && (i != fact) && (i != (fact + 1))
                && (i != (fact + 2)) && (i != (2 * fact)) && (i != (2 * fact + 1))
                && (i != (2 * fact + 2))) {
            document.getElementById(id + i).className = "hid";
        }
    }
    document.getElementById(id + "Show").className = "";
    document.getElementById(id + "Hide").className = "hid";
}

function showRows(id, fact) {
    var count = document.getElementById(id + "Count").innerHTML;
    for (var i = 0; i < count; i++) {
        if ((i != 0) && (i != 1) && (i != 2) && (i != fact) && (i != (fact + 1))
                && (i != (fact + 2)) && (i != (2 * fact)) && (i != (2 * fact + 1))
                && (i != (2 * fact + 2))) {
            document.getElementById(id + i).className = "";
        }
    }
    document.getElementById(id + "Show").className = "hid";
    document.getElementById(id + "Hide").className = "";
}
