function TestVer(oForm) 
{
var alert_text="", lang="RU", txtEmpty=": Необходимо заполнить!";
var i=0,qty_field=0;
var type;
var c, Notempty,tmp_name;
lang=oForm.lang.value;
switch (lang)
{
	case "RU":
		txtEmpty=": Необходимо заполнить!";
		txtInt=": Ожидается число!";
		txtMail=": Ошибка в е-mail!"
		txtDate=": Некорректная дата (ожидается дд.мм.гггг)!"
		captchaError="Контрольные символы, изображенные на картинке";
		break;
	case "UA":
		txtEmpty=": Необхідно ввести!";
		txtInt=": Очікується число!";
		txtMail=": Помилка в е-mail!"
		txtDate=": Помилкова дата (очікується дд.мм.рррр)!"
		captchaError="Control symbols, shown on the picture";
		break;
	case "EN":
		txtEmpty=": Must be fill out!";
		txtInt=": Must be number!";
		txtMail=": invalid e-mail value!"
		txtDate=": Inalide date (needed dd.mm.yyyy)!"
		captchaError="Control symbols, shown on the picture";
		break;
}

qty_field=oForm.elements.length;

while (i<qty_field-2)
{
	if (oForm.elements[i].value=='mandatoryfield')
	{
		i++;
		type=oForm.elements[i+1].type;

switch (type)
{
	case "text":
		if (oForm.elements[i+1].value.length==0)
		{
			if (alert_text != "") 
			{	alert_text = alert_text + "\n"; }
			alert_text=alert_text+oForm.elements[i].value+txtEmpty;
		}
		break;
	case "textarea":
		if (oForm.elements[i+1].value.length==0)
		{
			if (alert_text != "") 
			{	alert_text = alert_text + "\n"; }
			alert_text=alert_text+oForm.elements[i].value+txtEmpty;
		}
		break;
	case "checkbox":
		c=i+1;
		Notempty=false;
		tmp_name=oForm.elements[i].value;
		while (oForm.elements[c].type=="checkbox")
		{
		Notempty=(Notempty || oForm.elements[c].checked);
		c++;
		}

		if (!Notempty)
		{
			if (alert_text != "") 
			{	alert_text = alert_text + "\n"; }
			alert_text=alert_text+tmp_name+txtEmpty;
		}

		break;

	case "select-one":
		if (oForm.elements[i+1].value==0)
		{
			if (alert_text != "") 
			{	alert_text = alert_text + "\n"; }
			alert_text=alert_text+oForm.elements[i].value+txtEmpty;
		}

		break;
}

//		i++;		
	}
	
// verify type
	if (oForm.elements[i].value=='verify')
	{
		ver_type=oForm.elements[i+1].value;
		switch (ver_type)
		{
			case "int":
				if (isNaN(oForm.elements[i-1].value))
				{
					if (alert_text != "") {alert_text = alert_text + "\n"}
					alert_text= alert_text + oForm.elements[i-2].value + txtInt + "\n";
        		}
			break;
			case "mail":
				strTemp=oForm.elements[i-1].value;
				if (strTemp.length> 0) 
				{   
					if (!CheckEmail(oForm.elements[i-1].value))
					{
						if (alert_text != "") {alert_text = alert_text + "\n"}
						alert_text= alert_text + oForm.elements[i-2].value + txtMail;
					}
				}
			break;
			case "date":
				strTemp=oForm.elements[i-1].value;
				if (strTemp.length> 0) 
				{   
					l_CheckDate=chkdate(oForm.elements[i-1]);
					if (l_CheckDate==false)            /*проверить дату */
					{			  
						if (alert_text != "") {alert_text = alert_text + "\n"}
						alert_text=alert_text + oForm.elements[i-2].value + txtDate;
					}
				}
			break;

		}		//switch
	}		//IF verify
	


	i++;
}		//while

if (oForm.validator.value.length==0)
{
	if (alert_text != "") 
	{	alert_text = alert_text + "\n"; }
	alert_text=alert_text+captchaError+txtEmpty;
}


 if (alert_text=="")
 { oForm.submit();
 }
 else
 { alert(alert_text);
 return ;
 }
return;
}

