var obraz=null;
function zvetsi(base,cesta,titul,alt,x,y,jazyk) {
	var sb="no";
	if (x>(screen.width-50)) {
		x=(screen.width-50);
		sb="yes";
	}
	if (y>(screen.height-50)) {
		y=(screen.height-50);
		sb="yes";
	}
	var winl = (screen.width-x)/2;
	var wint = (screen.height-y)/2;
	obraz=window.open("/zvetsi_nav.php?nazev="+titul+"&cesta="+cesta+"&alt="+alt+"&jazyk="+jazyk, "obraz", "width="+(x)+", height="+(y)+", top="+wint+", left="+winl+", menubar=no, directories=no, toolbar=no, location=no, status=no, scrollbars="+sb+", resizable=yes");
	obraz.window.focus();
}
var vokno=null;
function okno(prm, x, y) {
	var sb="yes";
	if (!x) var x=500;
	if (!y) var y=600;
	if (x>(screen.width-100)) {
		x=(screen.width-100);
		sb="yes";
	}
	if (y>(screen.height-100)) {
		y=(screen.height-100);
		sb="yes";
	}
	var winl = (screen.width-x)/2;
	var wint = (screen.height-y)/2;
	vokno=window.open("/okno.php"+prm, "vokno", "width="+(x)+", height="+(y)+", top="+wint+", left="+winl+", menubar=no, directories=no, toolbar=no, location=no, status=no, scrollbars="+sb+", resizable=yes");
	vokno.window.focus();
}

function chtext(prm) {
	var ch = document.getElementById(prm);
	ch.innerHTML="Data budou aktualizována po znovu načtení stránky.";
}

function chboxtd(prm) {
	var ch = document.getElementById(prm);
	if (ch.checked) ch.checked=false;
	else ch.checked=true;
}

function showH(id, mapY) {
	var ar = document.getElementById("map");
	var arimg = document.getElementById("mapimg");
	//var arimg.src="prostoryfiles/mapa/"+id+".gif";
	//var img="<img src='prostoryfiles/mapa/"+id+".gif' border='0' />";

	var osrc=arimg.src;
	var nsrc="prostoryfiles/mapa/"+id+".gif";
	if (osrc!==nsrc) arimg.src=nsrc;

	//ar.innerHTML=nsrc;
	var omapY=ar.style.marginTop;
	var nmapY=mapY+'px';
	if (omapY!==nmapY) ar.style.marginTop=nmapY;
}

function findPosY(obj)
{
var curtop = 0;
if(obj.offsetParent)
    while(1)
    {
      curtop += obj.offsetTop;
      if(!obj.offsetParent)
        break;
      obj = obj.offsetParent;
    }
else if(obj.y)
    curtop += obj.y;
return curtop;
}
