// ------------------------------------------------------- 
// Copyright (C) Bradley M. Bell 2003, All rights reserved 
// ------------------------------------------------------- 
Keyword = 
[
"overview  Source Code -> Web Based Help: OMhelp Version 12-01-25   support",
"License  Your License for the OMhelp Software  ",
"why  The Purpose and Motivation for OMhelp  ",
"Install  Installing and Testing OMhelp   mathml",
"InstallUnix  Unix Installation and Testing   free omhelp download prefix vim highlight syntax dictionary english.wrd local.wrd dictionary.bin getstarted using",
"InstallWindows  Windows Installation and Testing   free omhelp dictionary english.wrd local.wrd dictionary.bin getstarted using",
"get_started  Getting Started Using OMhelp  ",
"start_simple  Getting Started With A Simple Section   begin end",
"simple_example  Simple Example  ",
"start_head  Headings and Subheadings Example   get started",
"head_example  Example Headings  ",
"start_image  An Example Using Images   get started picture",
"image_example  An Image Example  ",
"start_pre  Pre-Formatted Text Example   get started",
"pre_example  Example Pre-Formatted Text  ",
"start_font  Example Using Font Commands   get started",
"font_example  Example Using Font Commands  ",
"start_spell  Spelling Command Example   get started error",
"spell_example  Example Spelling Exceptions  ",
"start_latex  An Example Using Latex Math Formula Commands   get started",
"latex_example  An Example Using Latex To Display Mathematics  ",
"start_verbatim  Example Using Verbatim Inclusion of a Text File   get started include",
"verbatim_example  Example Inclusion of Text File Information  ",
"start_embed  Embedding OMhelp Commands in Source Code   example c++ java python matlab fortran",
"view_near_equal_c  Contents of the File near_equal_c.c  ",
"near_equal_c  Determine if Two Values Are Nearly Equal  ",
"view_near_equal_f  Contents of the File near_equal_f.f  ",
"near_equal_f  Determine if Two Values Are Nearly Equal  ",
"start_multiple  An Example With Multiple Input Files and Sections   get started",
"multiple_example_1  An Example With a Child  ",
"ChildTwoExample  Second Example Child Section  ",
"multiple_example_2  Example With no Children  ",
"start_cref  An Example Linking To Other Pages In The Same Web Site   get started cross reference",
"cref_example_1  Parent Section For Cross Referencing Examples  ",
"cref_example_2  An Example Specifying the Cross Reference Tag  ",
"Cref3Example  An Example Specifying a Heading  ",
"start_index  An Indexing Example   keyword get started mindex cindex aindex",
"index_example_1  Parent Section For Indexing Examples  ",
"index_example_2  An Example Using The Mindex Command   child",
"Index3Example  An Example Using The Aindex Command  ",
"running  Running The OMhelp program   start command line argument option web file name index.htm exit status error return root input root_file debug external link list spelling error.wrd dictionary xml html printable noframe image icon favicon site example",
"files  Reading Input Files  ",
"path  Setting Input File Search Paths   read",
"children  Specifying Children in Contents Tree   document structure subsection read command input file childtable",
"next  Link to Next Section  ",
"previous  Link to Previous Section  ",
"stdout  Standard Output Information   version input file cross reference tag error message warning redirect include",
"include  The Include Command   read input file",
"image  Displaying Graphical Images   icon picture gif jpg",
"verbatim  Verbatim Display of All or Part of a File   source code example pre format hilite start stop",
"execute  Creating a File and Linking to its Execution  ",
"KeyCharacter  Changing the Command Key Character $   omhelpkeycharacter special input",
"KeyCharExample  Command Key Character Example  ",
"titles+headings  Specifying Titles, Headings, Tags, and Limits of a Section  ",
"begin  Begin and End A Section   specify cross reference tag link",
"section  Specify The Title For A Section   aindex",
"title  Using the Title of Another Section  ",
"head  Paragraph Headings and Subheadings   cross reference link aindex",
"cross  Cross Reference Linking   hypertext",
"Keyword  Keyword Index   cross reference mindex cindex aindex description the list escape character headings command major minor example for f(x , y) multiple",
"cref  General Cross Reference Within a Web Site   link section heading subheading",
"href  Linking an Address Outside Current Web Site   external cross reference mailto zip file",
"rref  Generate One Row of a Jump Table   cross reference link",
"tref  Cross Referencing By Displaying a Section's Title   reference",
"mref  Multiple Tag Based Cross References   link",
"navigate  Setting Relative Navigation Links For A Section   prev next",
"format  Page Layout and Text Formatting  ",
"nobreak  Do Not Break Text Into Separate Lines   format",
"pre  Pre-formatted Text With a Uniformly Spaced Font   white paragraph line break",
"codep  Pre-formatted Code Text   example paragraph font hilite",
"codei  Switch Between Code and Italic Pre-formatted Font   icode syntax prototype command display",
"color  Setting Colors   rgb style codecolor errorcolor hilite example highlight bgcolor background textcolor linkcolor",
"math  Math Mode   equation display",
"number  Displaying Simple Numbers In Math Mode  ",
"th  Indexing A Value   i-th",
"syntax  Specifying Command or Function Syntax   prototype",
"hilite  Automatic Highlighting and Cross Referencing Certain Tokens  ",
"center  Centering Text   align",
"table  Specifying a Table and Its Rows and Columns   tend rnext cnext cend rend",
"align  Setting Alignment of Cells in Tables  ",
"list  Commands Used to Display Lists of Items   lnext lend",
"special  Special Characters in Omhelp Input  ",
"dollar  Displaying the $ Character  ",
"cmark  Displaying the Copyright Symbol    character",
"rmark  Displaying the Registered Trade Mark Symbol    character",
"newlinech  Setting Programming Source Code Comment Character  ",
"accent  Displaying an Accent Over a Vowel   character",
"escape  Changing the Escape Character   \ backslash",
"tabsize  Specifying the Number of Characters Between Tab Columns  ",
"font  Specifying Fonts   type size fixed code italic bold big small head",
"spellchecking  Using The OMhelp Spell Checker  ",
"spell  Excluding Words from Spell Checking   error output dictionary english.wrd",
"nospell  Suspending Spell Checking   dictionary",
"latex  Using Latex Math Formulas in OMhelp   convert mathml inline display",
"symbol  Latex Symbols And Other Atomic Entities   character",
"latexnormal  Latex Normal Characters  ",
"latexnumber  Latex Numbers  ",
"latexspecial  Latex Special Characters   # $ % & _ { }",
"ellipsis  Latex Ellipsis Commands   dots ...",
"greek  Greek Letters   latex",
"BinaryOp  Binary Operators   latex",
"RelationSym  Relation Symbols   latex",
"ArrowSym  Arrow Symbols   latex",
"MiscSym  Miscellaneous Symbols   latex",
"DisplaySym  Symbols That Change Between Inline and Displayed Formulas   sub sup size latex",
"space  Horizontal Spacing Of Output   latex",
"diacritical  Diacritical Marks Above Other Output   latex acute bar breve check ddot hat grave tilde vec widehat widetilde",
"stdfun  Latex Standard Mathematics Functions  ",
"subsup  Latex Subscripts and Superscripts  ",
"frac  Latex Fraction Command  ",
"sqrt  Latex Root Command  ",
"array  The Latex Array Command   matrix",
"left_right  Latex Enclose With Left and Right Commands   delimiter",
"under_over  Latex Underline, Underbrace, Overline, and Overbrace  ",
"stackrel  Stacking One Thing Above Another   latex",
"latexfont  Changing Latex Font  ",
"latexcomment  The Latex Comment Command  ",
"LatexMacro  The Latex Macro Preprocessor  ",
"mathml  The MathML Command   test browser",
"other  Other Miscellaneous Commands  ",
"comment  The OMhelp Comment Command  ",
"date  Marking Output With Current Date   version",
"deprecated  OMhelp Commands that Have been Deprecated  ",
"wspace  Processing a Special Input Character as White Space  ",
"xref  Specifying a General Cross Reference With in Web Site   head subhead frame link",
"fend  Dividing A Section Into Frames   split",
"browser  Problems Using Certain Browsers With OMhelp   bug",
"Firefox  Problems Using Firefox To Display OMhelp Output   bug browser error copy and paste javascript background-color operator size symbol",
"NegativeSpace  Mozilla Bug Report For Negative Width in Mspace Command  ",
"Explorer  Problems Using MS Internet Explorer 6 To Display OMhelp Output   bug browser error operator size symbol",
"glossary  Glossary   children complete path specification cross reference tag delimiter sequence directory separator character dollar sign file extension input searching parent pre-formatted font section siblings uniformly spaced white",
"whatsNew  Changes and Additions to OMhelp   readme news",
"whatsNew04  Changes and Additions to OMhelp During 2004   readme",
"whatsNew03  Changes and Additions to OMhelp During 2003   readme most recent current version",
"whatsNew02  Changes and Additions to OMhelp During 2002   readme",
"whatsNew01  Changes and Additions to OMhelp During 2001   readme"
]

