function fnFindMainPageGo(iKey)
{
if(iKey == 13)
	{
		document.frmGlobal.intPageID.value='2';
		document.frmGlobal.strFindString.value=document.frmGlobal.strFindMainPageString.value;
		document.frmGlobal.intFindResultsSet.value='1';
		document.frmGlobal.intFind.value='1';
		document.frmGlobal.submit();
		return true;
	}
}


function fnSearchMainPageGo(iKey)
{
if(iKey == 13)
	{
		document.frmGlobal.intPageID.value='6';
		document.frmGlobal.strSearchString.value=document.frmGlobal.strSearchMainPageString.value;
		document.frmGlobal.strSearchDatabase.value=document.frmGlobal.strSearchMainPageDatabase.value;
		document.frmGlobal.strSearchField.value=document.frmGlobal.strSearchMainPageField.value;
		document.frmGlobal.strSearchIsysWebString.value='';
		document.frmGlobal.strSearchSortBy.value='Title';
		document.frmGlobal.submit();
		return true;
	}
}


function fnFindResultsPageGo(iKey)
{
if(iKey == 13)
	{
		document.frmGlobal.intPageID.value='2';
		document.frmGlobal.strFindString.value=document.frmGlobal.strFindResultsString.value;
		document.frmGlobal.intFindResultsSet.value='1';
		document.frmGlobal.intFind.value='1';
		document.frmGlobal.submit();
		return true;
	}
}


function fnFindSummaryPageGo(iKey,strTempISBN)
{
if(iKey == 13)
	{
		document.frmGlobal.intPageID.value='4';
		document.frmGlobal.strFindSearch.value=document.frmGlobal.strFindSummarySearch.value;
		document.frmGlobal.strFindBoolean.value='';
		document.frmGlobal.strFindDetailISBN.value=strTempISBN;
		document.frmGlobal.submit();
		return true;
	}
}


function fnFindDetailPageGo(iKey)
{
if(iKey == 13)
	{
		document.frmGlobal.intPageID.value='4';
		document.frmGlobal.strFindSearch.value=document.frmGlobal.strFindDetailSearch.value;
		document.frmGlobal.strFindBoolean.value='';
		document.frmGlobal.submit();
		return true;
	}
}


function fnSearchDetailPageGo(iKey)
{
if(iKey == 13)
	{
		document.frmGlobal.intPageID.value='8';
		document.frmGlobal.strSearchIsysWebRequery.value=document.frmGlobal.strSearchDetailString.value;
		document.frmGlobal.strSearchBoolean.value='';
		document.frmGlobal.submit();
		return true;
	}
}


function fnSearchAdvancedPageGo(iKey,strTempDatabase)
{
if(iKey == 13)
	{
		document.frmGlobal.intPageID.value='6';
		document.frmGlobal.strSearchString.value=document.frmGlobal.strAdvancedSearchString.value;
		document.frmGlobal.strSearchField.value=document.frmGlobal.strAdvancedSearchField.value;
		document.frmGlobal.strSearchIsysWebString.value='';
		document.frmGlobal.strSearchSortBy.value='Title';
		document.frmGlobal.strAdvancedSearch.value=strTempDatabase;
		document.frmGlobal.strSearchBoolean.value='';
		document.frmGlobal.submit();
		return true;
	}
}


function fnQueryWithinPageGo(iKey,strQueryWithin)
{
if(iKey == 13)
	{
		document.frmGlobal.intPageID.value='6';
		document.frmGlobal.strSearchString.value=document.frmGlobal.strQueryWithinSearch.value;
		document.frmGlobal.strSearchField.value=document.frmGlobal.strQueryWithinSearchField.value;
		document.frmGlobal.strSearchIsysWebString.value='';
		document.frmGlobal.strSearchIsysWebQueryWithinString.value=strQueryWithin;
		document.frmGlobal.strSearchSortBy.value='Title';
		document.frmGlobal.strSearchBoolean.value='';
		document.frmGlobal.submit();
		return true;
	}
}


function fnPitPageGo(iKey)
{
if(iKey == 13)
	{
		document.frmGlobal.intPageID.value='12';
		document.frmGlobal.strPitString.value=document.frmGlobal.strPitSearchString.value;
		document.frmGlobal.intPitResultsSet.value='1';
		document.frmGlobal.submit();
		return true;
	}
}


function fnPitResultsPageGo(iKey)
{
if(iKey == 13)
	{
		document.frmGlobal.intPageID.value='12';
		document.frmGlobal.strPitString.value=document.frmGlobal.strPitResultsString.value;
		document.frmGlobal.intPitResultsSet.value='1';
		document.frmGlobal.submit();
		return true;
	}
}


