


function start()
{
	animaceStart();
	setTimeout("formStart();", 1500);
}



/* formStart */



function formStart()
{
	if(document.getElementsByTagName)
	{
		var input = document.getElementsByTagName('input');
		if(input[0] && input[0].focus)
		{
			input[0].focus();
		}
	}
}



/* animace */



var animaceFaze = Array();

function animaceStart()
{
	var e;
	e = document.getElementById("stranka");
	if(e) setTimeout("animace('stranka', 50, 20, 20, 100)", 1);
	e = document.getElementById("logo");
	if(e) setTimeout("animace('logo', 50, 20, 20, 100)", 500);
	e = document.getElementById("uvodVyroba");
	if(e) setTimeout("animace('uvodVyroba', 50, 20, 20, 100)", 500);
	e = document.getElementById("menuAplikace");
	if(e) setTimeout("animace('menuAplikace', 50, 20, 20, 100)", 1300);
	e = document.getElementById("vyberJazyk");
	if(e) setTimeout("animace('vyberJazyk', 50, 20, 20, 100)", 900);
}

function animace(id, prodleva, krok, hStart, hStop)
{
	if(hStop == 0)
		hStop = 1;
	if(!animaceFaze[id])
		animaceFaze[id] = hStart;
	animaceNastavPruhlednost(id, animaceFaze[id]);
	if(animaceFaze[id] == hStop)
		return;
	if(Math.abs(animaceFaze[id] - hStop) >= Math.abs(krok))
		animaceFaze[id] += krok;
	else
		animaceFaze[id] = hStop;
	setTimeout("animace('" + id + "', " + prodleva + ", " + krok + ", " + hStart + ", " + hStop + ")", prodleva);
}

function animaceNastavPruhlednost(id, pruhlednost)
{
	if(pruhlednost > 99) pruhlednost = 99;
	var e = document.getElementById(id);
	if(e)
	{
		e.style.filter = "Alpha(Opacity="+pruhlednost+")";
		e.style.opacity = ""+(pruhlednost/100);
	}
}

function menuClick(odkaz)
{
	e = document.getElementById("menuAplikace");
	setTimeout("animace('menuAplikace', 50, -20, 100, 0);", 1);
	setTimeout("window.location='" + odkaz.href + "';", 300);	
	return false;
}



/* ukaz obrazek */



function ukazObrazek(src, width, height)
{
	width += 25; height += 25;
  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;
}
