function kontrola(form) {
	var data = document.myform
	if (data.JMENO.value =="") {
		alert("Není vyplneno jméno")
		data.JMENO.focus()
		return(false)
	}
	if (data.EMAIL.value =="") {
		alert("Zadejte prosím e-mail kam Vám mohu odpovedet")
		data.EMAIL.focus()
		return(false)
	}
	if (data.DOTAZ.value =="") {
		alert("Zrejme jste zapomeli neco napsat")
		data.ADRESA.focus()
		return(false)
	}
}

var myImage = window.myImage;
function OpenMyImage(link, useHeight) {
	var retValue=true;
	var maxHeight = screen.availHeight - 180;
	var sourc = '<img id=FORMIMG style="border: 0" src='+link+' height='+maxHeight+' alt="kliknutím na obrázek se vrátíte zpet"></a>';
	if (useHeight==null || useHeight=="undefined") useHeight=600;
	myImage=window.open('','_self');
	if (myImage==null || typeof(myImage)=="undefined") {
		retValue=false;
	} else {
		myImage.document.writeln('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">');
		myImage.document.writeln('<html>');
		myImage.document.writeln('<head>');
		myImage.document.writeln('<meta http-equiv="Content-Type" content="text/html; charset=windows-1250">');
		myImage.document.writeln('<meta http-equiv="Content-Language" content="cs">');
		myImage.document.writeln('<title>Náhled</title>');
		myImage.document.writeln('<link rel="stylesheet" type="text/css" href="galerie.css">');
		myImage.document.writeln('</head>');
		myImage.document.writeln('<body>');
		myImage.document.writeln('<div align="center">');
		myImage.document.writeln('<a href="#" onclick="history.back()">');
		myImage.document.writeln(sourc);
		myImage.document.writeln('</div>');
		myImage.document.writeln('<SCRIPT TYPE="text/javascript">');
		myImage.document.writeln('<!--');
		myImage.document.writeln('nHeight = document.body.clientHeight - 40');
		myImage.document.writeln('if (nHeight>'+useHeight+') nHeight='+useHeight);
		myImage.document.writeln('document.getElementById("FORMIMG").style.height = nHeight');
		myImage.document.writeln('//-->');
		myImage.document.writeln('</SCRIPT>');
		myImage.document.writeln('</body>');
		myImage.document.writeln('</html>');
	}
	return retValue;
}

var timer, i, menuId;
var dom = document.getElementById ? true : false;
var ie4 = ((document.all) && (!dom)) ? true : false;
var ns4 = document.layers ? true : false;
var opera = navigator.userAgent.indexOf('Opera') != -1 ? true : false;
var dhtml = dom ? true : ie4 ? true : ns4 ? true : false;

if (dhtml) document.write ('<style type="text/css">'+
	'#scriptSupport {display: none;}'+
	'#menuHolder {position: relative; visibility: hidden; z-index: 1;}'+
	'#hiddenMenu1,'+
	'#hiddenMenu2,'+
	'#hiddenMenu3 {position: absolute; visibility: hidden;}'+
	'#visibleMenu1 {position: absolute; left: 180px; top: 0px;}'+
	'#visibleMenu2 {position: absolute; left: 260px; top: 0px;}'+
	'#visibleMenu3 {position: absolute; left: 340px; top: 0px;}'+
	'#visibleMenu4 {position: absolute; left: 420px; top: 0px;}'+
	'#visibleMenu5 {position: absolute; left: 500px; top: 0px;}'+
	'#hiddenMenu1 {left: 180px; top: 21px;}'+
	'#hiddenMenu2 {left: 260px; top: 21px;}'+
	'</style>');

function setVisibility(element,newVisibility)
{ 
  if (dhtml)
  {
    if (dom) document.getElementById(element).style.visibility = newVisibility;
    else if (ie4) document.all[element].style.visibility = newVisibility;
    else if (ns4) eval('document.' + element + '.visibility = newVisibility');
  }
}

function menu()
{
  if (dhtml)
  {
    if (opera) for (i = 1; i <= 2; i++) document.getElementById('hiddenMenu' + i).style.top = 20;
    if (ie4) for (i = 1; i <= 2; i++) document.all['hiddenMenu' + i].style.top = 18;
    setVisibility('menuHolder','visible');
  }
}

function showMenu(id)
{
  if (dhtml)
  {
    clearTimeout(timer);
    for (i = 1; i <= 2; i++) if (i != id) setVisibility((ns4 ? 'menuHolder.document.' : '') + 'hiddenMenu' + i,'hidden');
    setVisibility((ns4 ? 'menuHolder.document.' : '') + 'hiddenMenu' + id,'visible');
  }
}

function hideMenu(id)
{
  if (dhtml)
  {
    menuId = (ns4 ? 'menuHolder.document.' : '') + 'hiddenMenu' + id;
    timer = setTimeout("setVisibility(menuId,'hidden')",50);
  }
}

function dontHideMenu()
{
  if (dhtml) clearTimeout(timer);
}