<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/xul.css" type="text/css"?> 
<?xml-stylesheet href="chrome://editordlgs/skin/EditorDialog.css" type="text/css"?>
<!DOCTYPE window
[

<!-- These entity declarations will go into a separate, locale file at some point -->
<!-- Window title -->
<!ENTITY windowTitle.label "Horizontal Line Properties">

<!ENTITY dimensionsFieldset.label "Dimensions">
<!ENTITY heightEditField.label "Height">
<!ENTITY widthEditField.label "Width">
<!ENTITY pixelsPopup.value "pixels">
<!ENTITY percentPopup.value "percent">

<!ENTITY alignmentFieldset.label "Alignment">
<!ENTITY leftPopup.value "Left">
<!ENTITY centerPopup.value "Center">
<!ENTITY rightPopup.value "Right">

<!ENTITY threeDShading.label "3-D Shading">
<!ENTITY saveSettings.label "Save Settings">
<!ENTITY OKButton.label "OK">
<!ENTITY CancelButton.label "Cancel">
<!ENTITY advancedEditingButton.label "More Attributes...">

]>

<!-- dialog containing a control requiring initial setup -->
<xul:window class="dialog" title="&windowTitle.label;"
    xmlns:xul ="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
    xmlns="http://www.w3.org/TR/REC-html40"
    onload = "Startup()"
    align="vertical">


  <!-- Methods common to all editor dialogs -->
  <script language="JavaScript" src="chrome://editordlgs/content/EdDialogCommon.js">
  </script>
  <script language="JavaScript" src="chrome://editordlgs/content/EdHLineProps.js">
  </script>

  <table width="100%">
    <tr>
      <td colspan="2">
        <fieldset><legend align="left">&dimensionsFieldset.label;</legend>
          <table>
            <tr>
              <td align="right">
                <label for="height">&heightEditField.label;</label>
              </td>
              <td colspan="2">
                <input type="text" id="height" size="4" maxlength="4"
                    onkeypress="forceInteger('height')" />
                <label> &pixelsPopup.value; </label>
              </td>
            </tr>
            <tr>              
              <td>
                <label for="height">&widthEditField.label;</label>
              </td>
              <td>
                <input type="text" id="width" size="4" maxlength="4"
                    onkeypress="forceInteger('width')" />
              </td>
              <td>
                <xul:titledbutton class="popup PixelOrPercent" id="pixelOrPercentButton" value="&percentPopup.value;" align="left" popup="PixelOrPercentMenu" popupanchor="bottomleft"/>
              </td>
            </tr>
          </table>
        </fieldset>
      </td>
    </tr>
    <tr>
      <td colspan="2">
        <fieldset><legend align="left">&alignmentFieldset.label;</legend>
          <label><input type="radio" name="HRuleAlign" id="leftAlign"/>&leftPopup.value;</label>
          <label><input type="radio" name="HRuleAlign" id="centerAlign"/>&centerPopup.value;</label>
          <label><input type="radio" name="HRuleAlign" id="rightAlign"/>&rightPopup.value;</label>
        </fieldset>
      </td>
    </tr>
    <tr>
      <td>
        <label><input type="checkbox" id="3dShading"/>&threeDShading.label;</label>
      </td>
      <td align="right">
        <xul:titledbutton class="spaced" id="SaveDefault" onclick="onSaveDefault()" value="&saveSettings.label;"/>
      </td>
    </tr>
  </table>
  <hr width="100%"/>
  <xul:box>
    <xul:titledbutton class="spaced" id="Advanced" onclick="onAdvanced()" value="&advancedEditingButton.label;"/>
    <xul:spring flex="100%"/>    
    <xul:titledbutton class="spaced" id="OK" onclick="onOK()" value="&OKButton.label;"/>  
    <xul:titledbutton class="spaced" id="Cancel" onclick="onCancel()" value="&CancelButton.label;"/>
  </xul:box>

<xul:popup id="PixelOrPercentMenu">
  <xul:menu>
    <xul:menuitem name="&pixelsPopup.value;" onclick="SetPixelOrPercentByID('pixelOrPercentButton', '')"/>
    <xul:menuitem name="&percentPopup.value;" onclick="SetPixelOrPercentByID('pixelOrPercentButton', '%')"/>
  </xul:menu>
</xul:popup>

</xul:window>

