function PremierTable (width, valign)
{
    document.write("<td valign=" + valign + "><h3>Premier<br>");
    document.write("<font size=\"-2\">(" + PremierPointsComp + ")</font></h3>");
	document.write("<table class=\"top\" align=\"center\" border=0 width=" + width + " cellspacing=\"0\" bgcolor=#FFFFFF summary=\"\">");
	document.write("<col align=center><col align=center><col align=center><col align=center><col align=center><col align=center>");
	document.write("<tr><td class=\"smallheader\">Team</td><td class=\"smallheader\">P</td><td class=\"smallheader\">W</td><td class=\"smallheader\">D</td><td class=\"smallheader\">L</td><td class=\"smallheader\">Pts</td></tr>");

    var i=0;
	for (i in PremierPoints)
	{ 
	    document.write("<tr");
        if (i%2 == 0)
        	document.write(" class=\"alt\"");
        document.write("><td");
		if ((PremierPoints[i][0].match("Ardmore")!=null))
			{
			document.write(" class=\"red\"");
			}
		document.write(">" + PremierPoints[i][0] + "</td>"); //Home Team
        document.write("<td");
		if ((PremierPoints[i][0].match("Ardmore")!=null))
			{
			document.write(" class=\"red\"");
			}
		document.write(">" + PremierPoints[i][1] + "</td>"); //Played
        document.write("<td");
		if ((PremierPoints[i][0].match("Ardmore")!=null))
			{
			document.write(" class=\"red\"");
			}
		document.write(">" + PremierPoints[i][2] + "</td>"); //Won
        document.write("<td");
		if ((PremierPoints[i][0].match("Ardmore")!=null))
			{
			document.write(" class=\"red\"");
			}
		document.write(">" + PremierPoints[i][3] + "</td>"); //Drawn
        document.write("<td");
		if ((PremierPoints[i][0].match("Ardmore")!=null))
			{
			document.write(" class=\"red\"");
			}
		document.write(">" + PremierPoints[i][4] + "</td>"); //Lost
        document.write("<td");
		if ((PremierPoints[i][0].match("Ardmore")!=null))
			{
			document.write(" class=\"red\"");
			}
		document.write(">" + PremierPoints[i][10] + "</td></tr>"); //Points
		}
	document.write("</table></td>");
}

function ReserveTable (width, valign)
{
    document.write("<td valign=" + valign + "><h3>Reserves<br>");
    document.write("<font size=\"-2\">(" + PremierResPointsComp + ")</font></h3>");
	document.write("<table class=\"top\" align=\"center\" border=0 width=" + width + " cellspacing=\"0\" bgcolor=#FFFFFF summary=\"\">");
	document.write("<col align=center><col align=center><col align=center><col align=center><col align=center><col align=center>");
	document.write("<tr><td class=\"smallheader\">Team</td><td class=\"smallheader\">P</td><td class=\"smallheader\">W</td><td class=\"smallheader\">D</td><td class=\"smallheader\">L</td><td class=\"smallheader\">Pts</td></tr>");

    var i=0;
	for (i in PremierResPoints)
	{ 
	    document.write("<tr");
        if (i%2 == 0)
        	document.write(" class=\"alt\"");
        document.write("><td");
		if ((PremierResPoints[i][0].match("Ardmore")!=null))
			{
			document.write(" class=\"red\"");
			}
		document.write(">" + PremierResPoints[i][0] + "</td>"); //Home Team
        document.write("<td");
		if ((PremierResPoints[i][0].match("Ardmore")!=null))
			{
			document.write(" class=\"red\"");
			}
		document.write(">" + PremierResPoints[i][1] + "</td>"); //Played
        document.write("<td");
		if ((PremierResPoints[i][0].match("Ardmore")!=null))
			{
			document.write(" class=\"red\"");
			}
		document.write(">" + PremierResPoints[i][2] + "</td>"); //Won
        document.write("<td");
		if ((PremierResPoints[i][0].match("Ardmore")!=null))
			{
			document.write(" class=\"red\"");
			}
		document.write(">" + PremierResPoints[i][3] + "</td>"); //Drawn
        document.write("<td");
		if ((PremierResPoints[i][0].match("Ardmore")!=null))
			{
			document.write(" class=\"red\"");
			}
		document.write(">" + PremierResPoints[i][4] + "</td>"); //Lost
        document.write("<td");
		if ((PremierResPoints[i][0].match("Ardmore")!=null))
			{
			document.write(" class=\"red\"");
			}
		document.write(">" + PremierResPoints[i][10] + "</td></tr>"); //Points
		}
	document.write("</table></td>");
}

function Under21Table (width, valign)
{
    document.write("<td valign=" + valign + "><h3>Under 21<br>");
    document.write("<font size=\"-2\">(" + Under21PointsComp + ")</font></h3>");
	document.write("<table class=\"top\" align=\"center\" border=0 width=" + width + " cellspacing=\"0\" bgcolor=#FFFFFF summary=\"\">");
	document.write("<col align=center><col align=center><col align=center><col align=center><col align=center><col align=center>");
	document.write("<tr><td class=\"smallheader\">Team</td><td class=\"smallheader\">P</td><td class=\"smallheader\">W</td><td class=\"smallheader\">D</td><td class=\"smallheader\">L</td><td class=\"smallheader\">Pts</td></tr>");

    var i=0;
	for (i in Under21Points)
	{ 
	    document.write("<tr");
        if (i%2 == 0)
        	document.write(" class=\"alt\"");
        document.write("><td");
		if ((Under21Points[i][0].match("Ardmore")!=null))
			{
			document.write(" class=\"red\"");
			}
		document.write(">" + Under21Points[i][0] + "</td>"); //Home Team
        document.write("<td");
		if ((Under21Points[i][0].match("Ardmore")!=null))
			{
			document.write(" class=\"red\"");
			}
		document.write(">" + Under21Points[i][1] + "</td>"); //Played
        document.write("<td");
		if ((Under21Points[i][0].match("Ardmore")!=null))
			{
			document.write(" class=\"red\"");
			}
		document.write(">" + Under21Points[i][2] + "</td>"); //Won
        document.write("<td");
		if ((Under21Points[i][0].match("Ardmore")!=null))
			{
			document.write(" class=\"red\"");
			}
		document.write(">" + Under21Points[i][3] + "</td>"); //Drawn
        document.write("<td");
		if ((Under21Points[i][0].match("Ardmore")!=null))
			{
			document.write(" class=\"red\"");
			}
		document.write(">" + Under21Points[i][4] + "</td>"); //Lost
        document.write("<td");
		if ((Under21Points[i][0].match("Ardmore")!=null))
			{
			document.write(" class=\"red\"");
			}
		document.write(">" + Under21Points[i][10] + "</td></tr>"); //Points
		}
	document.write("</table></td>");
}

