<!--


	function show_form(form_name)
	{
		var site_forms = new Array();
		site_forms[0] = 'consultation';
		site_forms[1] = 'sertification';
		site_forms[2] = 'consulting';
		site_forms[3] = 'test';
		var form_id = '';
		for (var i = 0; i < site_forms.length; i++)
		{
			form_id = 'forms_' + site_forms[i];
			if (site_forms[i] == form_name)
			{
				document.getElementById(form_id).style.display = 'block';
			}
			else
			{
				document.getElementById(form_id).style.display = 'none';
			}
		}
		document.getElementById('infoblocks').style.display = 'none';
	}


	function show_infoblock(form_name)
	{
		document.getElementById('forms_'+form_name).style.display = 'none';
		document.getElementById('infoblocks').style.display = 'block';
	}


	function nospace(str)
	{ 
		var VRegExp = new RegExp(/^[ ]+/g);
		var VResult = str.replace(VRegExp, '');
		return VResult
	}


	function check_form_akseko_mail(form_name, lang_id)
	{
		var form_fields = new Array();
		var form_submit = true;

		var alert_message = 'Пожалуйста, заполните все обязательные поля формы.';
		if (lang_id != 1)
		{
			alert_message = 'Please carefuly fill out all fields of the form.';
		}

		if (form_name == 'free_cons')
		{
			form_fields[0] = document.forms[form_name].title.value;
			form_fields[1] = document.forms[form_name].username.value;
			form_fields[2] = document.forms[form_name].email.value;
			form_fields[3] = document.forms[form_name].phone.value;
			form_fields[4] = document.forms[form_name].question.value;
		}

		if (form_name == 'sertif')
		{
			form_fields[0] = document.forms[form_name].object.value;
			form_fields[1] = document.forms[form_name].object_name.value;
			form_fields[2] = document.forms[form_name].phone.value;
			form_fields[3] = document.forms[form_name].email.value;
			form_fields[4] = document.forms[form_name].username.value;
		}

		if (form_name == 'consult')
		{
			form_fields[0] = document.forms[form_name].object.value;
			form_fields[1] = document.forms[form_name]['with'].value;
			form_fields[2] = document.forms[form_name].object_name.value;
			form_fields[3] = document.forms[form_name].phone.value;
			form_fields[4] = document.forms[form_name].email.value;
			form_fields[5] = document.forms[form_name].username.value;
		}

		if (form_name == 'test')
		{
			form_fields[0] = document.forms[form_name].object.value;
			form_fields[1] = document.forms[form_name].object_name.value;
			form_fields[2] = document.forms[form_name].phone.value;
			form_fields[3] = document.forms[form_name].email.value;
			form_fields[4] = document.forms[form_name].username.value;
		}

		for (var i = 0; i < form_fields.length; i++)
		{
			form_fields[i] = nospace(form_fields[i]);
			if (form_fields[i] == '')
			{
				form_submit = false;
				break;
			}
		}

		if (form_submit == true)
		{
			document.forms[form_name].submit();
		}
		else
		{
			alert(alert_message);
		}
	}


//-->
