function sendDemoForm()
{
	var ok = true;
	with (document.demoform) {
		if (uxName.value.length == 0) {
			alert('Nie podano imienia i nazwiska');
			uxName.focus();
			ok = false;
		}
		else if (uxFirm.value.length == 0) {
			alert('Nie podano nazwy firmy.');
			uxFirm.focus();
			ok = false;
		}
		else if (uxTel.value.length == 0) {
			alert('Nie podano telefonu.');
			uxTel.focus();
			ok = false;
		}
		else if (uxCity.value.length == 0) {
			alert('Nie podano nazwy miasta.');
			uxCity.focus();
			ok = false;
		}
		else if (uxTel.value.length == 0) {
			alert('Nie podano numeru telefonu.');
			uxTel.focus();
			ok = false;
		}
		else if (uxEmail.value.length == 0) {
			alert('Nie podano adresu email.');
			uxEmail.focus();
			ok = false;
		}		
		else if (ValidateEmail(uxEmail.value) == false) {
			alert('Wpisany adres e-mail jest niepoprawny.');
			uxEmail.focus();
			ok = false;
		}
		return ok;
	}
}

function sendAskForm()
{
	var ok = true;
	with (document.askform) {
		if (uxQuestion.value.length == 0) {
			alert('Nie podano treści pytania');
			uxQuestion.focus();
			ok = false;
		}
		else if (uxName.value.length == 0) {
			alert('Nie podano imienia i nazwiska.');
			uxName.focus();
			ok = false;
		}
		else if (uxEmail.value.length == 0) {
			alert('Nie podano adresu email.');
			uxEmail.focus();
			ok = false;
		}		
		else if (ValidateEmail(uxEmail.value) == false) {
			alert('Wpisany adres e-mail jest niepoprawny.');
			uxEmail.focus();
			ok = false;
		}
		return ok;
	}
}

function ValidateEmail(m_email)
{
	validRegExp = /^[^@]+@[^@]+.[a-z]{2,}$/i;
	if (m_email.search(validRegExp) == -1)
		return false;
	else return true;
}