function CheckForm() {
	var errorMsg = "";
	var errorMsgLong = "";
	
	var AtSym    = document.RegForm.Email.value.indexOf('@');
	var Period   = document.RegForm.Email.value.lastIndexOf('.');
	var Space    = document.RegForm.Email.value.indexOf(' ');
	var Length   = document.RegForm.Email.value.length - 1 ;

	if (document.RegForm.FirstName.value.length < 2) {
		errorMsg += "\n\tFirst Name \t\t- Enter your first name";
    } 
	
	if (document.RegForm.LastName.value.length < 2) {
		errorMsg += "\n\tLast Name \t\t- Enter your last name";
    } 
	
	if ((AtSym < 1) ||                  
    (Period <= AtSym+1) || 
    (Period == Length ) ||      
    (Space  != -1))      
   {  
      errorMsg += "\n\tEmail Address \t\t- Enter a valid email address";
   }
	
	if ((document.RegForm.Username.value.length < 3 ) || (document.RegForm.Username.value.length > 12 )) {
		errorMsg += "\n\tUsername \t\t- Your username must contain between 4-12 characters";
	}
	
	if ((document.RegForm.Password.value.length < 4 ) || (document.RegForm.Password.value.length > 12 )) {
		errorMsg += "\n\tPassword \t\t- Your password must contain between 4-12 characters";
	}
	
	if ((document.RegForm.Password.value) != (document.RegForm.Password2.value)) {
		errorMsg += "\n\tPassword \t\t- Both the Password and the Verifying Password must be the same";
	}
	
	if ((document.RegForm.Username.value) == (document.RegForm.Password.value)) {
		errorMsg += "\n\tPassword \t\t- Do not use the same Username and Password.";
	}
	
	if ((errorMsg != "") || (errorMsgLong != "")){
		msg = "_____________________________________________________________________\n\n";
		msg += "There are problems with the data you submitted\n";
		msg += "_____________________________________________________________________\n\n";
		msg += "You must fix the following fields: -\n";
		
		errorMsg += alert(msg + errorMsg + "\n\n" + errorMsgLong);
		return false;
	}
	

	return true;
}
