var masterList=new Array(
		'Account Module','account.html',
		'Accounting','accounting.html',
		'Accrual Accounting','accrual.html',
		'ADA CDT content license','cdtcompliance.html',
		'Adjustment Types - Definitions','definitions.html',
		'Adjustments','adjustments.html',
		'Adobe Acrobat Forms','adobeforms.html',
		'Advanced RDL Reports','rdlproject.html',
		'Advertising','advertising.html',
		'AFP / Dent-x ProImage','bridgedentxproimage.html',
		'Aging Report','reportaging.html',
		'Allowed Fee','feeschedules.html',
		'Anesthesia','anesthesia.html',
		'Antivirus Protection','virus.html',
		'Appointment Break','aptdeletebreakcomplete.html',
		'Appointment Colors - Definitions','definitions.html',
		'Appointment Colors - Providers','providers.html',
		'Appointment Complete','aptdeletebreakcomplete.html',
		'Appointment Confirm','confirmationlist.html',
		'Appointment Delete','aptdeletebreakcomplete.html',
		'Appointment Edit','aptedit.html',
		'Appointment Lists','appointmentlists.html',
		'Appointment Make','apptsched.html',
		'Appointment Rules','appointmentrules.html',
		'Appointment Views','appointmentviews.html',
		'Appointments','appointments.html',
		'Appointments Module General Notes','notes.html',
		'Apteryx','bridgeapteryx.html',
		'ASAP short call list','asapList.html',
		'Audit Trail','audittrail.html',
		'Australia','australia.html',
		'Auto Codes','autocode.html',
		'Auto Notes','autonotes.html',
		'Automation','automation.html',
		'Backups','backups.html',
		'Billing','billing.html',
		'Billing Types - Definitions','definitions.html',
		'Birthday','birthday.html',
		'Blockouts','blockouts.html',
		'Boilerplate Code','patterns.html',
		'Breaks - Time Clock','timeclock.html',
		'Bridges to Other Software','programlinks.html',
		'Bugs - Previous versions','http://70.90.133.65:1942/ODBugTracker/PreviousVersions.aspx',
		'Camsight CDMx','bridgecamsight.html',
		'Canada','canada.html',
		'Capitation Plans','insplantypes.html',
		'Chart Module','chart.html',
		'Chart Drawing','chartdrawing.html',
		'Check Ins Plan Fees','feeschedulecheckfees.html',
		'Choose Database','choosedatabase.html',
		'Claim Forms','claimforms.html',
		'Claim Procedure','claimprocedure.html',
		'Claims - Creating','claim.html',
		'Claims - Sending and Printing','claimsend.html',
		'Clearinghouses','clearinghouses.html',
		'Clinics','clinics.html',
		'Cliniview','bridgeapteryx.html',
		'Coding Style','codingstyle.html',
		'Colors - Definitions','definitions.html',
		'Comm Log','commlog.html',
		'Computer Requirements, Monitors','computernetrequire.html',
		'Consent Forms','consentforms.html',
		'Contacts, Pharmacies, Rolodex','contacts.html',
		'Convert Database','http://70.90.133.65:1942/ConversionList/ConversionList.aspx',
		'Co-pay Fee','feeschedules.html',
		'Corruption','corruption.html',
		'Credit Card - option on statement','statement.html',
		'Credit Cards','creditcards.html',
		'Crown Prep/Seat','laboratories.html',
		'Custom Patient Fields','custompatientfields.html',
		'Custom RDL Reports','customreports.html',
		'Data Conversions for new users','http://70.90.133.65:1942/ConversionList/ConversionList.aspx',
		'Data Path','paths.html',
		'Database Documentation','programmers.html',
		'Database Maintenance','databasemaintenance.html',
		'DBSWIN','bridgeDBSwin.html',
		'Deductibles','deductibles.html',
		'Definitions','definitions.html',
		'Delete Patient','familymemberslist.html',
		'Demo Version','../trial.html',
		'Dental Schools, Instructors','dentalschool.html',
		'DentalEye Bridge','imaging.html',
		'Denti-Cal','insplantypes.html',
		'Dentrix Comparison','compare.html',
		'Dentrix','conversions.html',
		'Dentrix Data Extraction - Trixi','trixi.html',
		'Deposit Slip','depositslip.html',
		'Developers','sourcecode.html',
		'Dexis','bridgedexis.html',
		'Diagnosis - Definitions','definitions.html',
		'Diagnosis - Procedure Edit','procedureedit.html',
		'Digital X-rays','imaging.html',
		'Digital Signatures','digitalsignatures.html',
		'Digora','bridgedigora.html',
		'DirectX','graphics.html',
		'Discount Types - Definitions','definitions.html',
		'Discounts','adjustments.html',
		'Diseases and Allergies','diseases.html',
		'Display Fields','displayfields.html',
		'DMO Plans','insplantypes.html',
		'Document Path','paths.html',
		'Documents - Images','images.html',
		'dotNet 3.5','dotnetThree.html',
		'Dolphin','bridgedolphin.html',
		'Downloads','downloads.html',
		'Drug - Medications List','medications.html',
		'Drug - Rx','rx.html',
		'Dunning Messages','billing.html',
		'Dynamic Refresh','refreshing.html',
		'EagleSoft Comparison','compare.html',
		'Easy Notes Pro','easynotespro.html',
		'Easy Options','showFeatures.html',
		'eClinicalWorks - eCW','bridgeEClinicalWorks.html',
		'Edit Patient Information','patientedit.html',
		'Electronic Attachments','eclaimsattachments.html',
		'Electronic Eligibility and Benefits','ebenefits.html',
		'Electronic Billing','ebill.html',
		'Electronic Claims','eclaims.html',
		'Embezzlement','embezzlement.html',
		'E-bills/Ebills','ebill.html',
		'E-claims/Eclaims','eclaims.html',
		'E-claims Attachments','eclaimsattachments.html',
		'E-claims/Eclaims Complexities','eclaimscomplexities.html',
		'E-mail/Email','email.html',
		'Employee Time Clock Hours','timeclock.html',
		'Employees','employees.html',
		'Employers','employers.html',
		'Enter Treatment','entertreatment.html',
		'EOB - Explanation Of Benefits','claimpayment.html',
		'Ewoo','bridgeewoo.html',
		'Excel','dataotherprogs.html',
		'Export Path','paths.html',
		'Exporting to Text File','queryexport.html',
		'Family Members List','familymemberslist.html',
		'Family Module','family.html',
		'Feature Requests','featurerequests.html',
		'Fee Schedule Tools','feescheduletools.html',
		'Fee Schedules','feeschedules.html',
		'Finance Charges','financecharges.html',
		'Foreign Countries','countries.html',
		'Form Letter / Mail Merge','lettermerge.html',
		'Formatting Raw Data','queryformatraw.html',
		'Forms - Billing Paper and Envelopes','statement.html',
		'Future Reports','reportsfuture.html',
		'Future Versions','future.html',
		'Gendex VixWin','bridgeVixwin.html',
		'Getting Started','gettingstarted.html',
		'Grade Schools','publichealth.html',
		'Graphics','graphics.html',
		'Guarantor - Set','familymemberslist.html',
		'Hardware Requirements','computerrequirements.html',
		'HIPAA','hipaa.html',
		'HL7','hl7.html',
		'HMO Plans','insplantypes.html',
		'HouseCalls Bridge','housecalls.html',
		'iCat','bridgeicat.html',
		'Imaging','imaging.html',
		'Imaging Setup','imagingsetup.html',
		'Import Document','documentscan.html',
		'Import Patient XML','import.html',
		'Incomplete Treatment - Tracker','appttracker.html',
		'Installation - Troubleshooting','troubleshooting.html',
		'Installation from CD','installFromCD.html',
		'Installation on a Workstation','installworkstation.html',
		'Insurance Answers Plus','iaplus.html',
		'Insurance Benefit Information','benefitinfo.html',
		'Insurance Carriers','carriers.html',
		'Insurance Category Spans Setup','inscatssetup.html',
		'Insurance Claim - Create','claim.html',
		'Insurance Claims - Printing and Sending','claimsend.html',
		'Insurance Coverage Categories and Spans Setup','inscatssetup.html',
		'Insurance Overpaid Report','reportinsoverpaid.html',
		'Insurance Payment','claimpayment.html',
		'Insurance Plans','insplan.html',
		'Insurance Plan Types','insplantypes.html',
		'Insurance Preauthorizations','treatmentplan.html',
		'Integration with Other Programs','dataotherprogs.html',
		'Kodak / Trophy','bridgetrophy.html',
		'Lab Cases','labcases.html',
		'Lab Case Edit','labcaseedit.html',
		'Laboratories','laboratories.html',
		'Labels','labels.html',
		'Languages','languages.html',
		'Letters','letters.html',
		'Letter Merge','lettermerge.html',
		'Links to Other Programs - Setup','programlinks.html',
		'Linux','clinuxmac.html',
		'Locking and Multiuser Concurrency','refreshing.html',
		'Macintosh','clinuxmac.html',
		'Mail Merge / Form Letter','dataotherprogs.html',
		'Main Menu','mainmenu.html',
		'Mediadent','bridgeMediadent.html',
		'Medicaid','insplantypes.html',
		'Medical Insurance','medicalins.html',
		'Medical Notes','medicalservice.html',
		'Medical History Form','medicalhistory.html',
		'Medications','medications.html',
		'Messaging Light Buttons','messages.html',
		'Misc Setup','miscsetup.html',
		'Missing Teeth','missingteeth.html',
		'Mobile Version for Pocket PC','mobile.html',
		'Modules','general.html',
		'Module Setup','modulesetup.html',
		'Mountainside','bridgeMountainside.html',
		'Move Family Member to another family','familymemberslist.html',
		'Movements','movements.html',
		'.msi','update.html',
		'Multiple Locations','multiplelocations.html',
		'Muliuser Concurrency Issues','refreshing.html',
		'my.ini','mysqlservervariables.html',
		'MySQL Configuration','choosedatabase.html',
		'MySQL Overview','mysql.html',
		'MySQL Passwords','passwordsmysql.html',
		'MySQL Server Variables','mysqlservervariables.html',
		'National Provider ID - NPI','npi.html',
		'NEA Fast Attach','eclaimsattachments.html',
		'Network & Security','networksecurity.html',
		'New Patient Registration Forms','registrationforms.html',
		'Norton','virus.html',
		'Notes Overview','notes.html',
		'ODBC Data Connection','odbc.html',
		'Online Backups','backupsonline.html',
		'OpenOffice.org','dataotherprogs.html',
		'Operatories','operatories.html',
		'Oracle','oracle.html',
		'Orthodontic Practices','orthodontic.html',
		'Owandy QuickLink','bridgeOwandy.html',
		'Palm Pilot','mobile.html',
		'Paperless','registrationforms.html',
		'Paste Document','documentscan.html',
		'Patient - Add','familyadd.html',
		'Patient Forms','patientform.html',
		'Patient Gallery / ImageFX','programlinks.html',
		'Patient Report','reportpatient.html',
		'Coding Patterns','patterns.html',
		'Pay Splits','paysplits.html',
		'Payment Plans','paymentplan.html',
		'Payments','payments.html',
		'Pay Period','payperiod.html',
		'PDA','mobile.html',
		'Perio Charting','perio.html',
		'Perio Pal','bridgeperiopal.html',
		'Pharmacies','pharmacies.html',
		'Plan List for Family','insplan.html',
		'Planmeca Dimaxis/Romexis','bridgeplanmeca.html',
		'Planned Appointment','apptplanned.html',
		'Planned Appointment Tracker','appttracker.html',
		'Plug-ins','plugins.html',
		'Pocket PC','mobile.html',
		'Popups','popups.html',
		'PPO Insurance Plans','insplantypes.html',
		'Practice Setup','practice.html',
		'PracticeWorks Comparison','compare.html',
		'PreAuthorizations','preauth.html',
		'Prescriptions Setup','rxsetup.html',
		'PreXion','bridgeprexion.html',
		'Primary Teeth','primary.html',
		'Printer Setup','printersetup.html',
		'Printing','queryprint.html',
		'Print Screen Tool','printscreentool.html',
		'Procedure Buttons','procedurebuttons.html',
		'Procedure Codes','procedurecodes.html',
		'Procedure Code Edit','procedurecodeedit.html',
		'Procedure Code New','procedurecodenew.html',
		'Procedure Code Tools','procedurecodetools.html',
		'Procedure Edit','procedureedit.html',
		'Production and Income Report','reportprodinc.html',
		'Production and Income','productionincome.html',
		'Program Links Setup','programlinks.html',
		'Programming Resources','programmers.html',
		'Provider Income Transfer','providerincometransfer.html',
		'Providers - Dentists and Hygienists','providers.html',
		'Public Health','publichealth.html',
		'Public Health Basic Screening Survey','publichealth.html',
		'Paperless Technologies - PT Dental','ptdental.html',
		
		
		'Query','queryoverview.html',
		'Query Favorites','queryfavorites.html',
		'Query Examples','queryexamples.html',
		'Questionnaire','questionnaire.html',
		'QuickBooks - Accounting','accounting.html',
		'Quickpaste Notes','quickpastenotes.html',
		'Raw Data','queryformatraw.html',
		'Recall','recall.html',
		'Recall List','recalllist.html',
		'Recall Setup','recallsetup.html',
		'Recall Types','recalltypes.html',
		'Reconcile','reconcile.html',
		'Referrals','referrals.html',
		'Referral Setup','referralsetup.html',
		'Referral Slips','referralslips.html',
		'Refreshing Data','refreshing.html',
		'Remote Access','remote.html',
		'Repeating Charges','repeatingcharges.html',
		'Replication','replication.html',
		'Reports','reports.html',
		'Reports - User Query','queryoverview.html',
		'Resellers','resellers.html',
		'Reseller List','resellerlist.html',
		'Routing Slips','routingslips.html',
		'Rx, Prescriptions','rx.html',
		'Rx - Existing Medications','medications.html',
		'Rx Setup','rxsetup.html',
		'Scanning Images','images.html',
		'ScanX','imaging.html',
		'Schedules for Providers and Employees','schedule.html',
		'Schedule Appointment for Patient','apptsched.html',
		'Schick CDR Dicom','bridgeschick.html',
		'Security, Users, Passwords, and Permissions','security.html',
		'Selecting Patients','patientselect.html',
		'Server Component','servercomponent.html',
		'Service Notes','medicalservice.html',
		'Setup Prescriptions','rxsetup.html',
		'Setup Recall','recallsetup.html',
		'Sheets','sheets.html',
		'Show Features','showFeatures.html',
		'Sirona SIDEXIS','programlinks.html',
		'Sites','sites.html',
		'Slowness','troubleshootingSlowness.html',
		'SoftDent Comparison','compare.html',
		'Source Code','sourcecode.html',
		'SQL','querysql.html',
		'SQL Examples','queryexamples.html',
		'Statements - Printing','statement.html',
		'Student Requirements','requirements.html',
		'Subscriber - Ins Plan','insplan.html',
		'Subversion (SVN)','sourcecode.html',
		'Suni','suni.html',
		'Supernumerary Teeth','procedureedit.html',
		'Supply Inventory','supplyinventory.html',
		'Support Fees','fees.html',
		'Switzerland','switzerland.html',
		'System Requirements','computernetrequire.html',
		'Tablet PC','tablet.html',
		'Terminal / Kiosk','patientinfoterminal.html',
		'Task Lists','taskList.html',
		'Tesia','eclaimstesia.html',
		'Text File Export','queryexport.html',
		'TigerView','programlinks.html',
		'Time - Open and Close','scheduledefault.html',
		'Time Card','timeclock.html',
		'Tooth Numbers','procedureedit.html',
		'Tooth Numbers - International','miscsetup.html',
		'Toolbar','toolbar.html',
		'Topaz','digitalsignatures.html',
		'Track Planned Appointment','appttracker.html',
		'Training','fees.html',
		'Treatment Plan','treatmentplan.html',
		'Treatment planned but not completed - Tracker','appttracker.html',
		'Trial Version','../trial.html',
		'Trial Version Improvements','trialversionimprovements.html',
		'Trixi - Dentrix export tool','trixi.html',
		'Trojan','trojan.html',
		'Trojan Express Collect','trojancollect.html',
		'Troubleshooting','troubleshooting.html',
		'Troubleshooting Slowness','troubleshootingSlowness.html',
		'Tutorial Videos','tutorials.html',
		'UAppoint','uappoint.html',
		'UCR Fees','insplan.html',
		'Unearned Income','accrual.html',
		'Unit / Regression Testing','unittesting.html',
		'United Kingdom','countries.html',
		'Universities - Dental','dentalschool.html',
		'Unscheduled Appointment List','unscheduled.html',
		'Update Version','update.html',
		'Update Aging','aging.html',
		'Upgrade to MySQL 5.0','mysql50.html',
		'User Concurrency Issues','refreshing.html',
		'User Query','queryoverview.html',
		'Using SQL','querysql.html',
		'Versions','versions.html',
		'Vipersoft','programlinks.html',
		'Virtual Private Network (VPN)','remote.html',
		'Vista','vista.html',
		'Voice Activation in Perio','perio.html',
		'Waiting Room','aptedit.html',
		'Web Version','webversion.html',
		'Web Service','webservice.html',
		'Wireless','wireless.html',
		'Word - MS','mailmergeword.html',
		'X-Charge','creditcards.html',
		'XDR','bridgexdr.html',
		'X-rays - Digital','imaging.html',
		'Zip Codes','zipcodes.html'
	);

