function testLoginForm()
{
	var em = "";
	em+= trf("loginForm", "auth_login", "Логин");
	em+= trf("loginForm", "auth_password", "Пароль");
	if (em != "") {
		em = "Форма заполнена неверно!\r\n" + em;
		alert(em);
	}
	else {
		document.forms["loginForm"].submit();
	}
};

function test_eForm()
{
	var errorMessage = "";
	errorMessage = errorMessage + trf("cForm", "user_fio", "Ваше имя"); 
	if (errorMessage == "") {
		document.cForm.submit();		
	} else {
		alert(errorMessage);
	};
};

function testLogIn(idagent)
{
	if (idagent) {
		if (isNaN((idagent))) {
			alert ("Выберите свободного консультанта!");
		}
		else {			
			document.cForm.cId.value = idagent;
			test_eForm();
		}
	}
	else {
		alert ("Выберите свободного консультанта!");
	}
}