function wysokoscRealizacje() {
    var maxHeightRealizacje = 0;
        $(".realizacje").each(function() {  
            if($(this).height() > maxHeightRealizacje) {
                maxHeightRealizacje = $(this).height();                
            }
        }); 
	
    var maxHeightRealizacjeS = 0;
        $(".realizacje_selected").each(function() {  
            if($(this).height() > maxHeightRealizacjeS) {
                maxHeightRealizacjeS = $(this).height();    	
            }
        });
	
    var realizacjeHeight = 0;
    if(maxHeightRealizacje>=maxHeightRealizacjeS) realizacjeHeight = maxHeightRealizacje;
    else realizacjeHeight = maxHeightRealizacjeS;    
    
        $(".realizacje").each(function() {
            //$(".realizacje").height(realizacjeHeight-10);
	});
	
	$(".realizacje_selected").each(function() {
            //$(".realizacje_selected").height(realizacjeHeight);
	});
	
}

function walidacja_mail(form)
{
    if(form.email.value==""||!(/^[0-9a-zA-Z._]+\@[0-9a-zA-Z-]+\.[0-9a-zA-Z.]+$/.test(form.email.value))){ 
	alert("Podaj poprawny mail (np: xx@xx.com)!");
    form.email.focus();
	return (false);
  }
	
	if (form.temat.value == "")
  {
    alert("Podaj temat!");
    form.temat.focus();
	return (false);
     }	
  
  return (true);
}

function walidacja_klient(form)
{	 
	
  if (form.nazwisko.value == "")
  {
    alert("Podaj imię i nazwisko!");
    form.nazwisko.focus();
	return (false);
     }
  
  if (form.ulica.value == "")
  {
    alert("Podaj ulicę!");
    form.ulica.focus();
	return (false);
     }	
	  
  if (form.kod.value == ""||!(/^[0-9]{2}-[0-9]{3}$/.test(form.kod.value)))
  {
    alert("Podaj kod pocztowy (np: 66-400)!");
    form.kod.focus();
	return (false);
     }	

 if (form.miasto.value == "")
  {
    alert("Podaj miasto!");
    form.miasto.focus();
	return (false);
     }	

  if(form.email.value==""||!(/^[0-9a-zA-Z._]+\@[0-9a-zA-Z-]+\.[0-9a-zA-Z.]+$/.test(form.email.value))){ 
	alert("Podaj poprawny mail (np: xx@xx.com)!");
    form.email.focus();
	return (false);
  }
  
  return (true);
  }
  
function walidacja_firma(form)
{	 
	
  if (form.nazwa_firmy.value == "")
  {
    alert("Podaj nazwę firmy!");
    form.nazwa_firmy.focus();
	return (false);
     }
	 
  if (form.nip.value == ""||!(/^[0-9]{3}-[0-9]{3}-[0-9]{2}-[0-9]{2}$/.test(form.nip.value)))
  {
    alert("Podaj poprawny NIP!");
    form.nip.focus();
	return (false);
     }	
  
  if (form.ulica.value == "")
  {
    alert("Podaj ulicę!");
    form.ulica.focus();
	return (false);
     }	
	  
  if (form.kod.value == ""||!(/^[0-9]{2}-[0-9]{3}$/.test(form.kod.value)))
  {
    alert("Podaj kod pocztowy (np: 66-400)!");
    form.kod.focus();
	return (false);
     }	

 if (form.miasto.value == "")
  {
    alert("Podaj miasto!");
    form.miasto.focus();
	return (false);
     }	

  if(form.email.value==""||!(/^[0-9a-zA-Z._]+\@[0-9a-zA-Z-]+\.[0-9a-zA-Z.]+$/.test(form.email.value))){ 
	alert("Podaj poprawny mail (np: xx@xx.com)!");
    form.email.focus();
	return (false);
  }
  
  return (true);
  }
