function Refresh()
// Refresh the recordset by submitting the form. 
{     
	document.frmVPA.action.value = '';
	document.frmVPA.Refresh.value = 'yes'; 
//	document.frmVPA.txtPageSize.value = document.frmVPA.RecordCount.value;  
	document.frmVPA.submit();
}  

function MoveToPage(PageNumber) 
// Select the page number to go to, then submit the page.     
{ 
	document.frmVPA.action.value = '';
	if (PageNumber != -1)         
		{document.frmVPA.lstPages[PageNumber].selected = true;}     
	else         
		{document.frmVPA.lstPages[0].selected = true;}
	document.frmVPA.submit();
}

function PrintView() 
//Show all of the records on 1 page, then submit the page.   
{  
	document.frmVPA.action.value = 'Print View';
	document.frmVPA.submit();
}

function ShowAllRecs() 
//Show all of the records on 1 page, then submit the page.   
{  
	document.frmVPA.action.value = '';
	document.frmVPA.txtPageSize.value = document.frmVPA.RecordCount.value;  
	document.frmVPA.AllRecs.value = 'yes';
	document.frmVPA.submit();
}  

function SetRecordCount() 
//Show all of the records on 1 page, then submit the page.   
{  
	document.frmVPA.action.value = '';
	document.frmVPA.submit();
}  

function ReSort(SortString) 
//Sort the recordset, then submit the page.     
{
	document.frmVPA.action.value = '';
	document.frmVPA.SortBy.value = SortString;     
	document.frmVPA.ReSort.value = 'yes';     
	document.frmVPA.submit();
} 

function DetailReport(SortString) 
//Sort the recordset, then submit the page.     
{
	document.frmVPA.action.value = 'Detail Report';
	document.frmVPA.SortBy.value = SortString;     
	document.frmVPA.ReSort.value = 'no';     
	document.frmVPA.submit();
} 

function SetKeyDown(field, evt)
{
	var keyCode = document.layers ? evt.which : document.all ? evt.keyCode : evt.keyCode;
  	if (keyCode != 13)
	{
    		return true;
	}
//	else if(keyCode==9) //tab
//	{
//		this.focus();
//	}
	else 
	{
	    SetRecordCount();
	    return false;
  	}
}