

function inAuthForm(id, txt) {

	if ($('#'+id).val() == txt) $('#'+id).val('');
	if (txt=='Пароль') document.getElementById('passlabel').innerHTML = '';

	}


function outAuthForm(id, txt) {

	if (txt!='Пароль' && $('#'+id).val() == '') $('#'+id).val(txt);
	if (txt=='Пароль' && $('#'+id).val() == '') { document.getElementById('passlabel').innerHTML = txt; $('#'+id).val('');}

	}


function checkAuthForm() {

	setTitleBeautyWindow('Некорректные данные');
	msg = '';

	txt = '';

	if(document.getElementById('authbarmail').value == '' ||
	   document.getElementById('authbarmail').value == 'E-mail')
		txt = txt + '<li> — E-mail</li>';

	if(document.getElementById('authbarpwd').value == '' ||
	   document.getElementById('authbarpwd').value == 'Пароль')
		txt = txt + '<li> — Пароль</li>';

	if(txt != '')
		msg = msg + '<ul>' + txt + '</ul>';

	if(msg != '') {

		msg = '<p><b>Заполните, пожалуйста, следующие поля</b></p>' + msg;

		setMessageBeautyWindow(msg);
		openBeautyWindow();
		return false;
		}


	return true;
	}

function firm_on(id) {

	document.getElementById(id).style.background = '#ffd9b7'; 
	document.getElementById('order_'+id).style.cssText = 'font-weight: bold; color: #2179a4;';
}

function firm_off(id) {

	if (document.getElementById(id).className=='odd') {
		document.getElementById(id).style.background = '#ffffff';
	} else {
		document.getElementById(id).style.background = '#fbf3ee';
	}
	document.getElementById('order_'+id).style.cssText = 'font-weight: normal; color: #859eaa;';
}