function limitText(limitField, limitCount, limitNum) {
	if (limitField.value.length > limitNum) {
		limitField.value = limitField.value.substring(0, limitNum);
	} else {
		limitCount.value = limitNum - limitField.value.length;
	}
}

//funkce na potvrzeni akce
function func_confirm(url) {
    if (confirm("Opravdu si přejete smazat záznam?")) location.href = url;
}


//slideshow, viz fce 38
/*var curimg=0
function rotateimages(){
document.getElementById("slideshow").setAttribute("src", "../images/slideshow/"+galleryarray[curimg])
curimg=(curimg<galleryarray.length-1)? curimg+1 : 0
}

window.onload=function(){
setInterval("rotateimages()", 2500)
}*/


function winopen_sekce() {
var url=document.redirect.sekce.value
document.location.href=url
}

function winopen_podsekce() {
var url=document.redirect.podsekce.value
document.location.href=url
}

function winopen_typ_uctu() {
var url=document.redirect.typ_uctu.value
document.location.href=url
}

function winopen_kraj() {
var url=document.redirect.kraj.value
document.location.href=url
}

function winopen_okres() {
var url=document.redirect.okres.value
document.location.href=url
}

function winopen_mesto() {
var url=document.redirect.mesto.value
document.location.href=url
}

function mapa(kolik) {
if(kolik < 8){
document.getElementById('imgmapka').style.backgroundPosition = "0px -"+(kolik*218)+"px";
}
else{
document.getElementById('imgmapka').style.backgroundPosition = "-401px -"+((kolik-7)*218)+"px";
}}

function toggleset(rad){ 
var type = rad.value; 
for(var k=0,elm;elm=rad.form.elements[k];k++){ 
if(elm.className=='item') elm.style.display = elm.id==type ? 'block':''; 
}} 