<?xml version="1.0"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
   - License, v. 2.0. If a copy of the MPL was not distributed with this
   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->

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

<?xul-overlay href="chrome://communicator/content/utilityOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/tasksOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/contentAreaContextOverlay.xul"?>
<?xul-overlay href="chrome://messenger/content/addressbook/abResultsPaneOverlay.xul"?>
<?xul-overlay href="chrome://navigator/content/platformMailOverlay.xul"?>

<!DOCTYPE window [
<!ENTITY % abMainWindowDTD SYSTEM "chrome://messenger/locale/addressbook/abMainWindow.dtd" >
%abMainWindowDTD;
<!ENTITY % abResultsPaneOverlayDTD SYSTEM "chrome://messenger/locale/addressbook/abResultsPaneOverlay.dtd" >
%abResultsPaneOverlayDTD;
<!ENTITY % mailOverlayDTD SYSTEM "chrome://messenger/locale/mailOverlay.dtd">
%mailOverlayDTD;
<!ENTITY % messengerDTD SYSTEM "chrome://messenger/locale/messenger.dtd" >
%messengerDTD;
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
%brandDTD;
]>

<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:html="http://www.w3.org/1999/xhtml"
    id="addressbookWindow"
    height="450"
    width="750"
    title="&addressbookWindow.title;"
    lightweightthemes="true"
    lightweightthemesfooter="status-bar"
    windowtype="mail:addressbook"
    macanimationtype="document"
    drawtitle="true"
    persist="width height screenX screenY sizemode"
    toggletoolbar="true"
    onload="OnLoadAddressBook()"
    onunload="OnUnloadAddressBook()">

  <stringbundleset id="stringbundleset">
    <stringbundle id="bundle_addressBook" src="chrome://messenger/locale/addressbook/addressBook.properties"/>
    <stringbundle id="bundle_messenger" src="chrome://messenger/locale/messenger.properties"/>
    <stringbundle id="bundle_brand" src="chrome://branding/locale/brand.properties"/>
  </stringbundleset>

<script type="application/javascript" src="chrome://messenger/content/jsTreeView.js"/>
<script type="application/javascript" src="chrome://messenger/content/addressbook/abTrees.js"/>
<script type="application/javascript" src="chrome://messenger/content/accountUtils.js"/>
<script type="application/javascript" src="chrome://messenger/content/widgetglue.js"/>
<script type="application/javascript" src="chrome://messenger/content/addressbook/addressbook.js"/>
<script type="application/javascript" src="chrome://messenger/content/addressbook/abCommon.js"/>
<script type="application/javascript" src="chrome://communicator/content/contentAreaClick.js"/>
<script type="application/javascript" src="chrome://global/content/printUtils.js"/>
<script type="application/javascript" src="chrome://messenger/content/msgPrintEngine.js"/>
<script type="application/javascript" src="chrome://messenger/content/addressbook/abCardViewOverlay.js"/>

  <commandset id="addressBook">
    <commandset id="CommandUpdate_AddressBook"
                commandupdater="true"
                events="focus,addrbook-select"
                oncommandupdate="CommandUpdate_AddressBook()"/>
    <commandset id="selectEditMenuItems"/>
    <commandset id="undoEditMenuItems"/>
    <commandset id="globalEditMenuItems"/>
    <command id="cmd_newNavigator"/>
    <command id="cmd_newPrivateWindow"/>
    <command id="cmd_newEditor"/>
    <command id="cmd_newcard" oncommand="AbNewCard();"/>
    <command id="cmd_newlist" oncommand="AbNewList();"/>
    <command id="cmd_newMessage" oncommand="AbNewMessage();"/>
    <command id="cmd_newim" oncommand="AbIMSelected()"/>
    <command id="cmd_printSetup" oncommand="PrintUtils.showPageSetup()"/>
    <command id="cmd_printCard" oncommand="AbPrintCard()"/>
    <command id="cmd_printPreviewCard" oncommand="AbPrintPreviewCard()"/>
    <command id="cmd_printAddressBook" oncommand="AbPrintAddressBook()"/>
    <command id="cmd_printPreviewAddressBook" oncommand="AbPrintPreviewAddressBook()"/>
    <command id="cmd_close" oncommand="AbClose()"/>
    <command id="cmd_properties" oncommand="goDoCommand('cmd_properties');"/>
    <command id="cmd_undo"/>
    <command id="cmd_redo"/>
    <command id="cmd_copy"/>
    <command id="cmd_paste"/>
    <command id="cmd_cut"/>
    <command id="cmd_delete"
             valueAddressBook="&deleteAbCmd.label;"
             valueCard="&deleteContactCmd.label;"
             valueCards="&deleteContactsCmd.label;"
             valueList="&deleteListCmd.label;"
             valueLists="&deleteListsCmd.label;"
             valueItems="&deleteItemsCmd.label;"/>
    <command id="cmd_selectAll"/>
    <command id="button_delete" oncommand="goDoCommand('button_delete');"/>
    <command id="cmd_swapFirstNameLastName" oncommand="AbSwapFirstNameLastName()"/>
    <commandset id="tasksCommands"/>
  </commandset>

