function fnToggleView(intUniqueId, strSortColumn, strSortOrder, intRowsPerPage, nPage)
{
	//Initialise variables.
	var strView = document.getElementById("selstrView").value;

	//Reset the formation value.
	document.getElementById("hidnFormationID").value = 0;

	//Set the hidden field values.
	document.getElementById("hidstrView").value = strView;

	//Submit the sort form.
	fnSort(intUniqueId, strSortColumn, strSortOrder, intRowsPerPage, nPage, 0, 0);
}

function fnToggleFormation(intUniqueId, strSortColumn, strSortOrder, intRowsPerPage, nPage)
{
	//Initialise variables.
	var intFormationId = parseInt(document.getElementById("selFormation").value);

	//Set the hidden field values.
	document.getElementById("hidnFormationID").value = intFormationId;

	//Submit the sort form.
	fnSort(intUniqueId, strSortColumn, strSortOrder, intRowsPerPage, nPage, 0, 0);
}

function fnTogglePlayType(intUniqueId, strSortColumn, strSortOrder, intRowsPerPage, nPage)
{
	//Initialise variables.
	var intType = parseInt(document.getElementById("selPlayType").value);

	//Reset the hidden field values.
	document.getElementById("hidbAll").value = 0;
	document.getElementById("hidbRun").value = 0;
	document.getElementById("hidbPass").value = 0;
	document.getElementById("hidbRunStop").value = 0;
	document.getElementById("hidbPassCover").value = 0;

	switch (intType)
	{
		case 0: //All.
			document.getElementById("hidbAll").value = 1;
			break;

		case 1: //Run.
			document.getElementById("hidbRun").value = 1;
			break;

		case 2: //Pass.
			document.getElementById("hidbPass").value = 1;
			break;

		case 3: //Run stop.
			document.getElementById("hidbRunStop").value = 1;
			break;

		case 4: //Pass cover.
			document.getElementById("hidbPassCover").value = 1;
			break;
	}

	//Submit the sort form.
	fnSort(intUniqueId, strSortColumn, strSortOrder, intRowsPerPage, nPage, 0, 0);
}