<?xml version="1.0"?> 
<!--
The contents of this file are subject to the Netscape Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/NPL/

Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.

The Original Code is Mozilla Communicator client code, released
March 31, 1998.

The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
 Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
--> 

<?xml-stylesheet href="chrome://messenger/skin/addressbook/addressbook.css" type="text/css"?> 

<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<?xul-overlay href="chrome://messenger/content/addressbook/abDirTreeOverlay.xul"?>
<?xul-overlay href="chrome://messenger/content/addressbook/abResultsTreeOverlay.xul"?>
<?xul-overlay href="chrome://global/content/globalOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/utilityOverlay.xul"?>


<!DOCTYPE window SYSTEM "chrome://messenger/locale/addressbook/abSelectAddressesDialog.dtd">


<window xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
		xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
        title="&selectAddressWindow.title;"
        class="dialog"
        width="680" height="480"
        onload="OnLoadSelectAddress()"
        align="vertical">

<script language="JavaScript" src="chrome://messenger/content/addressbook/abCommon.js"/>
<script language="JavaScript" src="chrome://messenger/content/addressbook/abSelectAddressesDialog.js"/>
<script language="JavaScript" src="chrome://global/content/strres.js"/>
<script language="JavaScript" src="chrome://messenger/content/messengercompose/MsgComposeCommands.js"/>
<script language="JavaScript" src="chrome://global/content/globalOverlay.js"/>


	<keyset id="keyset"/>
	<popupset id="aTooltipSet"/>

	<!-- Thin box across top, show names containing & stop, search buttons -->
	<box align="horizontal" style="padding:0px; padding-top:2px; padding-bottom:2px">
		<text for="searchtext" tabindex="0" value="&search.label;"/>
		<textfield id="searchtext" flex="100%"/>
		
		<spring style="width: 1em;"/>
		
		<button id="stop" value="&stopButton.label;" class="dialog" disabled="true" oncommand="SelectAddressStopButton()"/>	
		<spring style="width:5px"/>
		<button id="search" value="&searchButton.label;" class="dialog" disabled="true" tooltip="aTooltip" tooltiptext="&addressPickerSearchButton.tooltip;" oncommand="SelectAddressSearchButton()"/>	
	</box>

	<!-- Main box, 3 pane and majority of buttons -->
	<box align="horizontal" flex="100%">
		<!-- 3 Pane box -->
		<box align="horizontal" flex="100%" style="border-top:solid black 1px; border-bottom:solid black 1px">
			
			<!-- dir tree -->
			<box align="horizontal" style="width:180px; height:100%; background-color:white; border-right:solid black 1px">
				<tree id="dirTree" style="height:100px; min-width:10px" flex="1"/>
			</box>
				
			<splitter collapse="before"/>

			<!-- Box that holds results pane, (to,cc,bcc buttons), and address bucket -->
			<box align="vertical" flex="100%" style="border-left:solid black 1px; border-right:solid black 1px">
				<!-- Box that holds results pane and (to,cc,bcc buttons) -->
				<box align="vertical" flex="100%">
					<!-- results tree -->
					<box flex="100%" align="vertical"
						 style="background-color:white; border-bottom:solid black 1px">
						<tree id="resultsTree" style="height:100px; min-width:10px" flex="1"/>
					</box>
					
					<!-- Box that holds (to,cc,bcc buttons) -->
					<box align="horizontal" style="padding:0.3em; border-bottom:solid black 1px; min-width:10px">
						<spring flex="50%"/>
						<button id="toButton" value="&toButton.label;" class="dialog" oncommand="SelectAddressToButton()"/>	
						<spring style="width:10px"/>
						<button id="ccButton" value="&ccButton.label;" class="dialog" oncommand="SelectAddressCcButton()"/>	
						<spring style="width:10px"/>
						<button id="bccButton" value="&bccButton.label;" class="dialog" oncommand="SelectAddressBccButton()"/>	
						<spring flex="50%"/>
					</box>
				</box>
				
				<splitter collapse="after"/>
				
				<!-- Address bucket -->
				<box align="vertical" style="height:170px; border-top:solid black 1px">
					<tree id="addressBucket" style="height:100px; min-width:10px" flex="1" multiple="true">
						<treecol style="width:100%"/>
						<treechildren id="bucketBody"/>
					</tree>
				</box>
				
			</box>
		</box>
		
		<!-- Box with buttons on right edge of window -->
		<box align="vertical" style="padding: .5em; padding-right: 0px">
			<box align="vertical" flex="50%">
				<spring style="height:10px"/>
				<button id="new" value="&newButton.label;" class="dialog" tooltip="aTooltip" tooltiptext="&addressPickerNewButton.tooltip;" oncommand="AbNewCard()"/>	
				<spring style="height:10px"/>
				<button id="edit" value="&editButton.label;" class="dialog" tooltip="aTooltip" tooltiptext="&addressPickerEditButton.tooltip;" oncommand="AbEditCard()"/>	
				<spring flex="100%"/>
			</box>
			<box align="vertical" flex="50%">
				<spring flex="50%"/>
				<button id="remove" value="&removeButton.label;" class="dialog" oncommand="RemoveSelectedFromBucket()"/>	
				<spring flex="50%"/>
			</box>
		</box>
	</box>

	<!-- OK & Cancel buttons -->
	<box id="okCancelButtons"/>

</window>
