<?xml version="1.0"?>
<?xml-stylesheet href="chrome://search/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://search/skin/internet.css" type="text/css"?>
<?xml-stylesheet href="chrome://search/skin/icons.css" type="text/css"?>

<!DOCTYPE window SYSTEM "chrome://search/locale/internet.dtd">

<window class="dialog" align="vertical"
	xmlns:html="http://www.w3.org/TR/REC-html40"
	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
	xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" onload="loadPage()" onunload="unloadPage()">

	<html:script src="chrome://search/content/internet.js" />
	<html:script src="chrome://search/content/shared.js" />

	<box align="horizontal" style="width: 100%;" >
		<spring align="horizontal" flex="100%" />

	<html:div>&search.label;</html:div>

	<template id="categoryTemplate">
		<rule iscontainer="true">
			<html:optgroup uri="..." label="rdf:http://home.netscape.com/NC-rdf#title" />
		</rule>
	
		<rule>
			<html:option uri="..." value="rdf:http://home.netscape.com/NC-rdf#category" >
				<text value="rdf:http://home.netscape.com/NC-rdf#title" />
			</html:option>
		</rule>
	</template>

	<html:select id="categoryList" template="categoryTemplate" ref="NC:SearchCategoryRoot" datasources="rdf:null"
		sortResource="http://home.netscape.com/NC-rdf#title" sortDirection="ascending"
		onchange="return chooseCategory(this)" >

		<html:option value="NC:SearchEngineRoot" >&allengines.label;</html:option>

	</html:select>

		<html:div>&for.label;</html:div>
		<html:input id="searchtext" size="20" onkeyup="if (event.which == 13) { doSearch(); }" />
		<html:button id="searchbutton" onclick="return doSearch();">&search.button.label;</html:button>
		<html:button id="stopbutton" onclick="return doStop();" style="display: none;" >&stop.button.label;</html:button>
		<spring align="horizontal" flex="100%" />
	</box>

	<box align="horizontal" style="height: 85%; width: 100%;" flex="100%" >
		<spring align="horizontal" flex="50%" />
		<tree align="horizontal" id="searchengines" border="1" style="height: 90%;" flex="100%" datasources="rdf:internetsearch" ref="NC:SearchEngineRoot">
			<treecol id="CheckboxColumn" />
			<treecol id="NameColumn" rdf:resource="http://home.netscape.com/NC-rdf#Name" sortActive="true" sortDirection="ascending" />
			<treecol id="DescColumn" rdf:resource="http://home.netscape.com/NC-rdf#Description" rdf:resource2="http://home.netscape.com/NC-rdf#Name" />

			<template>
                                <treechildren>
				<treeitem uri="..." loading="rdf:http://home.netscape.com/NC-rdf#loading" >
					<treerow>
						<treecell allowevents="true">
							<html:input type="checkbox" onclick="doCheck(this)" />
						</treecell>
						<treecell allowevents="true">
							<titledbutton class="iconic" flex="1" crop="right" align="left" src="rdf:http://home.netscape.com/NC-rdf#Icon" value="rdf:http://home.netscape.com/NC-rdf#Name" />
						</treecell>
						<treecell allowevents="true">
							<titledbutton flex="1" crop="right" align="left" value="rdf:http://home.netscape.com/NC-rdf#Description" />
						</treecell>
					</treerow>
				</treeitem>
                                </treechildren>
			</template>

			<treehead>
				<treerow>
					<treecell value="&checkbox.column.label;"/>
					<treecell observes="NameColumn" value="&engine.column.label;" resource="http://home.netscape.com/NC-rdf#Name" onclick="return doSort('NameColumn');" sortActive="true" sortDirection="ascending"/>
					<treecell observes="DescColumn" value="&description.column.label;" resource="http://home.netscape.com/NC-rdf#Description" resource2="http://home.netscape.com/NC-rdf#Name" onclick="return doSort('DescColumn');" />
				</treerow>
			</treehead>
		</tree>
		<spring align="horizontal" flex="50%" />
	</box>

	<box align="horizontal" style="width: 100%;" >
		<spring align="horizontal" flex="100%" />
		<html:button onclick="return doCheckAll(true);">&checkall.button.label;</html:button>
		<html:button onclick="return doCheckAll(false);">&uncheckall.button.label;</html:button>
		<html:button id="SaveSearch" disabled="true" onclick="return saveSearch();">&savesearch.button.label;</html:button>
		<spring align="horizontal" flex="100%" />
	</box>
</window>