<broadcasterset id="abBroadcasters">
  <!-- Edit Menu -->
  <broadcaster id="Communicator:WorkMode"/>
</broadcasterset>

<broadcasterset id="mainBroadcasterSet"/>

<keyset id="tasksKeys">
  <!-- File Menu -->
  <key id="key_newNavigator"/>
  <key id="key_newPrivateWindow"/>
  <key id="key_newBlankPage"/>
  <key id="key_newMessage"
       key="&newMessageCmd.key;"
       command="cmd_newMessage"
       modifiers="accel"/>
  <key id="key_printCard" key="&printContactViewCmd.key;"
       command="cmd_printCard" modifiers="accel"/>
  <key id="key_close"/>
  <!-- Edit Menu -->
  <key id="key_delete"/>
  <key id="key_delete2"/> <!-- secondary delete key -->
  <key id="key_undo"/>
  <key id="key_redo"/>
  <key id="key_cut"/>
  <key id="key_copy"/>
  <key id="key_paste"/>
  <key id="key_selectAll"/>
  <key id="key_properties" key="&propertiesCmd.key;" command="cmd_properties" modifiers="accel"/>

  <!-- View Menu -->
  <key id="key_toggleDirectoryPane" oncommand="togglePaneSplitter('dirTree-splitter');"/>

  <!-- Tab/F6 Keys -->
  <key keycode="VK_TAB" oncommand="SwitchPaneFocus(event);" modifiers="control,shift"/>
  <key keycode="VK_TAB" oncommand="SwitchPaneFocus(event);" modifiers="control"/>
  <key keycode="VK_F6" oncommand="SwitchPaneFocus(event);" modifiers="control,shift"/>
  <key keycode="VK_F6" oncommand="SwitchPaneFocus(event);" modifiers="control"/>
  <key keycode="VK_F6" oncommand="SwitchPaneFocus(event);" modifiers="shift"/>
  <key keycode="VK_F6" oncommand="SwitchPaneFocus(event);"/>

  <!-- Search field -->
  <key key="&focusSearchInput.key;"
       modifiers="accel"
       oncommand="focusElement(document.getElementById('searchInput'));"/>

</keyset>

<menupopup id="dirTreeContext">
  <menuitem id="dirTreeContext-properties"
            label="&editItemButton.label;"
            accesskey="&editItemButton.accesskey;"
            command="cmd_properties"/>
  <menuseparator/>
  <menuitem id="dirTreeContext-newcard"
            label="&newContactButton.label;"
            accesskey="&newContactButton.accesskey;"
            command="cmd_newcard"/>
  <menuitem id="dirTreeContext-newlist"
            label="&newlistButton.label;"
            accesskey="&newlistButton.accesskey;"
            command="cmd_newlist"/>
  <menuseparator/>
  <menuitem id="dirTreeContext-delete"
            label="&deleteItemButton.label;"
            accesskey="&deleteItemButton.accesskey;"
            command="button_delete"/>
