<?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.
   - 
   - Contributor(s): 
  -->

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

<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?> 
<?xul-overlay href="chrome://editor/content/EdDialogOverlay.xul"?> 

<!DOCTYPE window SYSTEM "chrome://editor/locale/EditorInsertTable.dtd">

<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://editor/content/EdDialogCommon.js"/>
  <script language="JavaScript" src="chrome://editor/content/EdInsertTable.js"/>
  <script language="JavaScript" src="chrome://global/content/dialogOverlay.js"/>

  <xul:broadcaster id="args" value=""/>
  <xul:keyset id="keyset"/>

  <table>
    <tr>
      <td align="right">
        <label for="rows"> &numRowsEditField.label; </label>
      </td>
      <td collspan="2">
        <input type="text" id="rows" maxlength="4" size="4"
            onkeyup="forceInteger('rows')" />
      </td>
    </tr>
    <tr>
      <td align="right">
        <label for="columns"> &numColumnsEditField.label; </label>
      </td>
      <td collspan="2">
        <input type="text" id="columns" maxlength="4" size="4"
            onkeyup="forceInteger('columns')" />
      </td>
    </tr>
    <tr>
      <td align="right">
        <label for="width" > &widthEditField.label; </label>
      </td>
      <td>
        <input type="text" id="width" size="4" maxlength="4"
            onkeyup="forceInteger('width')" />
      </td>
      <td>
        <select id="pixelOrPercentSelect" size="1"/>
        <!-- option elements are appended by JS -->
      </td>
    </tr>
    <tr>
      <td align="right">
        <label for="border"> &borderEditField.label; </label>
      </td>
      <td>
        <input type="text" id="borderInput" size="4" onkeyup="forceInteger('borderInput')"/>
      </td>
      <!-- THIS IS DUMB Can't figure out how to put "pixels" after the 
           input box and make them center vertically. Used another TD instead -->
      <td>
        <div>&pixelsPopup.value;</div>
      </td>
    </tr>
  </table>
  <xul:spring class="spacer"/>
  <!-- from EdDialogOverlay -->
  <xul:box id="AdvancedEdit"/>
  <!-- from global dialogOverlay -->
	<xul:box id="okCancelButtons"/> 

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

</xul:window>
