protected int getClosestIndex(int xp)
	{
		int xHld;
		int xHld2;

		//Back
		xHld = getTextWidth(text.length());
		if(xp > xHld)
			return text.length();

		//Front
		xHld = getTextWidth(0);
		if(xp < xHld)
			return 0;

		int cPos = 0;
		xHld2 = xHld;

		while(cPos<text.length()-1)
		{
			xHld = xHld2;
			xHld2 = getTextWidth(cPos+1);

			if(Math.abs(xHld-xp)<Math.abs(xHld2-xp))
				return cPos;
			cPos++;
		}

		return text.length();
	}