//*************************************************************************************************
//
// File Name: GoogleCSE.js
// Author: An Dang (FMS)
// Created: 05/23/08
// Main function: Collections of functions for Google CSE.
//
//*************************************************************************************************

<!--
var lVal = document.title;
var lGovCat	= '014540195463098743471:a6dxixgppgu';
var lIndivCat	= '014540195463098743471:fzho35av8l4';
var lFirstCat	= '014540195463098743471:jd7knqe2mra';
var lCatExtNet	= '014540195463098743471:nwmhxiq1-dw';

function WriteCatalogs()
{
var lSortBy;
var lPage;

if (lVal.match('Internet'))
{
	document.write ('<div style="position:absolute; left:25px; top:277px;">');
	document.write ('<table cellspacing="3" cellpadding="7" border="0" width="100%"><tr><td><span class="smallfont"><b>For:  </span></b></td>');

	if (lVal.match('Government'))
	{
	document.write ('<td bgcolor="#ffffff"');
	document.write ('<a><i>Government/Financial institutions</i></a>');
	document.write ('</td><td bgcolor="#cccccc">');
	document.write ('<a href="/ResultsIndv.html?cx=' + lIndivCat + '&cof=FORID%3A11&q=' + document.search.q.value + '"><span class="smallfont">Individual Taxpayers</span></a>');
	document.write ('</td><td bgcolor="#999999">');
        document.write ('<a href="/ResultsFirst.html?cx=' + lFirstCat + '&cof=FORID%3A11&q=' + document.search.q.value + '"><span class="smallfont">First-time visitors</span></a>');
	document.write ('</td></tr>');
        lSortBy = lGovCat;
        lPage = '/Results.html';
        }

	if (lVal.match('Individual'))
	{
	document.write ('<td bgcolor="#cccccc">');
	document.write ('<a href="/Results.html?cx=' + lGovCat + '&cof=FORID%3A11&q=' + document.search.q.value + '"><span class="smallfont">Government/Financial institutions</span></a>');
	document.write ('</td><td bgcolor="#ffffff">');
	document.write ('<a><i>Individual Taxpayers</i></a>');
	document.write ('</td><td bgcolor="#999999">');
        document.write ('<a href="/ResultsFirst.html?cx=' + lFirstCat + '&cof=FORID%3A11&q=' + document.search.q.value + '"><span class="smallfont">First-time visitors</span></a>');
	document.write ('</td></tr>');
        lSortBy = lIndivCat;
        lPage = '/ResultsIndv.html';
        }
	if (lVal.match('First'))
	{
	document.write ('<td bgcolor="#999999">');
	document.write ('<a href="/Results.html?cx=' + lGovCat + '&cof=FORID%3A11&q=' + document.search.q.value + '"><span class="smallfont">Government/Financial institutions</span></a>');
	document.write ('</td><td bgcolor="#cccccc">');
	document.write ('<a href="/ResultsIndv.html?cx=' + lIndivCat + '&cof=FORID%3A11&q=' + document.search.q.value + '"><span class="smallfont">Individual Taxpayers</span></a>');
	document.write ('</td><td bgcolor="#ffffff">');
        document.write ('<a><i>First-time visitors</i></a>');
	document.write ('</td></tr>');
        lSortBy = lFirstCat;
        lPage = '/ResultsFirst.html';
        }
	document.write ('</table>');
	document.write ('</div>');
	
	
	document.write ('<div style="position:absolute; left:30px; top:317px;">');
	document.write ('<b><span class="smallfont">Sort by: </span></b>');
	document.write ('<a href="' + lPage + '?cx=' + lSortBy + '&cof=FORID%3A11&as_qdr=m6&q=' + document.search.q.value + '"><span class="smallfont">Date</span></a>|');
	document.write ('<a href="' + lPage + '?cx=' + lSortBy + '&cof=FORID%3A11&q=' + document.search.q.value + '"><span class="smallfont">Relevant</span></a>');
	document.write ('</div>');

}
else
{
	document.write ('<div style="position:absolute; left:30px; top:315px;">');
	document.write ('<span class="smallfont"><b>Sort by: </span></b>');
	document.write ('<a href="/ResultsXT.html?cx=' + lCatExtNet + '&cof=FORID%3A11&as_qdr=m6&q=' + document.search.q.value + '"><span class="smallfont">Date</span></a>|');
	document.write ('<a href="/ResultsXT.html?cx=' + lCatExtNet + '&cof=FORID%3A11&q=' + document.search.q.value + '"><span class="smallfont">Relevant</span></a>');
	document.write ('</div>');
}

}

