<!--

function submitForm()
{
	// validate form
	if( $F("f_adres_strony")!="" && $F("f_adres_email")!="" && $F("f_imie_nazwisko")!="" )
	{
		// disable submit button
		$('submitbtn').hide();
	
		// insert animation
		displayLoadingInfo();
		
		// build url string for form content
		var formcontent = 'send_mail=1&f_adres_strony='+encodeURIComponent($('f_adres_strony').getValue())+
							'&f_adres_email='+encodeURIComponent($('f_adres_email').getValue())+
							'&f_imie_nazwisko='+encodeURIComponent($('f_imie_nazwisko').getValue());
							//'&f_uwagi='+encodeURIComponent($('f_uwagi').getValue());
		for(i=1; i<=4; i++)
			formcontent = formcontent+'&f_keyword'+i+'='+encodeURIComponent($('f_keyword'+i).getValue());

		// send request
		var au = new Ajax.Updater(
							'rcontent',
							'response.php',
							{
								asynchronous: true,
								    postBody: formcontent,
								
								onFailure: function(){
												alert("Błąd podczas przetważania zapytania, przepraszmy za utrudnienia.");
												$('submitbtn').show();
											},
								onSuccess: function(){
												$('f_adres_strony').clear();
												$('f_adres_email').clear();
												$('f_imie_nazwisko').clear();
												//$('f_uwagi').clear();
												for(i=1; i<=4; i++)
													$('f_keyword'+i).clear();
											}
							}
						);
	}
	else
		alert("Proszę wypełnić pola: adres strony, adres email oraz podać imię i nazwisko.");
}



// -->

