function confirmLink(theLink,theSqlQuery) // oba dulezity
{
    if (oknohlaseni == '') {return true;}

    var is_confirmed = confirm(oknohlaseni + ' :\n'+ theSqlQuery);
    if (is_confirmed) {theLink.href += '';}// prida este dalsi promenou

    return is_confirmed;
} // end of the 'confirmLink()' function

function setPointer(theRow, thePointerColor)
{
    if (thePointerColor == '' || typeof(theRow.style) == 'undefined') {
        return false;
    }
    if (typeof(document.getElementsByTagName) != 'undefined') {
        var theCells = theRow.getElementsByTagName('td');
    }
    else if (typeof(theRow.cells) != 'undefined') {
        var theCells = theRow.cells;
    }
    else {
        return false;
    }

    var rowCellsCnt  = theCells.length;
    for (var c = 0; c < rowCellsCnt; c++) {
        theCells[c].style.backgroundColor = thePointerColor;
    }

    return true;
}


var dom = document.getElementById ? true : false;
var ie4 = ((document.all) && (!dom)) ? true : false;


function show_buble(cis) {
    var element = 'plovouci'+cis;
    if (dom) document.getElementById(element).style.display = 'block';
    else if (ie4) document.all[element].style.display = 'block';
    }

function hidden_bubble(cis) {
    var element = 'plovouci'+cis;
    if (dom) document.getElementById(element).style.display = 'none';
    else if (ie4) document.all[element].style.display = 'none';  
    }


function addLoadEvent(func) {
	var oldonload = window.onload;
	if (typeof window.onload != 'function'){
		window.onload = func;
	} else {
		window.onload = function() {
			oldonload();
			func();
		}
	}
}

function showElement(value) {
	value = (value == '1');
	document.getElementById('form_firma').style.display = value? "none" : "";
	document.getElementById('form_firma_ic').style.display = value? "none" : "";
	document.getElementById('form_firma_di').style.display = value? "none" : "";
	document.getElementById('form_firma_me').style.display = value? "none" : "";
	document.getElementById('form_firma_ps').style.display = value? "none" : "";
	document.getElementById('form_firma_jm').style.display = value? "none" : "";
	document.getElementById('form_firma_pr').style.display = value? "none" : "";
	document.getElementById('form_firma_ul').style.display = value? "none" : "";
}

