  function validate(mailform)
{
    if (document.getElementById('name').value=="")
    {
        alert("Prosím zadejte Vaše jméno!");
        mailform.name.focus();
        return false;
	}
    else if (document.getElementById('message').value=="")
    {
        alert("Je nutné napsat text zprávy!");
        mailform.message.focus();
        return false;
	}
    else if (document.getElementById('from').value=="")
    {
        alert("Prosím zadejte Váši emailovou adresu!");
        mailform.from.focus();
        return false;
	}

	else if (window.RegExp)
	{
		re = RegExp("^[^@]+@[^.]+\..+$");
		if (!re.test(document.getElementById('from').value))
		{
			alert("Zadali jste nesprávný formát emailové adresy!");
			mailform.from.focus();
			return false;
		}
	}

	else
        return true;
}
