maxFirstIndex = i;
maxStyleIndex = i;
	private void resolveBorder( BorderStyleInfo[] styles,			BorderStyleInfo usedStyle )	{		CSSValue[] borderStyles = new CSSValue[styles.length];		for ( int i = 0; i < styles.length; i++ )		{			borderStyles[i] = styles[i].getBorderStyle( );			if ( IStyle.HIDDEN_VALUE.equals( borderStyles[i] ) )			{				usedStyle.setBorderStyle( IStyle.HIDDEN_VALUE );				return;			}		}				//resolve border width		int maxWidth = 0;		int maxCount = 1;		int maxFirstIndex = 0;		int[] ws = new int[styles.length];		CSSValue[] borderWidths = new CSSValue[styles.length];		for ( int i = 0; i < styles.length; i++ )		{			borderWidths[i] = styles[i].getBorderWidth( );			ws[i] = PropertyUtil					.getDimensionValue( styles[i].getBorderWidth( ) );			if ( ws[i] > maxWidth )			{				maxWidth = ws[i];				maxCount = 1;				maxFirstIndex = i;			}			else if ( ws[i] == maxWidth )			{				maxCount++;			}		}		if ( maxCount == 1 )		{			usedStyle.setBorder( borderStyles[maxFirstIndex], borderWidths[maxFirstIndex], styles[maxFirstIndex].getBorderColor( ) );			return;		}		else		{			//resolve border style			int max = 0;			int maxStyleIndex = 0;			int[] ss = new int[styles.length];			for ( int i = 0; i < styles.length; i++ )			{				if ( ws[i] == maxWidth )				{					ss[i] = ( (Integer) styleMap.get( styles[i].getBorderStyle( ) ) )					.intValue( );					if ( ss[i] > max )					{						max = ss[i];						maxFirstIndex = i;					}				}			}			usedStyle.setBorder( borderStyles[maxStyleIndex], borderWidths[maxStyleIndex], styles[maxStyleIndex].getBorderColor( ) );		}	}