<?php
	
	require_once 'xmlfunctions.php';
	require_once 'stats_bf.php';

	
	//print_r($XMLTEAM);
	
	print "<html>\n";
	print "<head>\n";
	print "<title>Masters of Endurance</title>\n";
	print "</head>\n";
	print "<body>\n";
	print "<center>\n";
	print "<table cellspacing=\"2\" cellpadding=\"0\" border=\"1\">\n";
		print "<tr>\n";
			print "<td>\n";
			for ($i = 0; $i < $XMLTEAM[0]['race_data']['laps']; $i++)
				print ($i+1)."<br>\n";
			print "</td>\n";
			
			for ($i = 0; $i < count($XMLTEAM); $i++)
			{
				print "<td valign='top'>\n";
					for ($j=0; $j < count($XMLTEAM[$i]['filter_laps']); $j++)
						print normalTime($XMLTEAM[$i]['filter_laps'][$j]['laptime'], true) . "<br/>\n";
				print "</td>\n";
			}
			print "</tr>\n";
	print "</table>\n";
	print "</center>\n";
	print "</body>\n";
	print "</html>\n";
?>