function checkForm(theForm)
{
	// Check username (optional).
	/*if ( !checkHasValue( theForm.usernameperm, "TEXT" ) )
		if ( !onError( theForm, theForm.usernameperm, theForm.usernameperm.value, 
			"Please supply a value for\nthe user name field." ) )
			return false;	*/
			
	invalidChars = "?*+=[]:;\"<>,/\\|";
	if ( !checkValidChars( theForm.usernameperm.value, true, true, true, invalidChars, false ) )
		if ( !onError( theForm, theForm.usernameperm, theForm.usernameperm.value, 
			 "The user name may contain letters, numbers, spaces,\n"
			+"and special characters excluding: " + invalidChars ) )
			return false;
	
	// Check directory.
	/*
	if ( !checkHasValue( theForm.fileordirectory, "TEXT" ) )
		if ( !onError( theForm, theForm.fileordirectory, theForm.fileordirectory.value, 
			"Please supply a value for\nthe directory field." ) )
			return false;	*/
	invalidChars = "/:*?<>|";
	if ( !checkValidChars( theForm.fileordirectory.value, true, true, true, invalidChars, false ) )
		if ( !onError( theForm, theForm.fileordirectory, theForm.fileordirectory.value, 
			 "The directory may contain letters, numbers, spaces,\n"
			+"and special characters excluding: " + invalidChars ) )
			return false;

	return true;
} 

//document.frmMain.usernameperm.focus();
