function checkFormLogin()
{
	var fout = false;
	f = document.loginForm;

	loginUser		= trim( f.loginUser.value );
	wachtwoordUser	= trim( f.wachtwoordUser.value );

	if ( loginUser.length == 0 )
	{
		if ( !fout )
		{
			melding = 'U bent vergeten het veld loginnaam in te vullen';
			f.loginUser.focus();
			fout = true;
		}
	}

	if ( wachtwoordUser.length == 0 )
	{
		if ( !fout )
		{
			melding = 'U bent vergeten het veld wachtwoord in te vullen';
			f.wachtwoordUser.focus();
			fout = true;
		}
	}

	if ( fout )
	{
		alert( melding );
		return false;
	}

	f.wwNoEncrypt.value = f.wachtwoordUser.value;
	f.wachtwoordUser.value = calcMD5( wachtwoordUser );

	return true;
}

function trim( strText )
{
	while ( strText.substring(0,1) == ' ' ) 
		strText = strText.substring(1, strText.length);

	while (strText.substring(strText.length-1,strText.length) == ' ')
		strText = strText.substring(0, strText.length-1);

	return strText;
}
