<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>AutoTest Log</title>
	</head>
	
	<body style="font-family:Courier New">
		<style>
			a:link {
				text-decoration: none;
				color: #0000bb;
			}

			a:visited {
				text-decoration: none;
				color: #0000bb;
			}

			a:hover {
				text-decoration: underline;
				color: #0000bb;
			}

			a:active {
				text-decoration: none;
				color: #0000bb;
			}
			
			.grid_row:hover td
			{
				background-color 		: #FFF67C;
			}
		</style>
		<script>
			function	SwapRows( RowIndex1 , RowIndex2 )
			{
				for( k = 0 ; k < 8 ; k++ )
				{
					var		CellId = "cell_";
						
					var		Span1 = document.getElementById( CellId.concat( RowIndex1 ).concat( "_" ).concat( k ) );
					var		Span2 = document.getElementById( CellId.concat( RowIndex2 ).concat( "_" ).concat( k ) );
					
					var		TdId = "td_";
					
					var		Td1 = document.getElementById( TdId.concat( RowIndex1 ).concat( "_" ).concat( k ) );
					var		Td2 = document.getElementById( TdId.concat( RowIndex2 ).concat( "_" ).concat( k ) );

					var		Tmp = Span1.innerHTML;
					Span1.innerHTML = Span2.innerHTML;
					Span2.innerHTML = Tmp;
					
					Color1 = Td1.getAttribute( 'bgcolor' );
					Color2 = Td2.getAttribute( 'bgcolor' );
					if( RowIndex1 % 2 == 0 )
					{
						if( Color2 == '#ffcdcd' )
						{
							Color2 = '#ffabab';
						}
						if( Color2 == '#cdffcd' )
						{
							Color2 = '#abffab';
						}
					}
					if( RowIndex1 % 2 == 1 )
					{
						if( Color2 == '#ffabab' )
						{
							Color2 = '#ffcdcd';
						}
						if( Color2 == '#abffab' )
						{
							Color2 = '#cdffcd';
						}
					}
					if( RowIndex2 % 2 == 0 )
					{
						if( Color1 == '#ffcdcd' )
						{
							Color1 = '#ffabab';
						}
						if( Color1 == '#cdffcd' )
						{
							Color1 = '#abffab';
						}
					}
					if( RowIndex2 % 2 == 1 )
					{
						if( Color1 == '#ffabab' )
						{
							Color1 = '#ffcdcd';
						}
						if( Color1 == '#abffab' )
						{
							Color1 = '#cdffcd';
						}
					}
					
					Td1.setAttribute( 'bgcolor' , Color2 );
					Td2.setAttribute( 'bgcolor' , Color1 );
				}
			}
			
			function	CompareCellValue( Value1 , Value2 , Column )
			{
				var		sort_order = "sort_direction_";
				sort_order = sort_order.concat( Column );
				
				if( document.getElementById( sort_order ).value == "desc" )
				{
					if( Value1.localeCompare( Value2 ) >= 0 )
					{
						return( true );
					}
				}
				else
				{
					if( Value2.localeCompare( Value1 ) >= 0 )
					{
						return( true );
					}
				}
				
				return( false );
			}
			
			function	get_a( Column , i )
			{
				var		CellId = "cell_";
				var		Span = document.getElementById( CellId.concat( i ).concat( "_" ).concat( Column ) );
				
				return( Span.innerHTML );
			}
			
			function	QuickSort( Column , Low , High ) 
			{
				var		TopCall = High == -2;
				if( TopCall )
				{
					Low = 0;
					High = document.getElementById( "test_count" ).value - 1;
				}
				
				if( Low < High )
				{
					var		l = Low;
					var		h = High;
					var		mIndex = High / 2 + Low / 2 - 0.5 * ( ( High + Low ) % 2 );
					
					do
					{
						while( ( l < mIndex ) && CompareCellValue( get_a( Column , mIndex ) , get_a( Column , l ) , Column ) ) l++;
						while( ( h > mIndex ) && CompareCellValue( get_a( Column , h ) , get_a( Column , mIndex ) , Column ) ) h--;
			
						if( l < h )
						{
							SwapRows( l , h );
						}
					}
					while( l < h );
					
					if( High - Low > 1 )
					{
						QuickSort( Column , Low , mIndex );
						QuickSort( Column , mIndex , High );
					}
				}
				
				if( TopCall )
				{
					var		sort_order = "sort_direction_";
					sort_order = sort_order.concat( Column );
					
					if( document.getElementById( sort_order ).value == "desc" )
					{
						document.getElementById( sort_order ).value = "asc";
					}
					else
					{
						document.getElementById( sort_order ).value = "desc";
					}
				}
			}
			
			function	Sort( Column )
			{
				var		test_count = document.getElementById( "test_count" ).value;
				
				var		sort_order = "sort_direction_";
				sort_order = sort_order.concat( Column );
				
				for( i = 0 ; i < test_count ; i++ )
				{
					for( j = 0 ; j < test_count - 1 ; j++ )
					{
						var		CellId = "cell_";
						
						var		Span1 = document.getElementById( CellId.concat( j ).concat( "_" ).concat( Column ) );
						var		Span2 = document.getElementById( CellId.concat( j + 1 ).concat( "_" ).concat( Column ) );
						
						if( document.getElementById( sort_order ).value == "desc" )
						{
							if( Span1.innerHTML.localeCompare( Span2.innerHTML ) < 0 )
							{
								SwapRows( j , j + 1 );
							}
						}
						else
						{
							if( Span1.innerHTML.localeCompare( Span2.innerHTML ) > 0 )
							{
								SwapRows( j , j + 1 );
							}
						}
					}
				}
				
				if( document.getElementById( sort_order ).value == "desc" )
				{
					document.getElementById( sort_order ).value = "asc";
				}
				else
				{
					document.getElementById( sort_order ).value = "desc";
				}
			}
		</script>
		<input type="hidden" id="sort_direction_0" value="desc">
		<input type="hidden" id="sort_direction_1" value="desc">
		<input type="hidden" id="sort_direction_2" value="desc">
		<input type="hidden" id="sort_direction_3" value="desc">
		<input type="hidden" id="sort_direction_4" value="desc">
		<input type="hidden" id="sort_direction_5" value="desc">
		<input type="hidden" id="sort_direction_6" value="desc">
		<input type="hidden" id="sort_direction_7" value="desc">
		<input type="hidden" id="test_count" value="#test_count#">
		<table width="100%">
			<tr>
				<td bgcolor="#DDDDDD">
					<a href="javascript:QuickSort( 0 , -2 , -2 );">#</a>
				</td>
				<td bgcolor="#DDDDDD">
					<a href="javascript:QuickSort( 1 , -2 , -2 );">#file#</a>
				</td>
				<td bgcolor="#DDDDDD">
					<a href="javascript:QuickSort( 2 , -2 , -2 );">#result#</a>
				</td>
				<td bgcolor="#DDDDDD">
					<a href="javascript:QuickSort( 3 , -2 , -2 );">#execution_time#</a>
				</td>
				<td bgcolor="#DDDDDD">
					<a href="javascript:QuickSort( 4 , -2 , -2 );">#avg_execution_time#</a>
				</td>
				<td bgcolor="#DDDDDD">
					<a href="javascript:QuickSort( 5 , -2 , -2 );">#tester#</a>
				</td>
				<td bgcolor="#DDDDDD">
					<a href="javascript:QuickSort( 6 , -2 , -2 );">#testers_email#</a>
				</td>
				<td bgcolor="#DDDDDD">
					<a href="javascript:QuickSort( 7 , -2 , -2 );">#description#</a>
				</td>
			</tr>