function validateContactForm(confirm) {
  error = false;
  errorMsg = "Uwaga!\n";
  
  if ($F('name') == '') {
    error = true;
    errorMsg += "Nie podano imienia i nazwiska.\n";
  }
  if ($F('phone') == '') {
    error = true;
    errorMsg += "Nie podano numeru telefonu.\n";
  }
  if ($F('email') == '') {
    error = true;
    errorMsg += "Nie podano adresu email.\n";
  }
  if (confirm) {
    if (!$('confirm').checked) {
      error = true;
      errorMsg += "Wyrażenie zgody jest wymagane.\n";
    }
  }
  
  if (error) {
    alert(errorMsg);
  } else {
  	
  contactForm = document.getElementById("contactForm");
  contactForm.submit();
  		/*
  	new Ajax.Request('http://profinans.pl/index/sendcontactform', 
  		{
  			method: 'post',
  			onSuccess: function(transport){
		      el = document.getElementById('contactForm');
		      el.style.visibility = 'hidden';
		      el.style.display = 'none';
		      
		      el = document.getElementById('formInfo');
		      el.style.visibility = 'visible';
		      el.style.display = 'block';
		    }
  		
  		}  	
  	);*/
  	
  
			
   
  }
  
  
  
}
