/**
* filterResults
* Used for applying a refinement through the "filter your results" drop-downs.
**/
function filterResults(filter, selectedIndex)
{
	//window.alert(document.resultFilter.elements[filter].options[selectedIndex].value);
	location = unescape(document.resultFilter.elements[filter].options[selectedIndex].value);
}

/**
* sortResults
* Used by the drop-down that allows a user to sort on a given property.
**/
function sortResults(index)
{
	//window.alert(document.sortForm.sortKeys.options[index].value);
	location = unescape(document.sortForm.sortKeys.options[index].value);
}

/**
* showNumRecords
* Used by the drop-down that allows a user to specify N number of results per page.
**/
function showNumRecords(index)
{
	location = unescape(document.recsPerPageform.recsPerPage.options[index].value);
}

/**
* submitSearch
* Performs validation on a search term (requires a value), and submits the search query.
**/
function submitSearch()
{
	if(document.searchForm.Ntt.value == "")
	{
		window.alert("Please enter a search term");
		return false;
	}
	else
	{
		// Remove any illegal characters from search string.
		var searchText = document.searchForm.Ntt.value;
		searchText = searchText.replace("'", "");
		searchText = searchText.replace(";", "");
		searchText = searchText.replace("&", "");
		document.searchForm.Ntt.value = searchText.toString();
		document.searchForm.submit();
		return false;
	}
}