2
* The contents of this file are subject to the Netscape Public
3
* License Version 1.1 (the "License"); you may not use this file
4
* except in compliance with the License. You may obtain a copy of
5
* the License at http://www.mozilla.org/NPL/
7
* Software distributed under the License is distributed on an "AS
8
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
9
* implied. See the License for the specific language governing
10
* rights and limitations under the License.
12
* The Original Code is Mozilla Communicator client code, released
15
* The Initial Developer of the Original Code is Netscape
16
* Communications Corporation. Portions created by Netscape are
17
* Copyright (C) 1998-1999 Netscape Communications Corporation. All
21
* Robert John Churchill <rjc@netscape.com>
22
* Mark Olson <maolson@earthlink.net>
26
function checkEngine()
28
var engineList = document.getElementById("engineList");
29
var engineValue = engineList.label;
37
var strDefaultSearchEngineName = parent.hPrefWindow.getPref("localizedstring", "browser.search.defaultenginename");
39
var engineListSelection = engineList.getElementsByAttribute( "label", strDefaultSearchEngineName );
40
var selectedItem = engineListSelection.length ? engineListSelection[0] : null;
44
//select a locale-dependent predefined search engine in absence of a user default
45
engineList.selectedItem = selectedItem;
49
//select the first listed search engine
50
engineList.selectedIndex = 1;
56
//select the first listed search engine
57
engineList.selectedIndex = 1;