// popup pics

function obrazek(imgsrc,xx,yy)
{
  xxw=xx+40; yyh=yy+40;
  wx=",width="+xxw+",height="+yyh;


  nove_okno=window.open("","okno","left=50,top=20,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes"+wx)
  
  with (nove_okno)
   {
    
    document.writeln("<html><title>[ WIGOPROFIL s.r.o.] - " +imgsrc+ " </title><body bgcolor=#EEEEEE leftmargin=0>");
    document.writeln("<center><a href='javascript: self.close(); '><img src=\""+imgsrc+"\" width="+xx+" height="+yy+" border=0 align=center></a></center>");
	document.writeln("</html>");
	resizeTo(xxw+15,yyh+15);
    location.reload();
	focus();
   }

}

function velky_obrazek(imgsrc,xx,yy)
{
  xxw=xx+50; yyh=yy+50;
  wx=",width="+xxw+",height="+yyh;
  
  if (yyh > 700)
  {
    yyh = 700;
  }

  nove_okno=window.open("","okno","left=50,top=20,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes,scrollbars=yes"+wx)
  
  with (nove_okno)
   {
    
    document.writeln("<html><title>[ WIGOPROFIL s.r.o.] - " +imgsrc+ " </title><body bgcolor=#EEEEEE leftmargin=0>");
    document.writeln("<center><a href='javascript: self.close(); '><img src=\""+imgsrc+"\" width="+xx+" height="+yy+" border=0 align=center></a></center>");
	document.writeln("</html>");
	resizeTo(xxw+15,yyh+15);
    location.reload();
	focus();
   }

}

// overeni formulare HRANY
function ValidatorHrany(theForm)
{
  odeslat = 1; 
	  if (theForm.hrana.value == "")
	  {
		alert("Zadejte prosím požadovaný typ hrany.");
		theForm.hrana.focus();
		return (false);
		odeslat = 0;
	  }

	  if (theForm.firma.value == "")
	  {
		alert("Zadejte prosím jméno Vaší firmy.");
		theForm.firma.focus();
		return (false);
		odeslat = 0;
	  }
	  
	  if (theForm.osoba.value == "")
	  {
		alert("Zadejte prosím kontaktní osobu.");
		theForm.osoba.focus();
		return (false);
		odeslat = 0;
	  }

	  
     if ((theForm.email.value.indexOf("@")<1) || (theForm.email.value.indexOf(".")<1))
	  {
		alert("Zadejte prosím Vaši e-mailovou adresu.");
		theForm.email.focus();
		return (false);
		odeslat = 0;
	  }

	  if (theForm.telefon.value == "")
	  {
		alert("Zadejte prosím Váš telefon.");
		theForm.telefon.focus();
		return (false);
		odeslat = 0;
	  }

}

// overeni formulare v REHAU
function ValidatorRehau(theForm)
{

odeslat = 1; 
	
	  if (theForm.Jmeno.value == "")
	  {
		alert("Zadejte prosím Vaše jméno");
		theForm.Jmeno.focus();
		return (false);
		odeslat = 0;
	  }

	  if (theForm.Kontakt.value == "")
	  {
		alert("Zadejte prosím kontakt na Vaši osobu");
		theForm.Kontakt.focus();
		return (false);
		odeslat = 0;
	  }

    if (odeslat == 1)
	  {
	    window.setTimeout("window.location='index.php?cat=2&name=dotaznik_odeslan'", 1);
	  }
      
}

// overeni pri smazani zaznamu
function CheckDelMsg()
   { 
     if(!confirm("Opravdu úplně smazat?")) return false;
     return true; 
   }

 // overeni pred vykonanim nejake akce
function CheckAction(msg)
{ 
  if(!confirm(msg)) return false;
  else return true;  
}   