function confirmLink(theLink, theSqlQuery)
{
	if (typeof(window.opera) != 'undefined') {
		return true;
	}
	var is_confirmed = confirm(theSqlQuery);

	if (is_confirmed) {
		theLink.href += '&is_js_confirmed=1';
	}
	return is_confirmed;
}
function validate(form)
{
	reg = /^[a-zA-ZąćęłńóśżźĄĆĘŁŃÓŚŻŹ \.\-\_]{3,30}$/;
	wyn = form.imie.value.match(reg);
    if (wyn == null) {
        alert("Proszę podać poprawne imię i nazwisko. " +
              "Pole to musi zawierać od 3 do 30 liter. " +
              "Żadne znaki poza literami nie są dozwolone.");
        return false;
    }

	wyn = form.temat.value.match(reg);
    if (wyn == null) {
        alert("Proszę podać poprawny temat. " +
              "Pole to musi zawierać od 3 do 30 liter. " +
              "Żadne znaki poza literami nie są dozwolone.");
        return false;
    }

	if (!form.tresc.value) {
        alert("Proszę podać treść wiadomości.");
        return false;
    }

	reg = /^[a-zA-Z0-9ąćęłńóśżźĄĆĘŁŃÓŚŻŹ\.\-\_]+\@[a-zA-Z0-99ąćęłńóśżźĄĆĘŁŃÓŚŻŹ\.\-\_]+\.[a-z]{2,4}$/;
    wyn = form.mail.value.match(reg);
    if (wyn == null) {
        alert("Proszę podać poprawny adres email. " +
              "Poprawny adres musi zawierać małpę " +
              "oraz co najmniej dwa człony nazwy serwera, " +
              "np. a@b.c lub ala@ma.kota.czarnego.com.");
        return false;
    }

	return true;
}
