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