function fnPitSummaryPageGo(iKey,strTempISBN)
{
if(iKey == 13)
	{
		document.frmGlobal.intPageID.value='14';
		document.frmGlobal.strPitSearch.value=document.frmGlobal.strPitSummarySearch.value;
		document.frmGlobal.strPitBoolean.value='';
		document.frmGlobal.strPitDetailISBN.value=strTempISBN;
		document.frmGlobal.submit();
		return true;
	}
}


function fnPitDetailPageGo(iKey)
{
if(iKey == 13)
	{
		document.frmGlobal.intPageID.value='14';
		document.frmGlobal.strPitSearch.value=document.frmGlobal.strPitDetailSearch.value;
		document.frmGlobal.strPitBoolean.value='';
		document.frmGlobal.submit();
		return true;
	}
}


function fnExpiredResultsPageGo(iKey)
{
if(iKey == 13)
	{
		document.frmGlobal.intPageID.value='21';
		document.frmGlobal.strExpiredString.value=document.frmGlobal.strExpiredResultsString.value;
		document.frmGlobal.intExpiredResultsSet.value='1';
		document.frmGlobal.intExpired.value='1';
		document.frmGlobal.intExpiredType.value='1';
		document.frmGlobal.submit();
		return true;
	}
}


function fnExpiredResultsPageMinistryGo()
{
document.frmGlobal.strExpiredMinistry.value='';
for(i=document.frmGlobal.strExpiredResultsMinistry.length-1; i>=0; i--)
	{
		if(document.frmGlobal.strExpiredResultsMinistry.options[i].selected)
			{
				if(document.frmGlobal.strExpiredMinistry.value == '')
					{
						document.frmGlobal.strExpiredMinistry.value=document.frmGlobal.strExpiredResultsMinistry.options[i].value
					}
				else
					{
						document.frmGlobal.strExpiredMinistry.value=document.frmGlobal.strExpiredMinistry.value+','+document.frmGlobal.strExpiredResultsMinistry.options[i].value
					}
			}
	}
	document.frmGlobal.intPageID.value='21';
	document.frmGlobal.dteExpiredStartDate.value=document.frmGlobal.dteExpiredResultsStartDate.value;
	document.frmGlobal.dteExpiredEndDate.value=document.frmGlobal.dteExpiredResultsEndDate.value;
	document.frmGlobal.intExpiredResultsSet.value='1';
	document.frmGlobal.intExpired.value='2';
	document.frmGlobal.intExpiredType.value='1';
	document.frmGlobal.submit();
	return true;
}


function fnAdminSearchCASSNumberPageGo(iKey)
{
if(iKey == 13)
	{
		document.frmGlobal.intPageID.value='40';
		document.frmGlobal.intAdminSearchCassNumber.value=document.frmGlobal.intAdminSearchByCassNumber.value;
		document.frmGlobal.strAdminAction.value='SEARCH_CASSNUMBER';
		document.frmGlobal.submit();
		return true;
	}
}


function fnAdminSearchLastNamePageGo(iKey)
{
if(iKey == 13)
	{
		document.frmGlobal.intPageID.value='40';
		document.frmGlobal.strAdminSearchLastName.value=document.frmGlobal.strAdminSearchByLastName.value;
		document.frmGlobal.strAdminAction.value='SEARCH_LASTNAME';
		document.frmGlobal.submit();
		return true;
	}
}


function fnAdminSearchOrganizationPageGo(iKey)
{
if(iKey == 13)
	{
		document.frmGlobal.intPageID.value='40';
		document.frmGlobal.strAdminSearchOrganization.value=document.frmGlobal.strAdminSearchByOrganization.value;
		document.frmGlobal.strAdminAction.value='SEARCH_ORGANIZATION';
		document.frmGlobal.submit();
		return true;
	}
}


function fnAdminSearchSubscriptionPageGo(iKey)
{
if(iKey == 13)
	{
		document.frmGlobal.intPageID.value='40';
		document.frmGlobal.strAdminSearchSubscription.value=document.frmGlobal.strAdminSearchBySubscription.value;
		document.frmGlobal.strAdminAction.value='SEARCH_SUBSCRIPTION';
		document.frmGlobal.submit();
		return true;
	}
}


function fnAdminSearchUsernamePageGo(iKey)
{
if(iKey == 13)
	{
		document.frmGlobal.intPageID.value='40';
		document.frmGlobal.strAdminSearchUser.value=document.frmGlobal.strAdminSearchByUser.value;
		document.frmGlobal.strAdminAction.value='SEARCH_USER';
		document.frmGlobal.submit();
		return true;
	}
}


function fnBooleanSearch(strObject,strBoolean)
{
if(strObject.value == '')
	{
		strObject.value = strObject.value
	}
else
	{
		strObject.value = strObject.value + strBoolean;
	}
}


function fnIsEmailVaild(strEmail)
{
if(REFindNoCase("^['_a-z0-9-]+(\.['_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*\.(([a-z]{2,3})|(aero|coop|info|museum|name))$",strEmail))
	{
		return TRUE;
	}
else
	{
		return FALSE;
	}
}

