function checkmailform() { 
if  ((document.forms.oform.fromname.value == null) || (document.forms.oform.fromname.value.length<2))
{alert("Заполните, пожалуйста, поле: Имя"); document.forms.oform.fromname.focus(); return false;}

if ((document.forms.oform.fromemail.value == null) || (document.forms.oform.fromemail.value.length<7))
{alert("Заполните поле: Почта"); document.forms.oform.fromemail.focus(); return false;}

if (!(/\w+@\w+\.[a-z]{2,4}/.test(document.forms.oform.fromemail.value)))
{alert("Введите, пожалуйста, правильный e-mail адрес"); document.forms.oform.fromemail.focus(); return false;}

if  ((document.forms.oform.comments.value == null) || (document.forms.oform.comments.value.length<10))
{alert("Заполните, пожалуйста, поле: Сообщение"); document.forms.oform.comments.focus(); return false;}

return true;}
