			// wait for the DOM to be loaded 
			$(document).ready(function() { 
					// bind 'myForm' and provide a simple callback function 
					$('#myForm').ajaxForm( { 
					target: '#success',
					beforeSubmit: validate,
					success: show
					}); 
			}); 
			
			function validate (formData, jqForm, options) {
				
				var snameValue = $('input[@name=sname]').fieldValue(); 
				var emailValue = $('input[@name=adrespoczty]').fieldValue(); 
				var contentValue = $('textarea[@name=content]').fieldValue(); 
				
				
				if(!snameValue[0])
				{
					$('#snameError').html("Pole 'Imię i nazwisko' musi być uzupełnione.");
					return false; 
				}
				else
				{
					$('#snameError').html("");
				}
				
				if(!emailValue[0])
				{
					$('#emailError').html("Pole 'Email' musi być uzupełnione.");
					return false; 
				}
				else
				{
					$('#emailError').html("");
				}
				
				if(!contentValue[0])
				{
					$('#contentError').html("Pole 'Treść' musi być uzupełnione.");
					return false; 
				}
				else
				{
					$('#contentError').html("");
				}
			}
			
			function show (responseText, statusText)
			{
				$('#myForm').fadeOut();
			}

			function odszyfruj(co) {
		var n=0;
		var wynik="";
		for(var i=0;i<co.length;i++){
		  n=co.charCodeAt(i);
		  wynik += String.fromCharCode(n-(1));
		}
		return wynik;
	}
	
	function adres(co){
		location.href=odszyfruj(co);
	}