</menupopup>

<menupopup id="abResultsTreeContext">
  <menuitem id="abResultsTreeContext-properties"
            label="&editItemButton.label;"
            accesskey="&editItemButton.accesskey;"
            command="cmd_properties"/>
  <menuseparator/>
  <menuitem id="abResultsTreeContext-newmessage"
            label="&newmsgButton.label;"
            accesskey="&newmsgButton.accesskey;"
            command="cmd_newMessage"/>
  <menuitem id="abResultsTreeContext-newim"
            label="&newimButton.label;"
            accesskey="&newimButton.accesskey;"
            command="cmd_newim"/>
  <menuseparator/>
  <menuitem id="abResultsTreeContext-delete"
            label="&deleteItemButton.label;"
            accesskey="&deleteItemButton.accesskey;"
            command="button_delete"/>
</menupopup>

<menupopup id="toolbar-context-menu"/>

<vbox id="titlebar"/>

<toolbox id="ab-toolbox"
         mode="full"
         defaultmode="full"
         class="toolbox-top">
  <toolbar type="menubar"
           id="addrbook-toolbar-menubar2"
           class="chromeclass-menubar"
           persist="collapsed"
           grippytooltiptext="&menuBar.tooltip;"
           customizable="true"
           defaultset="menubar-items"
           mode="icons"
           iconsize="small"
           defaultmode="icons"
           defaulticonsize="small"
           context="toolbar-context-menu">
    <toolbaritem id="menubar-items"
                 class="menubar-items"
                 align="center">
      <menubar id="ab-menubar">
        <menu id="menu_File">
          <menupopup id="menu_FilePopup">
            <menu id="menu_New">
              <menupopup id="menu_NewPopup">
                <menuitem id="menu_newContact"
                          label="&newContact.label;"
                          accesskey="&newContact.accesskey;"
                          oncommand="AbNewCard();"/>
                <menuitem id="menu_newList"
                          label="&newListCmd.label;"
                          accesskey="&newListCmd.accesskey;"
                          command="cmd_newlist"/>
                <menuitem id="menu_newAddrbook"
                          label="&newAddressBookCmd.label;"
                          accesskey="&newAddressBookCmd.accesskey;"
                          oncommand="AbNewAddressBook();"/>
                <menuitem id="addLDAP"
                          label="&newLDAPDirectoryCmd.label;"
                          accesskey="&newLDAPDirectoryCmd.accesskey;"
                          oncommand="AbNewLDAPDirectory();"/>
                <menuseparator/>
                <menuitem id="menu_newNavigator"/>
                <menuitem id="menu_newPrivateWindow"/>
                <menuitem id="menu_newMessage"
                          label="&newMessageCmd.label;"
                          accesskey="&newMessageCmd.accesskey;"
                          key="key_newMessage"
                          command="cmd_newMessage"/>
                <menuitem id="menu_newEditor"/>
              </menupopup>
            </menu>
            <menuitem id="menu_close"/>
            <menuseparator/>
            <menuitem id="menu_printSetup"/>
            <menuitem id="printPreviewMenuItem"
                      label="&printPreviewContactViewCmd.label;"
                      accesskey="&printPreviewContactViewCmd.accesskey;"
                      command="cmd_printPreviewCard"/>
            <menuitem id="printPreviewAddressBook"
                      label="&printPreviewAddressBook.label;"
                      accesskey="&printPreviewAddressBook.accesskey;"
                      command="cmd_printPreviewAddressBook"/>
            <menuitem id="printMenuItem" label="&printContactViewCmd.label;"
                      accesskey="&printContactViewCmd.accesskey;"
                      key="key_printCard"
                      command="cmd_printCard"/>
            <menuitem id="printAddressBook"
                      label="&printAddressBook.label;"
                      accesskey="&printAddressBook.accesskey;"
                      command="cmd_printAddressBook"/>
          </menupopup>
        </menu>

        <menu id="menu_Edit">
          <menupopup id="menu_EditPopup">
            <menuitem id="menu_undo"/>
            <menuitem id="menu_redo"/>
            <menuseparator/>
            <menuitem id="menu_cut"/>
            <menuitem id="menu_copy"/>
            <menuitem id="menu_paste"/>
            <menuitem id="menu_delete"/>
            <menuseparator/>
            <menuitem id="menu_selectAll"/>
            <menuseparator/>
            <!-- LOCALIZATION NOTE: set "hideSwapFnLnUI" to false in .dtd to enable the UI -->
            <menuitem label="&swapFirstNameLastNameCmd.label;"
                      accesskey="&swapFirstNameLastNameCmd.accesskey;"
                      hidden="&hideSwapFnLnUI;"
                      command="cmd_swapFirstNameLastName"/>
            <menuitem label="&propertiesCmd.label;"
                      accesskey="&propertiesCmd.accesskey;"
                      key="key_properties"
                      command="cmd_properties"/>
            <menuitem id="menu_preferences"
                      oncommand="goPreferences('addressing_pane')"/>
          </menupopup>
        </menu>
        <menu id="menu_View">
          <menupopup id="menu_View_Popup">
            <menu id="menu_Toolbars">
              <menupopup id="view_toolbars_popup"
                         onpopupshowing="onViewToolbarsPopupShowing(event);"
                         oncommand="onViewToolbarCommand(event);">
                <menuitem id="menu_showTaskbar"/>
              </menupopup>
            </menu>
            <menu id="menu_Layout"
                  label="&layoutMenu.label;"
                  accesskey="&layoutMenu.accesskey;">
              <menupopup id="view_layout_popup"
                         onpopupshowing="InitViewLayoutMenuPopup(event);">
                <menuitem id="menu_showDirectoryPane"
                          label="&showDirectoryPane.label;"
                          key="key_toggleDirectoryPane"
                          accesskey="&showDirectoryPane.accesskey;"
                          oncommand="togglePaneSplitter('dirTree-splitter');"
                          checked="true"
                          type="checkbox"/>
                <menuitem id="menu_showCardPane"
                          label="&showContactPane2.label;"
                          accesskey="&showContactPane2.accesskey;"
                          oncommand="togglePaneSplitter('results-splitter');"
                          checked="true"
                          type="checkbox"/>
              </menupopup>
            </menu>
            <menuseparator id="viewMenuAfterLayoutSeparator"/>
                <menu id="menu_ShowNameAs" label="&menu_ShowNameAs.label;" accesskey="&menu_ShowNameAs.accesskey;">
                    <menupopup id="menuShowNameAsPopup">
                        <menuitem type="radio" name="shownameas"
                                  id="firstLastCmd"
                  label="&firstLastCmd.label;"
                                  accesskey="&firstLastCmd.accesskey;"
                                  oncommand="SetNameColumn('firstLastCmd')"/>
                        <menuitem type="radio" name="shownameas"
                                  id="lastFirstCmd"
                  label="&lastFirstCmd.label;"
                                  accesskey="&lastFirstCmd.accesskey;"
                                  oncommand="SetNameColumn('lastFirstCmd')"/>
                        <menuitem type="radio" name="shownameas"
                                  id="displayNameCmd"
                  label="&displayNameCmd.label;"
                                  accesskey="&displayNameCmd.accesskey;"
                                  oncommand="SetNameColumn('displayNameCmd')"/>
                    </menupopup>
                </menu>
        <menu id="sortMenu" label="&sortMenu.label;" accesskey="&sortMenu.accesskey;">
                    <menupopup id="sortMenuPopup" onpopupshowing="InitViewSortByMenu()">
            <menuitem label="&GeneratedName.label;"
                                  id="cmd_SortByGeneratedName"
                                  accesskey="&GeneratedName.accesskey;"
                                  oncommand="SortResultPane('GeneratedName');" name="sortas" type="radio" checked="true"/>
            <menuitem label="&PrimaryEmail.label;"
                                  id="cmd_SortByPrimaryEmail"
                                  accesskey="&PrimaryEmail.accesskey;"
                                  oncommand="SortResultPane('PrimaryEmail');" name="sortas" type="radio" checked="true"/>
            <menuitem label="&ScreenName.label;"
                                  id="cmd_SortBy_AimScreenName"
                                  accesskey="&ScreenName.accesskey;"
                                  oncommand="SortResultPane('_AimScreenName');" name="sortas" type="radio" checked="true"/>
            <menuitem label="&Company.label;"
                                  id="cmd_SortByCompany"
                                  accesskey="&Company.accesskey;"
                                  oncommand="SortResultPane('Company');" name="sortas" type="radio" checked="true"/>
            <!-- LOCALIZATION NOTE:
             Fields for phonetic are disabled as default and can be enabled by
             editing "mail.addr_book.show_phonetic_fields"
             -->
            <menuitem label="&_PhoneticName.label;"
                                  id="cmd_SortBy_PhoneticName"
                                  hidden="true"
                                  accesskey="&_PhoneticName.accesskey;"
                                  oncommand="SortResultPane('_PhoneticName');" name="sortas" type="radio" checked="true"/>
            <menuitem label="&NickName.label;"
                                  id="cmd_SortByNickName"
                                  accesskey="&NickName.accesskey;"
                                  oncommand="SortResultPane('NickName');" name="sortas" type="radio" checked="true"/>
            <menuitem label="&SecondEmail.label;"
                                  id="cmd_SortBySecondEmail"
                                  accesskey="&SecondEmail.accesskey;"
                                  oncommand="SortResultPane('SecondEmail');" name="sortas" type="radio" checked="true"/>
            <menuitem label="&Department.label;"
                                  id="cmd_SortByDepartment"
                                  accesskey="&Department.accesskey;"
                                  oncommand="SortResultPane('Department');" name="sortas" type="radio" checked="true"/>
            <menuitem label="&JobTitle.label;"
                                  id="cmd_SortByJobTitle"
                                  accesskey="&JobTitle.accesskey;"
                                  oncommand="SortResultPane('JobTitle');" name="sortas" type="radio" checked="true"/>
            <menuitem label="&CellularNumber.label;"
                                  id="cmd_SortByCellularNumber"
                                  accesskey="&CellularNumber.accesskey;"
                                  oncommand="SortResultPane('CellularNumber');" name="sortas" type="radio" checked="true"/>
            <menuitem label="&PagerNumber.label;"
                                  id="cmd_SortByPagerNumber"
                                  accesskey="&PagerNumber.accesskey;"
                                  oncommand="SortResultPane('PagerNumber');" name="sortas" type="radio" checked="true"/>
            <menuitem label="&FaxNumber.label;"
                                  id="cmd_SortByFaxNumber"
                                  accesskey="&FaxNumber.accesskey;"
                                  oncommand="SortResultPane('FaxNumber');" name="sortas" type="radio" checked="true"/>
            <menuitem label="&HomePhone.label;"
                                  id="cmd_SortByHomePhone"
                                  accesskey="&HomePhone.accesskey;"
                                  oncommand="SortResultPane('HomePhone');" name="sortas" type="radio" checked="true"/>
            <menuitem label="&WorkPhone.label;"
                                  id="cmd_SortByWorkPhone"
                                  accesskey="&WorkPhone.accesskey;"
                                  oncommand="SortResultPane('WorkPhone');" name="sortas" type="radio" checked="true"/>
            <menuseparator/>
            <menuitem id="sortAscending" type="radio" name="sortdirection" label="&sortAscending.label;" accesskey="&sortAscending.accesskey;" oncommand="AbSortAscending()"/>
            <menuitem id="sortDescending" type="radio" name="sortdirection" label="&sortDescending.label;" accesskey="&sortDescending.accesskey;" oncommand="AbSortDescending()"/>
                    </menupopup>
                </menu>
            </menupopup>
        </menu>
        <menu id="tasksMenu">
          <menupopup id="taskPopup">
            <menuitem label="&searchAddressesCmd.label;"
                      accesskey="&searchAddressesCmd.accesskey;"
                      id="menu_search_addresses"
                      oncommand="onAdvancedAbSearch();"/>
            <menuitem label="&importCmd.label;" accesskey="&importCmd.accesskey;" oncommand="toImport()"/>
            <menuitem label="&exportCmd.label;"
                      accesskey="&exportCmd.accesskey;"
                      oncommand="AbExportSelection();"/>
            <menuseparator/>
          </menupopup>
        </menu>

        <menu id="windowMenu"/>
        <menu id="menu_Help"/>
        <spacer flex="1"/>
      </menubar>
    </toolbaritem>
  </toolbar>
  <toolbar class="chromeclass-toolbar toolbar-primary"
           id="ab-bar2"
           persist="collapsed"
           customizable="true"
           grippytooltiptext="&addressbookToolbar.tooltip;"
           toolbarname="&showAbToolbarCmd.label;"
           accesskey="&showAbToolbarCmd.accesskey;"
           defaultset="button-newcard,button-newlist,separator,button-editcard,button-newmessage,button-newim,button-abdelete,spring,searchBox,throbber-box"
           context="toolbar-context-menu">
    <toolbarbutton id="button-newcard"
                   class="toolbarbutton-1"
                   label="&newContactButton.label;"
                   tooltiptext="&newContactButton.tooltip;"
                   removable="true"
                   oncommand="AbNewCard();"/>
    <toolbarbutton id="button-newlist"
                   class="toolbarbutton-1"
                   label="&newlistButton.label;"
                   tooltiptext="&newlistButton.tooltip;"
                   removable="true"
                   command="cmd_newlist"/>
    <toolbarbutton id="button-editcard"
                   class="toolbarbutton-1"
                   label="&editItemButton.label;"
                   tooltiptext="&editItemButton.tooltip;"
                   removable="true"
                   command="cmd_properties"/>
    <toolbarbutton id="button-newmessage"
                   class="toolbarbutton-1"
                   label="&newmsgButton.label;"
                   tooltiptext="&newmsgButton.tooltip;"
                   removable="true"
                   oncommand="AbNewMessage();"/>
    <toolbarbutton id="button-newim"
                   class="toolbarbutton-1"
                   label="&newIM.label;"
                   tooltiptext="&newIM.tooltip;"
                   removable="true"
                   oncommand="AbIMSelected();"/>
    <toolbarbutton id="button-abdelete"
                   class="toolbarbutton-1"
                   label="&deleteItemButton.label;"
                   tooltiptext="&deleteItemButton.tooltip;"
                   removable="true"
                   oncommand="goDoCommand('button_delete');"/>
    <toolbaritem id="searchBox"
                 flex="1"
                 title="&searchBox.title;"
                 removable="true"
                 align="center"
                 class="toolbaritem-noline chromeclass-toolbar-additional">
      <textbox id="searchInput"
               flex="1"
               type="search"
               aria-controls="abResultsTree"
               placeholder="&searchNameAndEmail.placeholder;"
               clickSelectsAll="true"
               oncommand="onEnterInSearchBar();"
               onkeypress="if (event.keyCode == KeyEvent.DOM_VK_RETURN) this.select();"/>
    </toolbaritem>

    <toolbaritem id="throbber-box"
                 class="toolbaritem-noline"
                 removable="true"
                 align="center">
      <button id="navigator-throbber"
              oncommand="goClickThrobber('addressbook.throbber.url', event)"
              onclick="checkForMiddleClick(this, event);"
              tooltiptext="&throbber.tooltip;"/>
    </toolbaritem>
  </toolbar>
  <toolbarpalette id="AbToolbarPalette"/>
  <toolbarset id="customToolbars" context="toolbar-context-menu"/>
