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.phone.value == null) || (document.forms.oform.phone.value.length<5))
{alert("Заполните, пожалуйста, поле: Телефон"); document.forms.oform.phone.focus(); return false;}

if ((document.forms.oform.fromemail.value == null) || (document.forms.oform.fromemail.value.length<7))
{alert("Заполните поле: e-mail отправителя"); 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;}
