function openwin(url,name) {
  var height = 600;
  var width = 800;
  var str = "height=" + height + ",innerHeight=" + height;
  str += ",width=" + width + ",innerWidth=" + width;
  if (window.screen) {
    var ah = screen.availHeight - 30;
    var aw = screen.availWidth - 10;
    var xc = Math.floor((aw - width) / 2);
    var yc = Math.floor((ah - height) / 2);
    str += ",left=" + xc + ",screenX=" + xc;
    str += ",top=" + yc + ",screenY=" + yc;
  }
  str += ",directories=0,location=0,menubar=1,personalbar=1,scrollbars=1,status=1,toolbar=1";
  return window.open(url,name,str);
}

	function Form_Validatore(theForm)
		{
			
		if (theForm.textfield0.value.length > 0)	{
				if (theForm.textfield0.value.length < 5)
					{
						theForm.textfield0.style.backgroundColor = "#FFD1D1";
						alert("Minimální délka je 5 znaků ...");
						theForm.textfield0.focus();
						return (false);
					}
		
	 }	
			
		if (theForm.textfield.value == "")
			{
				theForm.textfield.style.backgroundColor = "#FFD1D1";
				alert("Jméno a příjmení musí být ...");
				theForm.textfield.focus();
				return (false);
			}
			
		if (theForm.textfield2.value == "")
			{
				theForm.textfield2.style.backgroundColor = "#FFD1D1";
				alert("Telefon musí být ...");
				theForm.textfield2.focus();
				return (false);
			}
			
		if (theForm.textfield4.value == "")
			{
				theForm.textfield4.style.backgroundColor = "#FFD1D1";
				alert("Adresa musí být ...");
				theForm.textfield4.focus();
				return (false);
			}
			
			
		if (theForm.znacka.value == "nic")
			{
				theForm.znacka.style.backgroundColor = "#FFD1D1";
				alert("Značka musí být ...");
				theForm.znacka.focus();
				return (false);
			}	
			
			
		if (theForm.textfield40.value == "")
			{
				theForm.textfield40.style.backgroundColor = "#FFD1D1";
				alert("Typ musí být ...");
				theForm.textfield40.focus();
				return (false);
			}	
			
		
			
		return (true);
		}
