/*
Funktionen für Suchformular
*/

function SearchFormStartup () {
// Cursor beim Aufruf der Seite in erstes Suchfeld setzen

	var isNetscape = (navigator.appName.indexOf ('Netscape') > -1);
	var firstTextInput = -1;
	
	if (document.forms.forSearch != null) {
		for (i = 0; i < document.forms.forSearch.elements.length; i++) {
			formElement = document.forms.forSearch.elements[i];
			if (formElement.type == 'text') {
				firstTextInput = (firstTextInput == -1) ? formElement : firstTextInput;
				if (isNetscape) {
					formElement.onkeypress = KeyPress;
				}
			}
		}
		firstTextInput.focus ();
	}
	
} // function SearchFormStartup


function KeyPress (Event) {
// Suchformular abschicken, wenn im Suchfeld Return gedrückt wurde

	if (Event.which != null) var KeyCode = Event.which;
	if (Event.keyCode != null) var KeyCode = Event.keyCode;
	if (KeyCode == 13) SendSearchForm ();
	
} // function KeyPress


function SendSearchForm () {
// Suchformular abschicken

	document.forms.forSearch.submit ();
	return true;
	
} // function SendSearchForm
