
	// This function performs a search.
	function search (the_form)
		{	// The reference to search.
			var ref = "Dictionary";

			// The term to search for.
			var term = "";

			// Get all the input controls.
			var inputs = the_form.getElementsByTagName("input");
			
			// Get the search values.
			for ( var index = 0; index < inputs.length; index++ )
				{	// Get the next input.
					var input = inputs.item(index);

					// Set the reference.
					if ( input.name == "book" && input.checked )
						{	ref = input.value;
						} // if ( input.name == "book" && input.checked )

					// Set the term.
					else if ( input.name == "va" )
						{	term = input.value;
						}; // else if ( input.name == "va" )
				}; // for ( var index = 0; index < inputs.length; index++ )

			// Search the Rhyming Dictionary.
			if ( ref == "Rhyming" )
				{	document.location.href = "/cgi-bin/rhyming?std=student_clean&tgt=results&rh=" + escape(term);
				} // else if ( ref == "Rhyming" )

			// Search the Student Dictionary.
			else if ( ref == "Student" )
				{	document.location.href = "/cgi-bin/student?book=" + ref + "&va=" + escape(term);
				} // else if ( ref == "Student" )

			// Search any of the Thesaurus.
			else 
				{	document.location.href = "/cgi-bin/thesaurus?book=" + ref + "&va=" + escape(term);
				} // else 

		}; // function search (the_form)