</toolbox>

  <!-- The main address book three pane -->
  <hbox flex="1">
    <vbox id="dirTreeBox" persist="width collapsed">
      <tree id="dirTree"
            class="abDirectory plain"
            seltype="single"
            style="min-width: 150px;"
            flex="1"
            persist="width"
            hidecolumnpicker="true"
            context="dirTreeContext"
            onselect="DirPaneSelectionChange(); document.commandDispatcher.updateCommands('addrbook-select');"
            ondblclick="DirPaneDoubleClick(event);"
            onclick="DirPaneClick(event);"
            onblur="goOnEvent(this, 'blur');">
        <treecols>
          <treecol id="DirCol"
                   flex="1"
                   primary="true"
                   label="&dirTreeHeader.label;"
                   crop="center"
                   persist="width"/>
        </treecols>
        <treechildren/>
      </tree>
    </vbox>

    <splitter id="dirTree-splitter" collapse="before" persist="state">
      <grippy/>
    </splitter>

    <vbox flex="1" style="min-width:100px">

      <!-- results pane -->
      <tree id="abResultsTree" context="abResultsTreeContext" flex="1" />

      <splitter id="results-splitter" collapse="after" persist="state">
        <grippy/>
      </splitter>

      <!-- card view -->
      <hbox id="CardViewOuterBox" flex="1" persist="height">
        <vbox id="CardViewBox"
              flex="1"
              style="height:170px; min-height:1px; min-width:1px">
          <vbox id="CardViewInnerBox" collapsed="true" flex="1">
            <description id="CardTitle"/>
            <hbox style="width:100%" flex="1">
              <vbox id="cvbPhoto"
                    class="cardViewGroup"
                    align="center"
                    style="min-width: 10ch; max-width: 10ch;">
                <image id="cvPhoto" style="max-width: 10ch; max-height: 10ch;"/>
              </vbox>
              <vbox flex="1">
                <vbox id="cvbContact" class="cardViewGroup">
                  <description class="CardViewHeading" id="cvhContact">&contact.heading;</description>
                  <description class="CardViewLink" id="cvListNameBox">
                    <html:p><html:a href="" id="cvListName"/></html:p>
                  </description>
                  <description class="CardViewText" id="cvDisplayName"/>
                  <description class="CardViewText" id="cvNickname"/>
                  <description class="CardViewLink" id="cvEmail1Box">
                    <html:a href="" id="cvEmail1"/>
                  </description>
                  <description class="CardViewLink" id="cvEmail2Box">
                    <html:a href="" id="cvEmail2"/>
                  </description>
                  <description class="CardViewLink" id="cvScreennameBox">
                    <html:a href="" id="cvScreenname"/>
                  </description>
                </vbox>
                <vbox id="cvbHome" class="cardViewGroup">
                  <description class="CardViewHeading" id="cvhHome">&home.heading;</description>
                  <hbox>
                    <vbox flex="1">
                      <description class="CardViewText" id="cvHomeAddress"/>
                      <description class="CardViewText" id="cvHomeAddress2"/>
                      <description class="CardViewText" id="cvHomeCityStZip"/>
                      <description class="CardViewText" id="cvHomeCountry"/>
                    </vbox>
                    <vbox id="cvbHomeMapItBox" pack="end">
                      <button id="cvHomeMapIt"
                              label="&mapItButton.label;"
                              type="menu-button"
                              oncommand="openLinkWithUrl(this.firstChild.mapURL);"
                              tooltiptext="&mapIt.tooltip;">
                        <menupopup class="map-list"/>
                      </button>
                    </vbox>
                  </hbox>
                  <description class="CardViewLink" id="cvHomeWebPageBox">
                    <html:a onclick="return openLink(event);"
                            href=""
                            id="cvHomeWebPage"/>
                  </description>
                </vbox>
                <vbox id="cvbOther" class="cardViewGroup">
                  <description class="CardViewHeading" id="cvhOther">&other.heading;</description>
                  <description class="CardViewText" id="cvBirthday"/>
                  <description class="CardViewText" id="cvCustom1"/>
                  <description class="CardViewText" id="cvCustom2"/>
                  <description class="CardViewText" id="cvCustom3"/>
                  <description class="CardViewText" id="cvCustom4"/>
                  <description class="CardViewText" id="cvNotes"
                               style="white-space: pre-wrap;"/>
                  <hbox>
                    <image id="cvBuddyIcon"/>
                  </hbox>
                </vbox>
                <!-- the description and addresses groups are only for
                      mailing lists -->
                <vbox id="cvbDescription" class="cardViewGroup">
                  <description class="CardViewHeading" id="cvhDescription">&description.heading;</description>
                  <description class="CardViewText" id="cvDescription"/>
                </vbox>
                <vbox id="cvbAddresses" class="cardViewGroup">
                  <description class="CardViewHeading" id="cvhAddresses">&addresses.heading;</description>
                  <vbox id="cvAddresses"/>
                </vbox>
              </vbox>

              <spacer style="width:20px"/>

              <vbox flex="1">
                <vbox id="cvbPhone" class="cardViewGroup">
                  <description class="CardViewHeading" id="cvhPhone">&phone.heading;</description>
                  <description class="CardViewText" id="cvPhWork"/>
                  <description class="CardViewText" id="cvPhHome"/>
                  <description class="CardViewText" id="cvPhFax"/>
                  <description class="CardViewText" id="cvPhCellular"/>
                  <description class="CardViewText" id="cvPhPager"/>
                </vbox>
                <vbox id="cvbWork" class="cardViewGroup">
                  <description class="CardViewHeading" id="cvhWork">&work.heading;</description>
                  <description class="CardViewText" id="cvJobTitle"/>
                  <description class="CardViewText" id="cvDepartment"/>
                  <description class="CardViewText" id="cvCompany"/>
                  <hbox>
                    <vbox flex="1">
                      <description class="CardViewText" id="cvWorkAddress"/>
                      <description class="CardViewText" id="cvWorkAddress2"/>
                      <description class="CardViewText" id="cvWorkCityStZip"/>
                      <description class="CardViewText" id="cvWorkCountry"/>
                    </vbox>
                    <vbox id="cvbWorkMapItBox" pack="end">
                      <button id="cvWorkMapIt"
                              label="&mapItButton.label;"
                              type="menu-button"
                              oncommand="openLinkWithUrl(this.firstChild.mapURL);"
                              tooltiptext="&mapIt.tooltip;">
                        <menupopup class="map-list"/>
                      </button>
                    </vbox>
                  </hbox>
                  <description class="CardViewLink" id="cvWorkWebPageBox">
                    <html:a onclick="return openLink(event);"
                            href=""
                            id="cvWorkWebPage"/>
                  </description>
                </vbox>
              </vbox>
            </hbox>
          </vbox>
        </vbox>
      </hbox>
    </vbox>
  </hbox>

  <panel id="customizeToolbarSheetPopup"/>
  <statusbar id="status-bar" class="chromeclass-status">
    <statusbarpanel id="component-bar"/>
    <statusbarpanel id="statusText" flex="1" value="&statusText.label;"/>
    <statusbarpanel id="offline-status" class="statusbarpanel-iconic"/>
  </statusbar>
</window>
