function sz(t) {
    a = t.value.split('\n');
    b = 1;

    b += a.length;
    if (b > 40) b = 40;
    if (b < 3) b = 3;
    
    t.rows = b;

    
}


function technickapodpora() {
    window.open("/technicka-podpora.php ", "szs_technicka_podpora", "width=535,height=420,menubar=no,resizable=no,scrollbars=no,left=200,top=100")
}


// oznacovani checkboxu tahem
if (document.addEventListener) {
    document.addEventListener("DOMContentLoaded", init2, false);
} else window.onload = init2;

var chb_mdown = false;
var chb_check = true;

function init2() {
    document.onmouseup = doc_mouseup;     
    var arr = document.getElementsByTagName("input");

    for(var i=0; i<arr.length; i++) {
        if(arr[i].name != "to_del[]") continue;  
        
        arr[i].onmousedown = chb_mousedown;
        arr[i].onmouseover = chb_mouseover; 
    }     
}  

function chb_mousedown() {
    chb_mdown = true; 
    chb_check = !this.checked; 
    this.onmouseout = function() { this.checked = chb_check; }
}            
function chb_mouseover() {
    if(chb_mdown == false) return;
    this.checked = chb_check;
}    

function doc_mouseup() {
    chb_mdown=false;
}   
