function validate(form)
{
if (isEmpty(form.elements["email"].value)&&isEmpty(form.elements["title"].value)&&isEmpty(form.elements["text"].value))
{
return true
}
else
{
alert("Wypełnij wszystkie pola!")
return false
}
}

function isEmpty(str)
{
if (str.length > 0)
{
return true
}
else
{
return false
}
}
function email2(str)
{
var email = /^[a-zA-Z_0-9\.\-]+@[a-zA-Z_0-9\.\-]+\.[a-zA-Z]{2,4}$/
if (email.test(str)){
document.getElementById("Bemail").innerHTML = "e-mail poprawny";
document.getElementById("mail").className = "formularz";
}
}
function email(str)
{
	var email = /^[a-zA-Z_0-9\.\-]+@[a-zA-Z_0-9\.\-]+\.[a-zA-Z]{2,4}$/

if (email.test(str)){
document.getElementById("Bemail").innerHTML = "";
document.getElementById("mail").className = "formularz";
return true;
}
else
{
document.getElementById("Bemail").innerHTML = "Niepoprawny adres!";
document.getElementById("Bemail").className = "dlaGoopkow";
document.getElementById("mail").className = "czerwonyFormularz";
}
}
