/*--------------------------------------------------------------------
function IsProfileEnterKey(e)
Usage:	Determines whether the enter key was pressed on an input field
		
Input:  e - the key pressed
		
Return: true if the enter key was pressed
--------------------------------------------------------------------*/	
function IsProfileEnterKey(e)
{
	var whichCode = (window.Event) ? e.which : e.keyCode;
	if (whichCode == 13) return true;
	
	return false;
}

/*--------------------------------------------------------------------
function DoAthleteSearch()
Usage:	Submits the form to perform a search
		
Input:  none
		
Return: nothing
--------------------------------------------------------------------*/	
function DoAthleteSearch()
{
	var f = document.frmAthleteProfile;
	
	f.txtAPPage.value = "1"; // reset the current page
	f.submit();
}

/*--------------------------------------------------------------------
function SearchAlpha(l)
Usage:	Performs a search on the lastname
		
Input:  l - the letter clicked
		
Return: none
--------------------------------------------------------------------*/	
function SearchAlpha(l)
{
	var f = document.frmAthleteProfile;
	
	// update the last name field
	f.txtAPLName.value = l;
	DoAthleteSearch();
}

/*--------------------------------------------------------------------
function ViewAthleteProfile(id)
Usage:	Posts the form with the requested id
		
Input: id - the id of the participant
		
Return: none
--------------------------------------------------------------------*/	
function ViewAthleteProfile(id)
{
	var f = document.frmAthleteProfile;
	
	// update the id field
	f.txtAPParticipantID.value = id;
	f.submit();
}

/*--------------------------------------------------------------------
function DoAthleteSearchPage()
Usage:	Submits the form to perform a search with a given page
		
Input:  p - the page requested
		
Return: nothing
--------------------------------------------------------------------*/	
function DoAthleteSearchPage(p)
{
	var f = document.frmAthleteProfile;
	
	f.txtAPPage.value = p; // set the page
	f.submit();
}
