public static StringBuffer cstats(CharStats E, char c, HTTPRequest httpReq, java.util.Map<String,String> parms, int borderSize)
	{
		final StringBuffer str=new StringBuffer("");
		final PairVector<String,String> theclasses=new PairVector<String,String>();
		if(httpReq.isUrlParameter(c+"CSTATS1"))
		{
			int num=1;
			String behav=httpReq.getUrlParameter(c+"CSTATS"+num);
			while(behav!=null)
			{
				if(behav.length()>0)
				{
					String prof=httpReq.getUrlParameter(c+"CSTATSV"+num);
					if(prof==null)
						prof="0";
					prof=""+CMath.s_int(prof);
					theclasses.addElement(behav,prof);
				}
				num++;
				behav=httpReq.getUrlParameter(c+"CSTATS"+num);
			}
		}
		else
		{
			for(final int i : CharStats.CODES.ALLCODES())
			{
				if(CMath.s_int(E.getStat(CharStats.CODES.NAME(i)))!=0)
					theclasses.addElement(CharStats.CODES.NAME(i),E.getStat(CharStats.CODES.NAME(i)));
			}
		}
		str.append("<TABLE WIDTH=100% BORDER="+borderSize+" CELLSPACING=0 CELLPADDING=0>");
		for(int i=0;i<theclasses.size();i++)
		{
			final String theclass=theclasses.elementAt(i).first;
			str.append("<TR><TD WIDTH=35%>");
			str.append("<SELECT ONCHANGE=\"EditAffect(this);\" NAME="+c+"CSTATS"+(i+1)+">");
			str.append("<OPTION VALUE=\"\">Delete!");
			str.append("<OPTION VALUE=\""+theclass+"\" SELECTED>"+theclass);
			str.append("</SELECT>");
			str.append("</TD>");
			str.append("<TD WIDTH=65%>");
			str.append("<INPUT TYPE=TEXT NAME="+c+"CSTATSV"+(i+1)+" VALUE=\""+theclasses.elementAt(i).second+"\" SIZE=4 MAXLENGTH=4>");
			str.append("</TD>");
			str.append("</TR>");
		}
		str.append("<TR><TD WIDTH=35%>");
		str.append("<SELECT ONCHANGE=\"AddAffect(this);\" NAME="+c+"CSTATS"+(theclasses.size()+1)+">");
		str.append("<OPTION SELECTED VALUE=\"\">Select a stat");
		for(final int i : CharStats.CODES.ALLCODES())
		{
			if(!theclasses.contains(CharStats.CODES.NAME(i)))
				str.append("<OPTION VALUE=\""+CharStats.CODES.NAME(i)+"\">"+CharStats.CODES.DESC(i));
		}
		str.append("</SELECT>");
		str.append("</TD>");
		str.append("<TD WIDTH=65%>");
		str.append("<INPUT TYPE=TEXT NAME="+c+"CSTATSV"+(theclasses.size()+1)+" VALUE=\"\" SIZE=4 MAXLENGTH=4>");
		str.append("</TD>");
		str.append("</TR>");
		str.append("</TABLE>");
		return str;
	}