gReports = new Array();

gReports[0] = new Object();
gReports[0].title = "League Table";
gReports[0].filename = "league_table.shtml";

function pageLoaded()
{
	
	var div = document.getElementById("reportsList");
	var ul, li;
	
	if (div != null)
	{
		ul = document.createElement("ul");
		for ( i = 0; i < gReports.length; i++)
		{
			li = document.createElement("li");
			anc = document.createElement("a");
			anc.href = gReports[i].filename;
			anc.appendChild(document.createTextNode(gReports[i].title));
			li.appendChild(anc);
			ul.appendChild(li);
		}
		div.appendChild(ul);
	}
	
}

//
// This is the bit that enables all this code to work. It
// adds the onload event handler to the page body tag. This method is used
// so that the page code is absolutely clean in the event that the user does
// not have JS enabled, and hence there is no posibility of error messages
// being generated.
window.onload=pageLoaded;


