// enhancedSearchInfo.js
// If you adding a translation for a language other than English I have
// provided the structure to do so below. Copy or replace the Klingon or
// Trollish section; use the standard 2-letter abbreviation for your language;
// copy the English (default) statements, and translate as appropriate.
function enhancedSearchInfo(language) {
	var esi_window = window.open("","enhancedSearchInfo","toolbar=no,directories=no,scrollbars=yes,menubar=no,hotkeys=no,location=no,height=450,width=600");
	esi_window.document.open();
	if(language == 'klingon'){ // ie. not english
		// copy all the statements from the default 'en' section in here, and translate into Klingon
	}
	else if(language == 'trollish'){ // ie. a second non-English language
		// copy all the statements from the default 'en' section in here, and translate into Trollish
	}
	// default to English ('en')
	else {
		var op = "";
		op += "<style type=\"text/css\">";
		op += "div {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; color: #000000; line-height: 150%}";
		op += "a {font-weight: bold; color: #000099;}";
		op += "a:hover {color: #CC3300; text-decoration: none}";
		op += "dd,li {margin-bottom: 3px}";
		op += "h2 {font-size: 10pt; font-weight: bold; color: #666666;}</style>";
		op += "<div><p align=\"right\"><a href=\"javascript:window.close()\">Close Window</a></p>";
		op += "<h2>Help for the Enhanced Search Facility</h2>";
		op += "<p>This provides 'Google-like' text search queries like:<dl><dt><u>Example 1</u>: film -romantic";
		op += "<dd>Match text containing the substring 'film',  and not containing the substring 'romantic'.";
		op += "<dt><u>Example 2</u>: film thriller or action<dd>Match text containing the substring 'film' and either the substring";
		op += " 'action' or the substring 'action'.</dl>";
		op += "The full query syntax, in order of precedence, is roughly:<ul>";
		op += "<li>The unary 'NOT' or '-' operator (they are equivalent) negates the following search clause.";
		op += "<li>Search clauses may be joined with the (left-associative) binary operators 'AND' and 'OR'.";
		op += "<li>Two adjoining search clauses are joined with an implicit 'AND'.  This has lower precedence than";
		op += " either an explicit 'AND' or 'OR', so \"a b OR c\" parses as \"a AND ( b OR c )\",";
		op += " while \"a AND b OR c\" parses as \"( a AND b ) OR c\" (due to the left-associativity of 'AND' and 'OR'.)";
		op += "<li>Search clauses can be grouped with parentheses.";
		op += "<li>Phrases (or other things which don't look like words) can be forced to be interpreted as words";
		op += " by quoting them, either with single (') or double (\") quotes.  If you want to include the quote";
		op += " character within a quoted string, double-up on the quote character: 'I''m hungry' is equivalent to \"I'm hungry\".</dl></p>";
		op += "<p align=\"right\"><a href=\"javascript:window.close()\">Close Window</a></p></div>";
	}
	esi_window.document.write(op);
	esi_window.document.close();
}