function SwitchCatalog()
{

if (lVal.match('Extranet'))
{
	document.write ('<a href="/results.html?cx=' + lGovCat + '&cof=FORID%3A11&q=' + document.search.q.value + '#964">');
	document.write ('<b>FMS Internet</b></a><br><span class="smallfont">Search for materials from Financial Management Service website only.</span><p>');
}

if (lVal.match('Internet'))
{
	document.write ('<a href="/resultsXT.html?cx=' + lCatExtNet + '&cof=FORID%3A11&q=' + document.search.q.value + '#964">')
	document.write ('<b>FMS Extranet</b></a><br><span class="smallfont">Search for materials from U.S. Treasury bureaus and other Federal government financial management service websites.</span><p>')
}


if (lVal.match('Advance'))
{
	document.write ('<a href="/resultsXT.html?cx=' + lCatExtNet + '&cof=FORID%3A11&q=' + document.search.q.value + '#964">')
	document.write ('<b>FMS Extranet</b></a><br>Search for materials from U.S. Treasury bureaus and other Federal government financial management service websites.<p>')
}

}


function ChangeText(lStr)
{
var Cnt = lStr.split("</A>");

	if (lStr == '' || lStr.match('site:') || Cnt.length <= 3)	{
		if (lVal.match('Advanced Search'))
		{
			lStr = '<A  href="http://www.google.com/cse?cx=014540195463098743471%3Aa6dxixgppgu&amp;q=check+verification">check verification</A>';
			lStr = lStr + '<A  href="http://www.google.com/cse?cx=014540195463098743471%3Aa6dxixgppgu&amp;q=treasury+offset">treasury offset</A>';
			lStr = lStr + '<A  href="http://www.google.com/cse?cx=014540195463098743471%3Aa6dxixgppgu&amp;q=foreign+currency+fluctuation">foreign currency fluctuation</A>';
			lStr = lStr + '<A  href="http://www.google.com/cse?cx=014540195463098743471%3Aa6dxixgppgu&amp;q=ee+series">ee series</A>';
			lStr = lStr + '<A  href="http://www.google.com/cse?cx=014540195463098743471%3Aa6dxixgppgu&amp;q=agency+location+code">agency location code</A>';
			lStr = lStr + '<A  href="http://www.google.com/cse?cx=014540195463098743471%3Aa6dxixgppgu&amp;q=job+opportunity">job opportunity</A>';
			lStr = lStr + '<A  href="http://www.google.com/cse?cx=014540195463098743471%3Aa6dxixgppgu&amp;q=fms+form">fms form</A>';
			lStr = lStr + '<A  href="http://www.google.com/cse?cx=014540195463098743471%3Aa6dxixgppgu&amp;q=ipac">ipac</A>';
			lStr = lStr + '<A  href="http://www.google.com/cse?cx=014540195463098743471%3Aa6dxixgppgu&amp;q=ussgl">ussgl</A>';
			lStr = lStr + '<A  href="http://www.google.com/cse?cx=014540195463098743471%3Aa6dxixgppgu&amp;q=chart+of+accounts">chart of accounts</A>';
			lStr = lStr + '<A  href="http://www.google.com/cse?cx=014540195463098743471%3Aa6dxixgppgu&amp;q=tfm">tfm</A>';
			lStr = lStr + '<A  href="http://www.google.com/cse?cx=014540195463098743471%3Aa6dxixgppgu&amp;q=social+security">social security</A>';
			lStr = lStr + '<A  href="http://www.google.com/cse?cx=014540195463098743471%3Aa6dxixgppgu&amp;q=treasury">treasury</A>';
			lStr = lStr + '<A  href="http://www.google.com/cse?cx=014540195463098743471%3Aa6dxixgppgu&amp;q=tax+refund">tax refund</A>';
			lStr = lStr + '<A  href="http://www.google.com/cse?cx=014540195463098743471%3Aa6dxixgppgu&amp;q=treasury+tax+and+loan">treasury tax and loan</A>';
			lStr = lStr + '<A  href="http://www.google.com/cse?cx=014540195463098743471%3Aa6dxixgppgu&amp;q=direct+express">direct express</A>';
			lStr = lStr + '<A  href="http://www.google.com/cse?cx=014540195463098743471%3Aa6dxixgppgu&amp;q=mission+of+financial">mission of financial</A>';
		}
		else
		{
			lStr = '<A  href="http://www.google.com/cse?cx=014540195463098743471%3Aa6dxixgppgu&amp;q=check+verification">check verification</A>';
			lStr = lStr + '<A  href="http://www.google.com/cse?cx=014540195463098743471%3Aa6dxixgppgu&amp;q=treasury+offset">treasury offset</A>';
			lStr = lStr + '<A  href="http://www.google.com/cse?cx=014540195463098743471%3Aa6dxixgppgu&amp;q=foreign+currency+fluctuation">foreign currency fluctuation</A>';			
		}
	}

	if (lVal.match('Advanced Search'))
	{
		lStr = lStr.replace(/<A/g,", <A");
		lStr = lStr.replace(/, <A/,"<A");
	}
	else
	{
		lStr = lStr.replace(/<A/g,"<br><A");
	}
	 
	lStr = lStr.replace(/"/g,"");
	lStr = lStr.replace("site:fms.treas.gov/","");
	lStr = lStr.replace("+site%3Afms.treas.gov%2F#242","");
	lStr = lStr.replace(/www.google.com/g,"fms.treas.gov");
	lStr = lStr.replace(/q=/g,"&cof=FORID%3A11&q=");
	lStr = lStr.replace(/cse/g,"results.html");
	lStr = lStr.replace(/">/g,'&sa=Search#378">');
	lStr = lStr.replace(/">/g,'"><font size="-2">');
	lStr = lStr.replace(/</g,"</font><");
	lStr = '<span class="smallfont">' + lStr + '</span>';

	return lStr;
}

function clearKey()
{

	suggs.innerHTML = '';

}

function checkKey()
{
var lChoices;

lChoices = LoadTerms(document.search.q.value);

  if (lChoices == '')
	{
	suggs.innerHTML = '';
	}
  else
	{
	suggs.innerHTML = '<table cellspacing="3" cellpadding="7" border="1" width="100%" bgcolor="white"><tr><td>' + lChoices + '</td></tr></table>';
	}
}

function LoadTerms(lTerm)
{
var lStr='';

lTerm = lTerm.toLowerCase();

if (lTerm == 'a' || lTerm.match('ab'))
{
	lStr = lStr + LoadChoice('About FMS');
}

if (lTerm.match('ac') || lTerm.match('auto') || lTerm.match('ach'))
{
	lStr = lStr + LoadChoice('Accessibility Statement');
	lStr = lStr + LoadChoice('ACH (Automated Clearing House)');
	lStr = lStr + LoadChoice('ACH Payment Schedule: Recurring Benefits and Military Active Duty, Reserves, and Benefits');
}

if (lTerm.match('ag') || lTerm.match('loc') || lTerm.match('cod'))
{
	lStr = lStr + LoadChoice('Agency Location Codes');
}

if (lTerm.match('ad') || lTerm.match('wag') || lTerm.match('off')) 
{
	lStr = lStr + LoadChoice('Administrative Wage Garnishment');
}

if (lTerm.match('ann') || lTerm.match('comb') || lTerm.match('rece'))
{
	lStr = lStr + LoadChoice('Annual Report, United States Government');
	lStr = lStr + LoadChoice('Combined Statement of Receipts, Outlays, and Balances of the United States Government');
}

if (lTerm.match('au'))
{
	lStr = lStr + LoadChoice('Austin Regional Financial Center');
	lStr = lStr + LoadChoice('Automated Clearing House (ACH)');
	lStr = lStr + LoadChoice('Automated Standard Application for Payment (ASAP)');
}

if (lTerm == 'b' || lTerm.match('bu'))
{
	lStr = lStr + LoadChoice('Budget Surplus/Deficit Publications');
	lStr = lStr + LoadChoice('Bulk Data Formats for Salary and Vendor/Miscellaneous Payments');
	lStr = lStr + LoadChoice('Business Opportunities at FMS');
}

if (lTerm == 'c' || lTerm.match('ca'))
{
	lStr = lStr + LoadChoice('Card Collections Rebid');
	lStr = lStr + LoadChoice('Careers at FMS');
	lStr = lStr + LoadChoice('CA$HLINK II');
	lStr = lStr + LoadChoice('Cash Management Improvement Act (CMIA)');
}

if (lTerm.match('ch'))
{
	lStr = lStr + LoadChoice('Check Claims');
	lStr = lStr + LoadChoice('Check Payment Formats');
	lStr = lStr + LoadChoice('Check Reclamations');
}

if (lTerm.match('ch') || lTerm.match('alim') || lTerm.match('pay'))
{
	lStr = lStr + LoadChoice('Child Support Payments');
}

if (lTerm.match('ci'))
{
	lStr = lStr + LoadChoice('Circular 176: Depositaries and Financial Agents of the Federal Government (31 CFR 202)');
	lStr = lStr + LoadChoice("Circular 570: Treasury's Approved Listing of Sureties");
	lStr = lStr + LoadChoice("Citizen's Guide to Financial Report");
}

if (lTerm.match('co'))
{
	lStr = lStr + LoadChoice('Collateral');
	lStr = lStr + LoadChoice('Combined Statement of Receipts, Outlays, and Balances of the United States Government');
	lStr = lStr + LoadChoice('Congressional Handbook');
	lStr = lStr + LoadChoice('Contact FMS');
	lStr = lStr + LoadChoice('Corporate Trade Exchange (CTX)');
}

if (lTerm.match('cr'))
{
	lStr = lStr + LoadChoice('Credit Reform Accounting');
	lStr = lStr + LoadChoice('Cross-Servicing (Debt Collection)');
}

if (lTerm.match('cu'))
{
	lStr = lStr + LoadChoice('Current Value of Funds Rate');
	lStr = lStr + LoadChoice('Customer Relationship Managers (CRM)');
}

if (lTerm == 'coll')
{
	lStr = lStr + LoadChoice('CA$HLINK');
	lStr = lStr + LoadChoice('Collateral');
	lStr = lStr + LoadChoice('Debt Collection');
	lStr = lStr + LoadChoice('EFTPS (Electronic Federal Tax Payment System)');
	lStr = lStr + LoadChoice('FedTax II');
	lStr = lStr + LoadChoice('IPAC (Intra-governmental Payments and Collections System)');
	lStr = lStr + LoadChoice('Minority Bank Deposit Program');
	lStr = lStr + LoadChoice('Paper Check Conversion Over the Counter (PCC OTC)');
	lStr = lStr + LoadChoice('Pay.gov');
	lStr = lStr + LoadChoice('TGAnet');
	lStr = lStr + LoadChoice('Treasury Investment Program');
}

if (lTerm == 'd')
{
	lStr = lStr + LoadChoice('Daily Treasury Statement');
	lStr = lStr + LoadChoice('Debit Card');
	lStr = lStr + LoadChoice('Debt Collection');
	lStr = lStr + LoadChoice('Direct Deposit');
	lStr = lStr + LoadChoice('Direct Express Card');
	lStr = lStr + LoadChoice('Doing Business with FMS');
}

if (lTerm.match('dire') || lTerm.match('depos'))
{
	lStr = lStr + LoadChoice('Getting Started');
	lStr = lStr + LoadChoice('International Direct Deposit');
	lStr = lStr + LoadChoice('Report Errors in Direct Deposit');
}

if (lTerm == 'e')
{
	lStr = lStr + LoadChoice('EagleCash');
	lStr = lStr + LoadChoice('EEO Complaint Process');
	lStr = lStr + LoadChoice('EEO Policy Statement');
	lStr = lStr + LoadChoice('EFT Payment Formats');
	lStr = lStr + LoadChoice('Employment at FMS');
	lStr = lStr + LoadChoice('Exchange Rates');
	lStr = lStr + LoadChoice('EZpay');
}

if (lTerm.match('el'))
{
	lStr = lStr + LoadChoice('Electronic Certification System (ECS)');
	lStr = lStr + LoadChoice('Electronic Federal Tax Payment System (EFTPS)');
	lStr = lStr + LoadChoice('Electronic Funds Transfer (EFT)');
	lStr = lStr + LoadChoice('Electronic Transfer Account (ETA)');
}

if (lTerm == 'f')
{
	lStr = lStr + LoadChoice('Fact Sheets About FMS Programs');
	lStr = lStr + LoadChoice('FAST Book');
	lStr = lStr + LoadChoice('FEDTAX II');
	lStr = lStr + LoadChoice("Federal Agencies' Centralized Trial-Balance System (GFRS/FACTS I)");
	lStr = lStr + LoadChoice("Federal Agencies' Centralized Trial-Balance System (FACTS II)");
	lStr = lStr + LoadChoice('Federal Accounts Symbols and Titles');
	lStr = lStr + LoadChoice('Federal Government Participation');
}

if (lTerm .match('fms') || lTerm.match('ove'))
{
	lStr = lStr + LoadChoice('FMS Overview');
	lStr = lStr + LoadChoice('Glossary of Acronyms and Abbreviations');
	lStr = lStr + LoadChoice('Legislative & Public Affairs');
	lStr = lStr + LoadChoice('Locations & Directions');
	lStr = lStr + LoadChoice('Organizational Charts');
	lStr = lStr + LoadChoice('Strategic Plan');
}

if (lTerm.match('fi'))
{
	lStr = lStr + LoadChoice('Financial Connection Newsletter');
	lStr = lStr + LoadChoice('Financial Data Registry');
	lStr = lStr + LoadChoice('Financial Report of the United States Government');
}

if (lTerm.match('fo') || lTerm.match('unclai'))
{
	lStr = lStr + LoadChoice('Foreign Claims (Unpaid)');
	lStr = lStr + LoadChoice('Forms');
	lStr = lStr + LoadChoice('Frequently-Requested Forms');
}

if (lTerm.match('form') || lTerm.match('sf ') || lTerm.match('fms '))
{
	lStr = lStr + LoadChoice('FMS 13: Authorization for Release of Information');
	lStr = lStr + LoadChoice('FMS 1200, For social security, supplemental security income, federal retirement payments');
	lStr = lStr + LoadChoice('FMS 2231, Fast Start Direct Deposit');
	lStr = lStr + LoadChoice('SF 329: Administrative Wage Garnishment');
	lStr = lStr + LoadChoice('SF 1199A, For all other non-vendor federal payments');
	lStr = lStr + LoadChoice('Direct Deposit Sign-Up Forms, Spanish');
}

if (lTerm.match('fr'))
{
	lStr = lStr + LoadChoice('Freedom of Information Act (FOIA) Requests');
	lStr = lStr + LoadChoice('Frequently Asked Questions');
}

if (lTerm.match('fu'))
{
	lStr = lStr + LoadChoice('Fund Balance with Treasury');
}

if (lTerm == 'g' || lTerm.match('go'))
{
	lStr = lStr + LoadChoice('Gold Book (Reclamations Procedures)');
	lStr = lStr + LoadChoice('Government On-line Accounting Link System II (GOALS II)');
	lStr = lStr + LoadChoice('Governmentwide Accounting Project');
	lStr = lStr + LoadChoice('Governmentwide Debt Collection');
	lStr = lStr + LoadChoice('Governmentwide Financial Report System (GFRS)');
}

if (lTerm == 'g' || lTerm.match('gr'))
{
	lStr = lStr + LoadChoice('Green Book');
	lStr = lStr + LoadChoice('Gifts to the U.S. Government');
}

if (lTerm == 'h')
{
	lStr = lStr + LoadChoice('History of FMS');
	lStr = lStr + LoadChoice('Human Resources Division');
	lStr = lStr + LoadChoice('Working at FMS');
}

if (lTerm == 'i')
{
	lStr = lStr + LoadChoice('Imprest Funds Policy');
	lStr = lStr + LoadChoice('Information Quality');
}

if (lTerm.match('inte'))
{
	lStr = lStr + LoadChoice('International Training and Technical Assistance in Government Financial Management');
	lStr = lStr + LoadChoice('International Treasury Services (ITS.gov)');
	lStr = lStr + LoadChoice('Internet Payment Platform');
}

if (lTerm.match('intr'))
{
	lStr = lStr + LoadChoice('Intragovernmental Fiduciary Confirmation System (IFCS)');
	lStr = lStr + LoadChoice('Intragovernmental Payment and Collection System (IPAC)');
	lStr = lStr + LoadChoice('Intragovernmental Reconciliation Resources and Initiatives (IRRI)');
}

if (lTerm.match('opp') || lTerm.match('annou') || lTerm.match('jo'))
{
	lStr = lStr + LoadChoice('Job Openings');
	lStr = lStr + LoadChoice('Human Resources Division (HRD)');
}

if (lTerm == 'j')
{
	lStr = lStr + LoadChoice('Judgment Fund');
}

if (lTerm == 'k')
{
	lStr = lStr + LoadChoice('Kansas City Financial Center');
}

if (lTerm.match('leg') || lTerm.match('pub'))
{
	lStr = lStr + LoadChoice('Legislative and Public Affairs (LPA)');
}

if (lTerm == 'm')
{
	lStr = lStr + LoadChoice('Minority Bank Deposit Program');
}

if (lTerm.match('mo'))
{
	lStr = lStr + LoadChoice('Monthly Treasury Statement (MTS)');
}

if (lTerm == 'n')
{
	lStr = lStr + LoadChoice('News from Legislative and Public Affairs');
	lStr = lStr + LoadChoice('Navy Cash/Marine Cash');
}

if (lTerm == 'o')
{
	lStr = lStr + LoadChoice('Offsets and Withholdings');
	lStr = lStr + LoadChoice('Organization of FMS');
	lStr = lStr + LoadChoice('Organization Chart');
}


if (lTerm == 'p')
{
	lStr = lStr + LoadChoice('PACER Online');
	lStr = lStr + LoadChoice('Paper Check Conversion Over the Counter (PCC OTC)');
	lStr = lStr + LoadChoice('Pay.gov');
	lStr = lStr + LoadChoice('Payment Advice Internet Delivery (PAID)');
	lStr = lStr + LoadChoice('Payment Formats');
}

if (lTerm.match('pay'))
{
	lStr = lStr + LoadChoice('ACH (Automated Clearing House)');
	lStr = lStr + LoadChoice('ASAP (Automated Standard Application for Payments)');
	lStr = lStr + LoadChoice('Check Claims');
	lStr = lStr + LoadChoice('Corporate Trade Exchange (CTX)');
	lStr = lStr + LoadChoice('ECS (Electronic Certification System)');
	lStr = lStr + LoadChoice('EFT (Electronic Funds Transfer)');
	lStr = lStr + LoadChoice('EFT for Child Support Payments');
	lStr = lStr + LoadChoice('ETA (Electronic Transfer Accounts)');
	lStr = lStr + LoadChoice('Imprest Fund');
	lStr = lStr + LoadChoice('ITS.gov (International Treasury Services)');
	lStr = lStr + LoadChoice('Judgment Fund');
	lStr = lStr + LoadChoice('PACER Online (Payments, Claims and Enhanced Reconciliation)');
	lStr = lStr + LoadChoice('PAID (Payment Advice Internet Delivery)');
	lStr = lStr + LoadChoice('Payment Application Modernization (PAM)');
	lStr = lStr + LoadChoice('Prompt Payment');
	lStr = lStr + LoadChoice('Payment Formats: Check and EFT');
	lStr = lStr + LoadChoice('SPS (Electronic Certification System)');
	lStr = lStr + LoadChoice('TCIS (Treasury Check Information System)');
	lStr = lStr + LoadChoice('Unpaid Foreign Claims');
	lStr = lStr + LoadChoice('Vendor Express');
}

if (lTerm.match('ph'))
{
	lStr = lStr + LoadChoice('Philadelphia Financial Center');
}

if (lTerm.match('pl'))
{
	lStr = lStr + LoadChoice('Plastic Card Network');
}

if (lTerm.match('pr'))
{
	lStr = lStr + LoadChoice('Press Releases');
	lStr = lStr + LoadChoice('Privacy Impact Assessments');
	lStr = lStr + LoadChoice('Privacy and Security Notice');
	lStr = lStr + LoadChoice('Privacy Statement');
	lStr = lStr + LoadChoice('Procurement Opportunities');
	lStr = lStr + LoadChoice('Prompt Payment');
}

if (lTerm.match('pu'))
{
	lStr = lStr + LoadChoice('Congressional Handbook');
	lStr = lStr + LoadChoice('Fact Sheets and Press Releases');
	lStr = lStr + LoadChoice('Financial Connection');
	lStr = lStr + LoadChoice('Publication Schedule/Web Site Inventory');
	lStr = lStr + LoadChoice('Publications, FMS');
	lStr = lStr + LoadChoice('Strategic Plan');
}

if (lTerm == 'q' || lTerm.match('que'))
{
	lStr = lStr + LoadChoice('Browse A to Z Index');
	lStr = lStr + LoadChoice('Questions & Answers');
	lStr = lStr + LoadChoice('Site map');
}

if (lTerm == 'r')
{
	lStr = lStr + LoadChoice('Rates & Sureties');
	lStr = lStr + LoadChoice('Reclamations, Checks');
	lStr = lStr + LoadChoice('Regional Financial Centers');
	lStr = lStr + LoadChoice('Regulations');
}

if (lTerm.match('repor'))
{
	lStr = lStr + LoadChoice('CMIA (Cash Management Improvement Act)');
	lStr = lStr + LoadChoice('GFRS/FACTS I (Financial Reporting)');
	lStr = lStr + LoadChoice('FACTS II (Budgetary Reporting)');
	lStr = lStr + LoadChoice('GOALS II');
	lStr = lStr + LoadChoice('Governmentwide Accounting (GWA)');
	lStr = lStr + LoadChoice('Governmentwide Treasury Account Symbol (GTAS)');
	lStr = lStr + LoadChoice('Intragovernmental Reconciliation');
	lStr = lStr + LoadChoice('Shared Accounting Module (SAM)');
	lStr = lStr + LoadChoice('Transaction Reporting System (TRS)');
	lStr = lStr + LoadChoice('Treasury Report on Receivables (Debt Collection)');
}

if (lTerm.match('ref') || lTerm.match('guid'))
{
	lStr = lStr + LoadChoice('Automated Clearinghouse (31 CFR 210)');
	lStr = lStr + LoadChoice('Cash Management Made Easy');
	lStr = lStr + LoadChoice('EFTPS Publications');
	lStr = lStr + LoadChoice('FAST Book');
	lStr = lStr + LoadChoice('Federal Credit Bureau Program Guide');
	lStr = lStr + LoadChoice('Financial Data Registry');
	lStr = lStr + LoadChoice('Gold Book');
	lStr = lStr + LoadChoice('Green Book');
	lStr = lStr + LoadChoice('Agency Self-Certification Guide');
	lStr = lStr + LoadChoice("Now That You're a Certifying Officer");
	lStr = lStr + LoadChoice('Regulations');
	lStr = lStr + LoadChoice('Standard General Ledger');
	lStr = lStr + LoadChoice('Surety Bonds');
	lStr = lStr + LoadChoice('Treasury Financial Manual');
}

if (lTerm == 's')
{
	lStr = lStr + LoadChoice('San Francisco Regional Financial Center');
	lStr = lStr + LoadChoice('Secure Payment System (SPS)');
	lStr = lStr + LoadChoice('Shared Accounting Module (SAM)');
	lStr = lStr + LoadChoice('Sureties');
}

if (lTerm.match('st'))
{
	lStr = lStr + LoadChoice('Standard General Ledger, United States (USSGL)');
	lStr = lStr + LoadChoice('Status Report of U.S. Treasury-Owned Gold');
	lStr = lStr + LoadChoice('Stored Value Card');
	lStr = lStr + LoadChoice('Strategic Plan');
}

if (lTerm == 't' || lTerm.match('ta'))
{
	lStr = lStr + LoadChoice('Taxpayer Identifying Number (TIN) Policy');
	lStr = lStr + LoadChoice('Tax Refund Offset FAQ');
}

if (lTerm.match('te'))
{
	lStr = lStr + LoadChoice('Term Investment Option (TIO) and Treasury Investment Program (TIP)');
}

if (lTerm.match('tg'))
{
	lStr = lStr + LoadChoice('TGAnet');
}

if (lTerm.match('tr'))
{
	lStr = lStr + LoadChoice('Training & Events Calendar');
	lStr = lStr + LoadChoice('Transaction Reporting System (TRS)');
}

if (lTerm.match('trai'))
{
	lStr = lStr + LoadChoice('Accounting Operations');
	lStr = lStr + LoadChoice('Financial Systems Consulting');
	lStr = lStr + LoadChoice('Professional Development & Training');
	lStr = lStr + LoadChoice('Treasury Agency Services');
}

if (lTerm.match('tre'))
{
	lStr = lStr + LoadChoice('Treasury Annual Report');
	lStr = lStr + LoadChoice('Treasury Tax & Loan/Term Investment Option/Repurchase Agreement (TT&L/TIO/Repo) Actions');
	lStr = lStr + LoadChoice('Treasury Agency Services (TAS)');
	lStr = lStr + LoadChoice('Treasury Bulletin');
	lStr = lStr + LoadChoice('Treasury Check Information System (TCIS)');
	lStr = lStr + LoadChoice('Treasury Check Security Features');
	lStr = lStr + LoadChoice('Treasury Financial Manual (TFM)');
	lStr = lStr + LoadChoice('Volume I: Federal Agencies');
	lStr = lStr + LoadChoice('Volume IV: Treasury Tax and Loan Depositaries and Depositaries');
	lStr = lStr + LoadChoice('Volume V: Domestic Depositaries');
	lStr = lStr + LoadChoice('Volume VI: Oversees Depositaries ');
	lStr = lStr + LoadChoice('Treasury Investment Program (TIP) and Term Investment Option (TIO)');
	lStr = lStr + LoadChoice('Treasury Managed Accounts');
	lStr = lStr + LoadChoice('Treasury Offset Program (TOP)');
}

if (lTerm == 'u')
{
	lStr = lStr + LoadChoice('Unclaimed Assets, FAQ');
	lStr = lStr + LoadChoice('United States Government Annual Report');
	lStr = lStr + LoadChoice('United States Standard General Ledger (USSGL)');
	lStr = lStr + LoadChoice('Unpaid Foreign Claims');
}

if (lTerm == 'v')
{
	lStr = lStr + LoadChoice('Vendor Express');
	lStr = lStr + LoadChoice('Treasury Financial Manual (TFM)');
	lStr = lStr + LoadChoice('Volume I: Federal Agencies');
	lStr = lStr + LoadChoice('Volume IV: Treasury Tax and Loan Depositaries and Depositaries');
	lStr = lStr + LoadChoice('Volume V: Domestic Depositaries');
	lStr = lStr + LoadChoice('Volume VI: Oversees Depositaries ');
}

if (lTerm == 'w')
{
	lStr = lStr + LoadChoice('Administrative Wage Garnishment');
	lStr = lStr + LoadChoice('Web Site Inventory/Publication Schedule');
	lStr = lStr + LoadChoice('What We Do at FMS');
	lStr = lStr + LoadChoice('Working at FMS');
}

if (lTerm == 'x')
{
	lStr = lStr + LoadChoice('Exchange Rates (quarterly)');
	lStr = lStr + LoadChoice('Direct Express Card');
}

if (lTerm == 'y')
{
	lStr = lStr + LoadChoice("Now That You're a Certifying Officer");
}

if (lTerm == 'z')
{
	lStr = lStr + LoadChoice('Browse A to Z Index');
	lStr = lStr + LoadChoice('EZpay');
}

	return lStr;
}

function LoadChoice(lChoice)
{
var lStr;

  if (lChoice.match('Volume'))
	{
		lStr = '&nbsp  &nbsp <a href="/Results.html?cx=' + lGovCat + '&cof=FORID%3A11&q=' + lChoice.replace(/&nbsp/g,"") +
		'"><span class="smallfont">' + lChoice + '</span></a><br>'
	}
  else
	{
		lStr = '<a href="/Results.html?cx=' + lGovCat + '&cof=FORID%3A11&q=' + lChoice.replace(/&nbsp/g,"") +
		'"><span class="smallfont">' + lChoice + '</span></a><br>'
	}
	return lStr;
}
//dpavlov 05.12.2009 - function not to allow type illegal characters
function validate() {
     document.getElementById("q").value=filterNum(document.getElementById("q").value);
	//alert ("test" + document.getElementById("q").value);
    function filterNum(str) {
          re = /\$|,|@|#|~|`|\%|\*|\^|\&|\(|\)|\+|\=|\[|\-|\_|\]|\[|\}|\{|\;|\:|\'|\"|\<|\>|\?|\||\\|\!|\$|\./g;
          return str.replace(re, "");
	}
}
//dpavlov 05.12.2009 - function not to allow type illegal characters
function validateUSSGL() 
   {
	document.getElementById("searchStr").value=filterNum(document.getElementById("searchStr").value);
    function filterNum(str) 
	{
       	   re = /\$|,|@|#|~|`|\%|\*|\^|\&|\(|\)|\+|\=|\[|\-|\_|\]|\[|\}|\{|\;|\:|\'|\"|\<|\>|\?|\||\\|\!|\$|\./g;
       	   return str.replace(re, "");
	}
   }
//-->