function NextWeekend()
{
  	var i=0;                         
 	var j=0;
	for (i in Games)                 
	  	{
	   	if ((Games[i][3].length!=0) && (Games[i][3].match("Bruce")!=null))
       	j++
    	}
	if (j==0)
		{
	    document.write("<h3>No Ardmore Marist Home Games</h3>");					
		}
	else
		{
	    document.write("<h3>Ardmore Marist Home Games (" + j + ")</h3>");
	   	document.write("<p><a href=\"images3/BrucePulmanParkFields2010.jpg\" target=\"_blank\">Field Map</a></p>");
		document.write("<p>Click the Field shown in the table below to see the location of that field at Bruce Pulman Park</p>");
		document.write("<table align=\"center\" border=0 width=560 cellspacing=\"0\" bgcolor=#FFFFFF summary=\"\">");
		document.write("<col><col><col align=center><col align=center><col align=center><col align=center>");
		document.write("<tr><th>Team</th><th>Opposition</th><th>Time</th><th>Field</th><th>Comment</th></tr>");
		var i=0;                         
		var j=0;
		for (i in Games)                 
		   	{
		   	if ((Games[i][3].length!=0) && (Games[i][3].match("Bruce")!=null))
				{ 
			    document.write("<tr");
		        if (j%2 == 0)
		        	document.write(" class=\"alt\"");
		        if (Games[i][0].match("Black")!=null) { document.write("><td><b>" + Games[i][0] + "</b></td>"); } //Home Team
		        else if (Games[i][0].match("Blue")!=null) { document.write("><td class=\"blue\"><b>" + Games[i][0] + "</b></td>"); } //Home Team
		        else if (Games[i][0].match("Green")!=null) { document.write("><td class=\"green\"><b>" + Games[i][0] + "</b></td>"); } //Home Team
		        else if (Games[i][0].match("Red")!=null) { document.write("><td class=\"red\"><b>" + Games[i][0] + "</b></td>"); } //Home Team
		        else if (Games[i][0].match("White")!=null) { document.write("><td class=\"white\"><b>" + Games[i][0] + "</b></td>"); } //Home Team
		        else { document.write("><td><b>" + Games[i][0] + "</b></td>"); } //Home Team
				
		        document.write("<td>" + Games[i][1] + "</td>"); //Opposition
		        document.write("<td><b>" + Games[i][2] + "</b></td>"); //Time
		        document.write("<td><a href=\"http://www.ardmoremarist.co.nz/images3/BrucePulmanParkFields2011.jpg\" target=\"_blank\">" + Games[i][3] + "</a></td>"); //Field
		        document.write("<td><b>" + Games[i][4] + "</b></td></tr>"); //Comment
		        j++
		        }
		    }
		document.write("</table>");	
		}
		
	document.write("<hr>");

    var i=0;                         
    var j=0;
	for (i in Games)                 
    	{
    	if ((Games[i][3].length!=0) && (Games[i][3].match("Bruce")==null))
           	j++
        }
	if (j==0)
		{
	    document.write("<h3>No Ardmore Marist Away Games</h3>");					
		}
	else
		{
	    document.write("<h3>Ardmore Marist Away Games (" + j + ")</h3>");
  		document.write("<p><p>Click the Venue shown in the table below to see the location of that game</p></p>");
		document.write("<table align=\"center\" border=0 width=560 cellspacing=\"0\" bgcolor=#FFFFFF summary=\"\">");
		document.write("<col><col><col align=center><col align=center><col align=center><col align=center>");
		document.write("<tr><th>Team</th><th>Opposition</th><th>Time</th><th>Venue</th><th>Comment</th></tr>");
	    var i=0;                         
	    var j=0;
		for (i in Games)                 
	    	{
	    	if ((Games[i][3].length!=0) && (Games[i][3].match("Bruce")==null))
				{ 
			    document.write("<tr");
		        if (j%2 == 0)
		        	document.write(" class=\"alt\"");

		        if (Games[i][0].match("Black")!=null) { document.write("><td><b>" + Games[i][0] + "</b></td>"); } //Home Team
		        else if (Games[i][0].match("Blue")!=null) { document.write("><td class=\"blue\"><b>" + Games[i][0] + "</b></td>"); } //Home Team
		        else if (Games[i][0].match("Green")!=null) { document.write("><td class=\"green\"><b>" + Games[i][0] + "</b></td>"); } //Home Team
		        else if (Games[i][0].match("Red")!=null) { document.write("><td class=\"red\"><b>" + Games[i][0] + "</b></td>"); } //Home Team
		        else if (Games[i][0].match("White")!=null) { document.write("><td class=\"white\"><b>" + Games[i][0] + "</b></td>"); } //Home Team
		        else { document.write("><td><b>" + Games[i][0] + "</b></td>"); } //Home Team
				
	        	document.write("<td>" + Games[i][1] + "</td>"); //Opposition
		        document.write("<td><b>" + Games[i][2] + "</b></td>"); //Time
		        document.write("<td><a href=\"clubmap.html?club=" + Games[i][3] + "\" target=\"_blank\">" + Games[i][3] + "</a></td>"); //Club
		        document.write("<td><b>" + Games[i][4] + "</b></td></tr>"); //Comment
		        j++
	    	    }
		    }
		document.write("</table>");	
		}
			
	document.write("<hr>");

    var i=0;                         
    var j=0;
	for (i in Games)                 
    	{
    	if (Games[i][1]=="Bye")
	       	j++
    	}
	if (j==0)
		{
	    document.write("<h3>No Ardmore Marist Byes</h3>");					
		}
	else
		{
	    document.write("<h3>Ardmore Marist Byes (" + j + ")</h3>");
		document.write("<table align=\"center\" border=0 width=560 cellspacing=\"0\" bgcolor=#FFFFFF summary=\"\">");
		document.write("<col>");
		document.write("<tr><th>Team</th></tr>");
	    var i=0;                         
	    var j=0;
		for (i in Games)                 
	    	{
	    	if (Games[i][1]=="Bye")
				{ 
			    document.write("<tr");
		        if (j%2 == 0)
		        	document.write(" class=\"alt\"");
	    	    document.write("><td><b>" + Games[i][0] + "</b></td>"); //Team
		        j++
		        }
	    	}
		document.write("</table>");	
		}

	document.write("<hr>");

  	var i=0;                         
 	var j=0;
	for (i in OtherGames)                 
	  	{
	   	if ((OtherGames[i][4].length!=0) && (OtherGames[i][4].match("Bruce")!=null))
       	j++
    	}
	if (j==0)
		{
	    document.write("<h3>No Other Games Scheduled at the Ardmore Marist Fields</h3>");					
		}
	else
		{
	    document.write("<h3>Other Games Scheduled at the Ardmore Marist Fields (" + j + ")</h3>");
	   	document.write("<p><a href=\"images3/BrucePulmanParkFields2010.jpg\" target=\"_blank\">Field Map</a></p>");
		document.write("<p>Click the Field shown in the table below to see the location of that field at Bruce Pulman Park</p>");
		document.write("<table align=\"center\" border=0 width=560 cellspacing=\"0\" bgcolor=#FFFFFF summary=\"\">");
		document.write("<col><col><col align=center><col align=center><col align=center><col align=center>");
		document.write("<tr><th>Grade</th><th>Team</th><th>Opposition</th><th>Time</th><th>Field</th><th>Comment</th></tr>");
		var i=0;                         
		var j=0;
		for (i in OtherGames)                 
		   	{
		   	if ((OtherGames[i][4].length!=0) && (OtherGames[i][4].match("Bruce")!=null))
				{ 
			    document.write("<tr");
		        if (j%2 == 0)
		        	document.write(" class=\"alt\"");
		        document.write("><td><b>" + OtherGames[i][0] + "</b></td>"); //Grade
		        document.write("<td>" + OtherGames[i][1] + "</td>"); //Home Team
		        document.write("<td>" + OtherGames[i][2] + "</td>"); //Opposition
		        document.write("<td><b>" + OtherGames[i][3] + "</b></td>"); //Time
		        document.write("<td><a href=\"http://www.ardmoremarist.co.nz/images3/BrucePulmanParkFields2010.jpg\" target=\"_blank\">" + OtherGames[i][4] + "</a></td>"); //Field
		        document.write("<td><b>" + OtherGames[i][5] + "</b></td></tr>"); //Comment
		        j++
		        }
		    }
		document.write("</table>");	
		}
}
