<?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-2000 Netscape Communications Corporation. All
   Rights Reserved.
   
   Contributor(s): 
  -->

<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/dialogOverlay.css" type="text/css"?>

<!DOCTYPE window SYSTEM "chrome://editor/locale/pref-editing.dtd">

<window xmlns:html="http://www.w3.org/1999/xhtml"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
        class="color-dialog"
        orient="vertical" 
        onload="parent.initPanel('chrome://editor/content/pref-editing.xul');">

  <script lanugage="JavaScript">
  <![CDATA[
   var _elementIDs = ["editorAuthor", "useCustomColors", "textData", "linkData", "aLinkData", "fLinkData", "backgroundColorData", "backgroundImageData"];
  ]]>
  </script>

  <script type="application/x-javascript" src="chrome://editor/content/pref-composer.js"/>
  <script type="application/x-javascript" src="chrome://editor/content/EdDialogCommon.js"/>
  <script type="application/x-javascript" src="chrome://global/content/strres.js" />

  <hbox class="box-smallheader" title="&lHeader;"/>

  <vbox>
    <text class="label small-margin" value="&authorName.label;"/>
    <hbox>
      <textbox id="editorAuthor" flex="1"
                 pref="true" preftype="string" prefstring="editor.author"
                 prefattribute="value"/>
      <spring flex="1"/>
    </hbox>
  </vbox>
  <spring class="smallspacer"/>
  <groupbox orient="vertical" autostretch="never">
    <label value="&pageColorHeader;"/> 
    <radiogroup id="useCustomColors" orient="vertical" autostretch="never"  
                pref="true" preftype="bool" prefstring="editor.use_custom_colors"
                prefattribute="value">
      <radio class="small-margin" group="useCustomColors" id="DefaultColorsRadio"
          value="false" 
          label="&defaultColorsRadio.label;" 
          accesskey="&defaultColors.accesskey;"
          oncommand="UseDefaultColors();"/>
      <radio class="small-margin" group="useCustomColors" id="CustomColorsRadio" 
          value="true" label="&customColorsRadio.label;"
          accesskey="&customColors.accesskey;" 
          oncommand="UseCustomColors()"/>
    </radiogroup>
    <hbox class="big-left-margin">
      <grid>
        <columns><column/><column/></columns>
        <rows>
          <row valign="middle" autostretch="never">
            <text class="label" id="Text" value="&normalText.label;&colon.character;" />
            <stack>
              <button id="TextButton" class="dialog color-button" oncommand="GetColorAndUpdate('textCW');"/>
              <hbox autostretch="never" valign="middle" mousethrough="always">
                <spring flex="1"/>
                <spring id="textCW" class="color-well"/>
                <spring flex="1"/>
              </hbox>
            </stack>
            <data id="textData" pref="true" preftype="color" prefstring="editor.text_color" prefattribute="value" wsm_attributes="value"/>
          </row>
          <row valign="middle" autostretch="never">
            <text class="label" id="Link" value="&linkText.label;&colon.character;" />
            <stack>
              <button id="LinkButton" class="dialog color-button" oncommand="GetColorAndUpdate('linkCW');"/>
              <hbox autostretch="never" valign="middle" mousethrough="always">
                <spring flex="1"/>
                <spring id="linkCW" class="color-well"/>
                <spring flex="1"/>
              </hbox>
            </stack>
            <data id="linkData" pref="true" preftype="color" prefstring="editor.link_color" prefattribute="value" wsm_attributes="value"/>
          </row>
          <row valign="middle" autostretch="never">
            <text class="label" id="Active" value="&activeLinkText.label;&colon.character;" />
            <stack>
              <button id="ActiveLinkButton" class="dialog color-button" oncommand="GetColorAndUpdate('activeCW');"/>
              <hbox autostretch="never" valign="middle" mousethrough="always">
                <spring flex="1"/>
                <spring id="activeCW" class="color-well"/>
                <spring flex="1"/>
              </hbox>
            </stack>
            <data id="aLinkData" pref="true" preftype="color" prefstring="editor.active_link_color" prefattribute="value" wsm_attributes="value"/>
          </row>
          <row valign="middle" autostretch="never">
            <text class="label" id="Visited" value ="&visitedLinkText.label;&colon.character;" />
            <stack>
              <button id="VisitedLinkButton" class="dialog color-button" oncommand="GetColorAndUpdate('visitedCW');"/>
              <hbox autostretch="never" valign="middle" mousethrough="always">
                <spring flex="1"/>
                <spring id="visitedCW" class="color-well"/>
                <spring flex="1"/>
              </hbox>
              <data id="fLinkData" pref="true" preftype="color" prefstring="editor.followed_link_color" prefattribute="value" wsm_attributes="value"/>
            </stack>
          </row>
          <row valign="middle" autostretch="never">
            <text class="label" id="Background" value="&background.label;" />
            <stack>
              <button id="BackgroundButton" class="dialog color-button" oncommand="GetColorAndUpdate('backgroundCW');"/>
              <hbox autostretch="never" valign="middle" mousethrough="always">
                <spring flex="1"/>
                <spring id="backgroundCW" class="color-well"/>
                <spring flex="1"/>
              </hbox>
            </stack>
            <data id="backgroundColorData" pref="true" preftype="color" prefstring="editor.background_color" prefattribute="value" wsm_attributes="value"/>
          </row>
        </rows>
      </grid>
      <vbox id="ColorPreview" flex="1">
        <spring flex="1"/>
        <text class="label larger" id="NormalText"      value="&normalText.label;"/>
        <spring flex="1"/>
        <text class="label larger" id="LinkText"        value="&linkText.label;"/>
        <spring flex="1"/>
        <text class="label larger" id="ActiveLinkText"  value="&activeLinkText.label;"/>
        <spring flex="1"/>
        <text class="label larger" id="VisitedLinkText" value="&visitedLinkText.label;"/>
        <spring flex="1"/>
      </vbox>
      <spring flex="1"/>
    </hbox>
    <spring class="spacer"/>
    <text class="label small-margin" value="&backgroundImage.label;" accesskey="&backgroundImage.accesskey;"/>
    <hbox valign="middle" autostretch="never">
      <textbox id="BackgroundImageInput" oninput="ChangeBackgroundImage();" style="min-width: 23em" flex="1">
        <observes element="backgroundImageData" attribute="disabled"/>
      </textbox>
      <button class="dialog" label="&chooseFile.label;" accesskey="&chooseFile.accesskey;"
              oncommand="ChooseImageFile()">
        <observes element="backgroundImageData" attribute="disabled"/>
      </button>
      <data id="backgroundImageData" pref="true" preftype="string" prefstring="editor.default_background_image" prefattribute="value"/>
    </hbox>
  </groupbox>
</window>
