//__________________________________________
var h = screen.availHeight*0.39;
var w = screen.availWidth*0.33;
//__________________________________________
function check_login()
{
	wrong = 1;
	wrong &= email_check('login');
	wrong &= field_check('loginform', 'password', 'password', 'password');
	if (!wrong)
	{return false;}
	else
	{
		document.loginform.submit();
	}
}
//__________________________________________
function check_call()
{
	wrong = 1;
	wrong &= field_check('call', 'Fname', 'Fname', 'First name');
	wrong &= field_check('call', 'Lname', 'Lname', 'Last name');
	wrong &= field_check('call', 'Company', 'Company', 'Company');
	wrong &= field_check('call', 'City', 'City', 'City');
	wrong &= field_check('call', 'Country', 'Country', 'Country');
	wrong &= email_check('Email');
	wrong &= check_number('Phone');
	if (!wrong)
	{return false;}
	else
	{
		textval = "Компания: " + document.call.Company.value + "\n" + "Город: " + document.call.City.value + "\n" + "Страна: " + document.call.Country.value + "\n" + "Имя, фамилия: " + document.call.Fname.value + " " +document.call.Lname.value + "\n" + "Телефон: " + document.call.Phone.value + "\n" + "E-mail: " + document.call.Email.value + "\n";
		textvalHtml = "Компания: " + document.call.Company.value + "<br />" + "Город: " + document.call.City.value + "<br />" + "Страна: " + document.call.Country.value + "<br />" + "Имя, фамилия: " + document.call.Fname.value + " " +document.call.Lname.value + "<br />" + "Телефон: " + document.call.Phone.value + "<br />" + "E-mail: " + document.call.Email.value + "<br />";
		document.call.text.value = textval;
		document.call.texthtml.value = textvalHtml;
		document.call.submit();
	}
}
//__________________________________________
function check_order()
{
	wrong = 1;
	wrong &= field_check('order', 'Fname', 'Fname', 'First name');
	wrong &= field_check('order', 'Lname', 'Lname', 'Last name');
	wrong &= field_check('order', 'Company', 'Company', 'Company');
	wrong &= field_check('order', 'Activity', 'Activity', 'Activity sphere');
	wrong &= check_number('Staff');
	wrong &= field_check('order', 'City', 'City', 'City');
	wrong &= field_check('order', 'Country', 'Country', 'Country');
	wrong &= email_check('Email');
	wrong &= check_number('Phone');
	if (!wrong)
	{return false;}
	else
	{
		textval = "Компания: " + document.order.Company.value + "\n" + "Сфера деятельности: " + document.order.Activity.value + "\n" + "Численность персонала: " + document.order.Staff.value + "\n" + "Город: " + document.order.City.value + "\n" + "Страна: " + document.order.Country.value + "\n" + "Имя, фамилия: " + document.order.Fname.value + " " +document.order.Lname.value + "\n" + "Телефон: " + document.order.Phone.value + "\n" + "E-mail: " + document.order.Email.value + "\n";
		textvalHtml = "Компания: " + document.order.Company.value + "<br />" + "Сфера деятельности: " + document.order.Activity.value + "<br />" + "Численность персонала: " + document.order.Staff.value + "<br />" + "Город: " + document.order.City.value + "<br />" + "Страна: " + document.order.Country.value + "<br />" + "Имя, фамилия: " + document.order.Fname.value + " " +document.order.Lname.value + "<br />" + "Телефон: " + document.order.Phone.value + "<br />" + "E-mail: " + document.order.Email.value + "<br />";
		document.order.text.value = textval;
		document.order.texthtml.value = textvalHtml;
		document.order.submit();
	}
}
//__________________________________________

