function Display(obj, mode) {
	document.getElementById(obj).style.display=mode;
	}
	
function BlurInputText(obj, val) {
	if(obj.value=='') obj.value=val;
	}
		
function FocusInputText(obj, val) {
	if(obj.value==val) obj.value='';
	}
	
function HideOnSucces(id) {
	document.getElementById(id).innerHTML='';
	tb_remove();
	}
	
function MaskURL(id, href) {
	document.getElementById(id).setAttribute('href',href);
}
	
function sendFormMeeting(){
	$.get("php/sendFormMeeting.php", { imie_nazwisko: $('#meeting_imie_nazwisko').attr("value"), 
						nr_telefonu: $('#meeting_nr_telefonu').attr("value")
						},
						function(response){
						var txt = '';
							switch(response) {
								case '0': 
								txt='Proszę poprawnie uzupełnić pola!'
								break;
								case '2':
								txt='Twoje dane zostały wysłane!';
								document.getElementById("Form-Meeting").reset();
								setTimeout("HideOnSucces('Form-Meeting-Response');", 2500);
								break;
								default:
								txt='Wystąpił błąd. Proszę spróbować ponownie.';
								break;
							}
							$('#Form-Meeting-Response').text(txt);
						} 
			);
	}	

function sendFormContact(){
	$.get("php/sendFormContact.php", {imie_nazwisko: $('#contact_imie_nazwisko').attr("value"), 
						email: $('#contact_email').attr("value"),
						nr_telefonu: $('#contact_nr_telefonu').attr("value"),
						temat: $('#contact_temat').attr("value"),
						wiadomosc: $('#contact_wiadomosc').attr("value")
						},
						function(response){
						var txt = '';
							switch(response) {
								case '0': 
								txt='Proszę poprawnie uzupełnić pola!'
								break;
								default:
								txt='Twoja wiadomość została wysłana!';
								document.getElementById("Form-Contact").reset();
								setTimeout("HideOnSucces('Form-Contact-Response');", 1500);
								break;
							}
							$('#Form-Contact-Response').text(txt);
						} 
			);
	}
