
function ukazObrazek(src, width, height)
{
  var okno = open("", "_blank", "width="+width+",height="+height+",scrollbars");
  okno.document.open();
  okno.document.writeln('<html>');
  okno.document.writeln('<head>');
  okno.document.writeln('<title>Foto</title>');
  okno.document.writeln('<meta http-equiv="imagetoolbar" content="no" />');
  okno.document.writeln('</head>');
  okno.document.writeln('<body style="margin: 0px; padding: 0px;">');
  okno.document.writeln('<img alt="" src="'+src+'" />');
  okno.document.writeln('</body>');
  okno.document.writeln('</html>');
  okno.document.close();
  return false;
}

function otevriOkno(uri, width, height)
{
	if(obrazky)
	{
		uri += '&amp;g=' + obrazky;
	}
	wMax = 750;
	hMax = 550;
	if(screen.height) hMax = screen.availHeight;
	if(screen.width) wMax = screen.availWidth;
	width += 25;
	height += 25;
	if(width > wMax) width = wMax;
	if(height > hMax) height = hMax;
  open(uri, "_blank", "width="+width+",height="+height+",scrollbars");
  return false;
}

function start()
{
	if(document.getElementById)
	{
		var logo = document.getElementById("logo");
		if(logo) {animaceLoga(20);}
		var hledat = document.getElementById("fotoHledat");
		if(hledat) {hledat.focus();}
	}
}

function animaceLoga(faze)
{
	var logo = document.getElementById("logo");
	logo.style.filter = "Alpha(Opacity="+faze+")";
	logo.style.opacity = ""+(faze/100);
	if(faze < 100)
	{
		faze = faze+8;
		if(faze>100) faze = 100;
		setTimeout("animaceLoga("+(faze)+")", 50);
	}
}

function fotoHledatSubmit()
{
	if(document.getElementById)
	{
    var obj = document.getElementById("fotoHledat");
    obj.focus();
    if(obj.value.length == 0)
    {
      return false;
    }
    if(obj.value.length < 3)
    {
      alert("Hledané slovo je moc krátké.");
      return false;
    }
    if(obj.value.length > 32)
    {
      alert("Hledané slovo je moc dlouhé.");
      return false;
    }
  }
  return true;
}
