<!--//<![CDATA[
function check()
{var errorstring='';var name=document.forms["email_form"].name.value;var email=document.forms["email_form"].email.value;var body=document.forms["email_form"].body.value;var p_email=document.forms["email_form"].email.value.toString();var strCAPTCHA=document.forms["email_form"].strCAPTCHA.value.toString();if(name=='')
{errorstring=errorstring+"\tВаше имя\n";}
if(email=='')
{errorstring=errorstring+"\tАдрес электронной почты\n";}
if(p_email!='')
{t=p_email.indexOf('@');if((p_email.indexOf('.')==-1)||(t==-1)||(t<1)||(t>p_email.length-5)||(p_email.charAt(t-1)=='.')||(p_email.charAt(t+1)=='.'))
{errorstring=errorstring+"\tНекорректно указан адрес электронной почты\n";}}
if(body=='')
{errorstring=errorstring+"\tТекст сообщения\n";}
if(strCAPTCHA=='')
{errorstring=errorstring+"\tВведите то, что написано на картинке\n";}
if(errorstring.length==0)
{return true;}else{errorstring="Поля, помеченные звездочкой, обязательны к заполнению.\nПожалуйста, введите следующую информацию:\n\n"+errorstring
errorstring=errorstring+"\n"
alert(errorstring);if(name=='')
{window.document.forms["email_form"].name.focus();}
else if(email=='')
{window.document.forms["email_form"].email.focus();}
else if((p_email.indexOf('.')==-1)||(t==-1)||(t<1)||(t>p_email.length-5)||(p_email.charAt(t-1)=='.')||(p_email.charAt(t+1)=='.'))
{window.document.forms["email_form"].email.focus();}
else if(body=='')
{window.document.forms["email_form"].body.focus();}
else if(strCAPTCHA=='')
{window.document.forms["email_form"].strCAPTCHA.focus();}
else
{window.document.forms["email_form"].submit.focus();}
return false;}}
document.forms["email_form"].name.focus();
//]]>-->