if (navigator.appName == 'Netscape') {
window.captureEvents(Event.KEYPRESS);
window.onKeyPress = NNKeyCapture;
}

var shouldFill;

function init(){
	FillList(document.formMain.selectResults,document.formMain.textSearch.value);
	document.formMain.textSearch.focus();
	document.formMain.textSearch.select();
}

function JumpToPage(selectResults){
	//alert(selectResults.options[selectResults.selectedIndex].value);
	if(selectResults.selectedIndex==-1){
		return;
	}
	location.href=selectResults.options[selectResults.selectedIndex].value;
}

function FillList(selectResults,matchString){
	//alert('Filling list. Value=*'+matchString+'*');
	//alert('FillList. shouldFill= '+shouldFill);
	if(shouldFill==false){
		return;
	}
	selectResults.options.length=0;
	var m=0;
	var o=0;
	while(m<masterList.length){
		if(matchString=='' || masterList[m].toUpperCase().indexOf(matchString.toUpperCase()) !=-1){
			selectResults.options[o]=new Option(masterList[m],masterList[m+1]);
			o++;
		}
		m+=2;
	}
	//if(selectResults.options.length >0){
		//selectResults.selectedIndex=0;
	//}
}

function NNKeyCapture(thisOne) {
    if (thisOne.which == 13){ //13=Enter. 47= / for testing
       //alert('Enter key not functional yet.');
			 //JumpToPage(selectResults);
			 shouldFill=false;
		}
    else if (thisOne.which == 30){//up
			MoveUp();
			shouldFill=false;
		}
		else if (thisOne.which == 31){//down
			MoveDown();
			shouldFill=false;
		}
		else{
			shouldFill=true;
		}
}

function IEKeyCapture() {
		//alert(window.event.keyCode);
    if (window.event.keyCode == 13){ 
      //alert('Enter key not functional yet.');
			//JumpToPage(selectResults);
			shouldFill=false;
		}
		else if (thisOne.which == 30){//up
			MoveUp();
			shouldFill=false;
		}
		else if (thisOne.which == 31){//down
			MoveDown();
			shouldFill=false;
			//alert('downarrow. shouldFill= '+shouldFill);
		}
		else{
			shouldFill=true;
		}
}

function MoveDown(){
	if(selectResults.selectedIndex==-1 || selectResults.selectedIndex==selectResults.options.length-1){
		return;
	}
	selectResults.selectedIndex++;
}

function MoveUp(){
	if(selectResults.selectedIndex==-1 || selectResults.selectedIndex==0){
		return;
	}
	selectResults.selectedIndex--;
}





