// ------------------------------------------------------- 
// Copyright (C) Bradley M. Bell 2003, All rights reserved 
// ------------------------------------------------------- 
Keyword = 
[
"home  Math 407 Summer 2006 Class Web Page   math407 instructor name office e-mail news 2005 site list discussion mathml xml time location text book work test quiz final rule miss correction grading grade",
"Chapter1  Introduction   notation latex text linear function form standard solution feasible infeasible unbounded optimal",
"Quiz0622  Math 407 Summer 06 Quiz 06-22   06-30",
"Chapter2  How the Simplex Method Works  ",
"Dictionary2_1  Dictionary Method Solution of equation (2.1) in Chvatal  ",
"Tableau2_1  Tableau Method Solution of Equation (2.1) in Chvatal  ",
"Tableau1_6  Tableau Solution of Problem 1.6  ",
"Quiz0629  Math 407 Summer 06 Quiz 06-29   06-30",
"Software  Linear Programming Software  ",
"NeosClp  Neos Interface to the Clp Linear Program Solver  ",
"MpsInputFile  The MPS Input Format   structure fields comment name record rows columns rhs bounds endata",
"ClpCommand  Some of The Clp Executable Commands   direction directory import maximize minimize primalsimplex solution",
"Equation2_1  Neos Clp Input and Output For Equation 2.1   example",
"Pivot  Preform a Pivot Operation  ",
"Pivot2_1  Using Pivot Function to solve Equation 2.1   example",
"Chapter3  Pitfalls and How to Avoid Them   simplex complication",
"Degeneracy  Degeneracy   degenerate pivot basis solution",
"TwoPhase  Two Phase Simplex Method  ",
"Problem3_9a  Neos Clp Input and Output For Problem 3.9a  ",
"Quiz0706  Math 407 Summer 06 Quiz 07-06  ",
"Bland  Bland's Pivot Rule   linear programming theorem proof",
"BlandExample  Example Application of Bland's Smallest Pivot Rule  ",
"Quiz0713  Math 407 Summer 06 Quiz 07-13  ",
"Chapter5  The Duality Theorem  ",
"DualExample  A Linear Programming Duality Example   primal problem lagrangian",
"DualIneq  Duality With Inequality Constraints   primal problem lagrangian gap",
"DualTheorem  The Duality Theorem   tableau form solution",
"CompSlack  The Complementary Slackness Condition   optimum conditions",
"Quiz0720  Math 407 Summer 06 Quiz 07-20  ",
"DualEqIneq  Duality with Equality and Inequality Constraints   primal problem",
"Part2  Selected Applications  ",
"Problem1_6  Meat Packing Plant Problem 1.6  ",
"Electronic  Electronics Company  ",
"Quiz0803  Math 407 Quiz 06-08-03  ",
"IntegerProgram  Integer Programming  ",
"Quiz0727  Math 407 Quiz 06-07-27  ",
"TakeHome  Take Home Integer Programming Problem  ",
"MatrixGame  Zero Sum Matrix Games   theory",
"RockPaperScissor  Rock Paper Scissor as a Zero Sum Matrix Game   theory example",
"Problem15_1  Problem 15.1 of the Text  ",
"Quiz0810  Math 407 Summer 06 Quiz 08-10  ",
"Test  Tests and Results  ",
"Final  Math 407 Summer 06 Final Exam   duality formulation simplex method complimentary slackness",
"Grade  Test Results By Student Id Number   quiz",
"Bib  Bibliography  "
]

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;
	}
	Search();
	document.search.string.focus();
}
function Search()
{
	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";
}
