protected LoginResult charcrFactionNext(final LoginSessionImpl loginObj, final Session session)
	{
		final MOB mob=loginObj.mob;
		Faction F= null;
		while((F==null)||(CMSecurity.isFactionDisabled(F.factionID())))
		{
			loginObj.index++;
			if(loginObj.index>=CMLib.factions().numFactions())
			{
				loginObj.state=LoginState.CHARCR_FACTIONDONE;
				return null;
			}
			F=CMLib.factions().getFactionByNumber(loginObj.index);
		}
		final List<Integer> mine=F.findChoices(mob);
		final int defaultValue=F.findAutoDefault(mob);
		if(defaultValue!=Integer.MAX_VALUE)
			mob.addFaction(F.factionID(),defaultValue);
		if(mine.size()==1)
		{
			mob.addFaction(F.factionID(),mine.get(0).intValue());
			return null;
		}
		if(mine.size()==0)
		{
			return null;
		}

		if((F.choiceIntro()!=null)&&(F.choiceIntro().length()>0))
		{
			StringBuffer intro = new CMFile(Resources.makeFileResourceName(F.choiceIntro()),null,CMFile.FLAG_LOGERRORS).text();
			try
			{
				intro = CMLib.webMacroFilter().virtualPageFilter(intro);
			}
			catch (final Exception ex)
			{
			}
			session.println(null,null,null,"\n\r\n\r"+intro.toString());
		}
		loginObj.lastInput="";
		loginObj.state=LoginState.CHARCR_FACTIONPICK;
		return null;
	}