var MaxList = 100;
var Choice  = "";
var Nstring = -1;
var Nkeyword = Keyword.length;
Initialize();

function Initialize()
{
	var i;
	var line;
	for(i = 0; (i < Nkeyword) && (i < MaxList) ; i++)
	{
		line       = Keyword[i].split(/\s+/)
		line[0]    = line[0].toUpperCase();
		line       = line.join(" ");
		Keyword[i] = line;
	}
	UpdateList();
	document.search.string.focus();
}
function UpdateList(event)
{
	key = 0;
	if( window.event )
		key = window.event.keyCode;
	else if( event )
		key = event.which;
	if( key == 13 )
	{	Choose();
		return;
	}
	var string  = document.search.string.value;
	if( Nstring == string.length )
		return;
	Nstring     = string.length;

	var word    = string.match(/\S+/g);
	var nword   = 0;
	if(word != null )
		nword   = word.length;

	var pattern = new Array(nword);
	for(var j = 0; j < nword; j++)
		pattern[j] = new RegExp(word[j], "i");

	var nlist = 0;
	var list  = "";
	Choice    = "";

	for(i = 0; (i < Nkeyword) && (nlist < MaxList) ; i++)
	{
		var match = true;
		for(j = 0; j < nword; j++)
			match = match && pattern[j].test(Keyword[i]);

		if( match )
		{
			line     = Keyword[i].split(/\s+/);

			if( Choice == "" )
				Choice = line[0];

			line  = line.join(" ");
			list  = list + line + "\n";
			nlist = nlist + 1;
		}
	}
	document.search.choice.value  = Choice.toLowerCase();
	document.search.list.value    = list;
}
function Choose()
{
parent.location = document.search.choice.value.toLowerCase() + ".htm";
}

