function checkTextFields()
{
/*
	Check is empty Login text area and Password text
	area.
*/
	var strLogin = document.login_frm.login.value;
	var strPwd   = document.login_frm.pwd.value;

	if (strLogin != "" && strPwd != "")
	{
		return true;
	}
	else
	{
		return false;
	}
}


function submitIfEnter(evt , numbText)
{
/*---------------------------------------
	If Enter was pressed in login text area then 
set focus to password text area. 

	If Enter was pressed in password text area
then check text fileds and submit form.
-----------------------------------------*/
/*
	numbText == 1 - Login text area
	numbText == 2 - Password text area
*/


	if (numbText == 1 && evt.keyCode == 13)
	{

		document.login_frm.pwd.focus();

		return true;
	}
	else if (numbText == 2 && evt.keyCode == 13)
	{

		if (checkTextFields() == true)
		{
			document.login_frm.submit();
		}

		return true;			
	}

	return false;
}