function Under85kgTable (width, valign)
{
    document.write("<td valign=" + valign + "><h3>Under 85kg<br>");
    document.write("<font size=\"-2\">(" + Under85kgPointsComp + ")</font></h3>");
	document.write("<table class=\"top\" align=\"center\" border=0 width=" + width + " cellspacing=\"0\" bgcolor=#FFFFFF summary=\"\">");
	document.write("<col align=center><col align=center><col align=center><col align=center><col align=center><col align=center>");
	document.write("<tr><td class=\"smallheader\">Team</td><td class=\"smallheader\">P</td><td class=\"smallheader\">W</td><td class=\"smallheader\">D</td><td class=\"smallheader\">L</td><td class=\"smallheader\">Pts</td></tr>");

    var i=0;
	for (i in Under85kgPoints)
	{ 
	    document.write("<tr");
        if (i%2 == 0)
        	document.write(" class=\"alt\"");
        document.write("><td");
		if ((Under85kgPoints[i][0].match("Ardmore")!=null))
			{
			document.write(" class=\"red\"");
			}
		document.write(">" + Under85kgPoints[i][0] + "</td>"); //Home Team
        document.write("<td");
		if ((Under85kgPoints[i][0].match("Ardmore")!=null))
			{
			document.write(" class=\"red\"");
			}
		document.write(">" + Under85kgPoints[i][1] + "</td>"); //Played
        document.write("<td");
		if ((Under85kgPoints[i][0].match("Ardmore")!=null))
			{
			document.write(" class=\"red\"");
			}
		document.write(">" + Under85kgPoints[i][2] + "</td>"); //Won
        document.write("<td");
		if ((Under85kgPoints[i][0].match("Ardmore")!=null))
			{
			document.write(" class=\"red\"");
			}
		document.write(">" + Under85kgPoints[i][3] + "</td>"); //Drawn
        document.write("<td");
		if ((Under85kgPoints[i][0].match("Ardmore")!=null))
			{
			document.write(" class=\"red\"");
			}
		document.write(">" + Under85kgPoints[i][4] + "</td>"); //Lost
        document.write("<td");
		if ((Under85kgPoints[i][0].match("Ardmore")!=null))
			{
			document.write(" class=\"red\"");
			}
		document.write(">" + Under85kgPoints[i][10] + "</td></tr>"); //Points
		}
	document.write("</table></td>");
}

function Under19Table (width, valign)
{
    document.write("<td valign=" + valign + "><h3>Under 19<br>");
    document.write("<font size=\"-2\">(" + Under19PointsComp + ")</font></h3>");
	document.write("<table class=\"top\" align=\"center\" border=0 width=" + width + " cellspacing=\"0\" bgcolor=#FFFFFF summary=\"\">");
	document.write("<col align=center><col align=center><col align=center><col align=center><col align=center><col align=center>");
	document.write("<tr><td class=\"smallheader\">Team</td><td class=\"smallheader\">P</td><td class=\"smallheader\">W</td><td class=\"smallheader\">D</td><td class=\"smallheader\">L</td><td class=\"smallheader\">Pts</td></tr>");

    var i=0;
	for (i in Under19Points)
	{ 
	    document.write("<tr");
        if (i%2 == 0)
        	document.write(" class=\"alt\"");
        document.write("><td");
		if ((Under19Points[i][0].match("Ardmore")!=null))
			{
			document.write(" class=\"red\"");
			}
		document.write(">" + Under19Points[i][0] + "</td>"); //Home Team
        document.write("<td");
		if ((Under19Points[i][0].match("Ardmore")!=null))
			{
			document.write(" class=\"red\"");
			}
		document.write(">" + Under19Points[i][1] + "</td>"); //Played
        document.write("<td");
		if ((Under19Points[i][0].match("Ardmore")!=null))
			{
			document.write(" class=\"red\"");
			}
		document.write(">" + Under19Points[i][2] + "</td>"); //Won
        document.write("<td");
		if ((Under19Points[i][0].match("Ardmore")!=null))
			{
			document.write(" class=\"red\"");
			}
		document.write(">" + Under19Points[i][3] + "</td>"); //Drawn
        document.write("<td");
		if ((Under19Points[i][0].match("Ardmore")!=null))
			{
			document.write(" class=\"red\"");
			}
		document.write(">" + Under19Points[i][4] + "</td>"); //Lost
        document.write("<td");
		if ((Under19Points[i][0].match("Ardmore")!=null))
			{
			document.write(" class=\"red\"");
			}
		document.write(">" + Under19Points[i][10] + "</td></tr>"); //Points
		}
	document.write("</table></td>");
}

