/*
  LOGIN FORM VALIDATION FUNCTIONS
*/

function ELP_LoginForm_onsubmit() {
var m_szuid = ELP_LoginForm.IDC_UNAME.value;
var m_szPWD = ELP_LoginForm.IDC_PWD.value;
	
	// Verify if the user name is valid
	if (m_szuid == "") {
		alert("Type your user name please.");
		ELP_LoginForm.IDC_UNAME.focus();
		return false;
	}
	else {
		if ( m_szuid.search(" ") > -1 ) {
			alert("The user name cannot contain white spaces.");
			ELP_LoginForm.IDC_UNAME.focus();
			return false;
		}
	}

	// Verify if the user password is valid
	if (m_szPWD == "") {
		alert("The password cannot be empty.");
		ELP_LoginForm.IDC_PWD.focus();
		return false;
	}
	else {
		if ( m_szPWD.search(" ") > -1 ) {
			alert("The password cannot contain white spaces.");
			ELP_LoginForm.IDC_PWD.focus();
			return false;
		}
	}

	return true;
}

/*
  END OF LOGIN FORM VALIDATION FUNCTIONS
*/
