function printFooterText() {
	document.write("Tyto stránky byly vygenerovány free programem <a href='http://sirsi.wz.cz/ancestry2html.php' target='_blank'>Ancestry2html 1.4.2.5</a> dne 4.12.2010 za použití dat zpracovaných free genealogickým programem <a href='http://ancestry.nethar.com' target='_blank'>Ancestry 1.0.21.60</a>.");	
}

function show(idecko)
{
	$('#'+idecko).show();
}

function hide(idecko)
{
	$('#'+idecko).hide();
}

function filterPeople(array,count) {
	text=$("#namesFilter").val().toLowerCase();
	if (text.length==0) {
		showAllPeople();
		return;
	}
	window.document.styleSheets[2].disabled=false;
	j=0;

	for (i=0;i<count;i++) {
		if (array[i*2+1].toLowerCase().indexOf(text)==-1) {
			$("#"+array[i*2]).hide();
		} else {
			j++;
			$("#"+array[i*2]).show();
		}
		}
	$("#resultCount").html("("+j+" záznamů z "+i+" osob)");
	$("h2.firstLetter").each(function() {
		/*var a = $(this).find("a").get(0);
		var aName = $(a).attr("name");*/
		if ($(this).next().find("li").filter(":visible").length==0) {
			$(this).hide();
			/*$("."+aName).hide();
			$(this).prev().hide();*/
		} else {
			$(this).show();
			/*$("."+aName).show();
			$(this).prev().show();*/
	}
	})
}

function showAllPeople(array,count) {
	$("h2.firstLetter").show();
	window.document.styleSheets[2].disabled=true;
	
	for (i=0;i<count;i++) {
		document.getElementById(array[i*2]).style.display="list-item";
	}
}

