function show_block ( block_id ) {
 	document.getElementById ( block_id ).style.display = "block";
 } 
function hide_block ( block_id ) {
	document.getElementById ( block_id ).style.display = "none";
}
function outliner(childID, imgID) {
	var child = hodnota = document.getElementById ( childID );
	if(imgID != "0") {
		var img = hodnota = document.getElementById ( imgID );
		plus = new Image();     plus.src = "./img/cplus.gif";
		minus = new Image();    minus.src = "./img/cminus.gif";
	}
 	if (child.className == "collapsed") {
    	child.className = "expanded";
		if(imgID != "0") {
		   	img.src = minus.src;
  		}
  	}
  	else {
    	child.className = "collapsed";
		if(imgID != "0") {
		   	img.src = plus.src;
		}
  	}
}

function get_img(childID) {
 var child = hodnota = document.getElementById ( childID );
  if (child.className == "collapsed") {
    document.write = "cplus";
  }
  else {
    document.write = "cminus";
  }
}

function calendar(field,formname) {
	url = "./admin/class/calendar.php?pole=" + field + "&formular=" + formname;
	var openWindow = window.open(url, "calendar", "width=220, height=170");
}

//function outliner(childID) {
// var child = document.all[childID];
//  if (child.className == "collapsed") {
//    child.className = "expanded";
//  }
//  else {
//    child.className = "collapsed";
//  }
//}

function delete_confirm(action,id,n_id,promena,volitelne) {
	if (confirm("Opravdu chcete tento záznam smazat?")) {
		location.href="index.php?action=" + action + "&" + n_id + "=" + id + "&" + volitelne + "&" + promena + "=true";
	}
}
