ErrEmpty = 'Please fill out your name'; 
ErrEmail = 'The e-mail adress you supplied is invalid';

EmailPath = /^\w(\.?[\w-])*@\w(\.?[\w-])*\.[a-z]{2,6}$/i;
NoSpacePath = /^.+$/;
EmptyPath = /^(\s*\n?)*$/;  // alleen spaties of regeleinden

function ValidateOnSubmit(strInput, ErrMsg, Path, booMagLeegZijn)
// Controleert of de invoer leeg mag zijn, en voldoet aan invoervoorwaarden.
{
	if (((strInput.value == '') && (booMagLeegZijn)) || (Path.exec(strInput.value)))
			{return true;   }
	else 	
			{alert(ErrMsg); return false}
} // einde ValidateOnSubmit

function ValidateOnBlur(strInput, Path, booMagLeegZijn)
// Controleert of de invoer leeg mag zijn, en voldoet aan invoervoorwaarden.
{
	if (((strInput.value == '') && (booMagLeegZijn)) || (Path.exec(strInput.value)))
			{ strInput.className = 'nofocus';}
	else 	
			{ strInput.className = 'verplicht';}
} // einde ValidateOnBlur


function ValidateTextOnBlur(strInput)
{ if ((strInput.value == '') || EmptyPath.exec(strInput.value))
	// Fout! De invoerstring mag NIET leeg zijn.
			{ strInput.className = 'verplicht';}
	else
			{ strInput.className = 'nofocus';}
} // einde ValidateText OnBlur


function ValidateTextOnSubmit(strInput)
{	
	if ((strInput.value == '') || EmptyPath.exec(strInput.value))
	// Fout! De invoerstring mag NIET leeg zijn.
			{ alert(ErrEmpty); return false;}
	else
			{ return true;}
} // einde ValidateText OnSubmit
