<?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): 

     Jason Eager <jce2@po.cwru.edu>
       -Added a syntax example for the "no proxy" field.
  -->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/dialogOverlay.css" type="text/css"?>

<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-proxies.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://communicator/content/pref/pref-proxies.xul');">

  <script type="application/x-javascript">
  <![CDATA[
    var _elementIDs = ["networkProxyType",
                       "networkProxyFTP", "networkProxyFTP_Port",
                       "networkProxyGopher", "networkProxyGopher_Port",
                       "networkProxyHTTP", "networkProxyHTTP_Port", 
                       "networkProxySOCKS", "networkProxySOCKS_Port",
                       "networkProxySOCKSVersion",
                       "networkProxySSL", "networkProxySSL_Port", 
                       "networkProxyNone", "networkProxyAutoconfigURL"];
  ]]>
  </script>
        
  <stringbundle id="bundle_prefutilities"
                src="chrome://pref/locale/prefutilities.properties"/>
  <script type="application/x-javascript" src="chrome://communicator/content/pref/pref-proxies.js"/>
  
  <hbox class="box-smallheader" title="&lHeader;"/>

  <groupbox orient="vertical">
    <label value="&proxyTitle.label;"/>

    <radiogroup id="networkProxyType" orient="vertical"
                pref="true" preftype="int" prefstring="network.proxy.type"
                prefattribute="value">
      <vbox align="start">
        <radio group="networkProxyType" value="0" label="&directTypeRadio.label;" accesskey="&directTypeRadio.accesskey;"                oncommand="DoEnabling();"/>
        <radio group="networkProxyType" value="1" label="&manualTypeRadio.label;" accesskey="&manualTypeRadio.accesskey;"                oncommand="DoEnabling();"/>
      </vbox>
      <grid class="indent" flex="1">
        <columns>
          <column/>
          <column flex="1"/>
        </columns>
        
        <rows>
          <row align="center">
            <hbox autostretch="never" align="right">
              <text class="label" value="&ftp.label;" accesskey="&ftp.accesskey;" for="networkProxyFTP"/>
            </hbox>
            <hbox align="center">
              <textbox id="networkProxyFTP" pref="true" preftype="string" prefstring="network.proxy.ftp"
                         prefattribute="value" flex="1"/>
              <text class="label" value="&port.label;" accesskey="&FTPport.accesskey;" for="networkProxyFTP_Port"/>
              <textbox id="networkProxyFTP_Port" pref="true" preftype="int" prefstring="network.proxy.ftp_port"
                         prefattribute="value" size="5"/>
            </hbox>
          </row>
          <row align="center">
            <hbox autostretch="never" align="right">
              <text class="label" value="&gopher.label;" accesskey="&gopher.accesskey;" for="networkProxyGopher"/>
            </hbox>
            <hbox align="center">
              <textbox id="networkProxyGopher" pref="true" preftype="string" prefstring="network.proxy.gopher"
                         prefattribute="value" flex="1"/>
              <!-- gopher port doesn't have an accesskey because the window needs a redesign - bbaetz -->
              <text class="label" value="&port.label;" accesskey="&gopherPort.accesskey;" for="networkProxyGopher_Port"/>
              <textbox id="networkProxyGopher_Port" pref="true" preftype="int" prefstring="network.proxy.gopher_port"
                         prefattribute="value" size="5"/>
            </hbox>
          </row>
          <row align="center">
            <hbox autostretch="never" align="right">
              <text class="label" value="&http.label;" accesskey="&http.accesskey;" for="networkProxyHTTP"/>
            </hbox>
            <hbox align="center">
              <textbox id="networkProxyHTTP" pref="true" preftype="string" prefstring="network.proxy.http"
                         prefattribute="value" flex="1"/>
              <text class="label" value="&port.label;" accesskey="&HTTPport.accesskey;" for="networkProxyHTTP_Port"/>
              <textbox id="networkProxyHTTP_Port" pref="true" preftype="int" prefstring="network.proxy.http_port"
                         prefattribute="value" size="5"/>
            </hbox>
          </row>
          <row align="center">
            <hbox autostretch="never" align="right">
              <text class="label" value="&ssl.label;" accesskey="&ssl.accesskey;" for="networkProxySSL"/>
            </hbox>
            <hbox align="center">
              <textbox id="networkProxySSL" pref="true" preftype="string" prefstring="network.proxy.ssl"
                         prefattribute="value" flex="1"/>
              <text class="label" value="&port.label;" accesskey="&SSLport.accesskey;" for="networkProxySSL_Port"/>
              <textbox id="networkProxySSL_Port" pref="true" preftype="int" prefstring="network.proxy.ssl_port"
                         prefattribute="value" size="5"/>
            </hbox>
          </row>
          <row align="center">
            <hbox autostretch="never" align="right">
              <text class="label" value="&socks.label;" accesskey="&socks.accesskey;" for="networkProxySOCKS"/>
            </hbox>
            <hbox align="center">
              <textbox id="networkProxySOCKS" pref="true" preftype="string" prefstring="network.proxy.socks"
                       prefattribute="value" flex="1"/>
            <text class="label" value="&port.label;" accesskey="&SOCKSport.accesskey;" for="networkProxySOCKS_Port"/>
              <textbox id="networkProxySOCKS_Port" pref="true" preftype="int" prefstring="network.proxy.socks_port"
                       prefattribute="value" size="5"/>
            </hbox>
          </row>
          <row>
            <spacer/>
            <radiogroup id="networkProxySOCKSVersion" orient="horizontal"
              pref="true" preftype="int" prefstring="network.proxy.socks_version"
              prefattribute="value">
                <radio group="networkProxySOCKSVersion" id="networkProxySOCKSVersion4" value="4" label="&socks4.label;" accesskey="&socks4.accesskey;" />
                <radio group="networkProxySOCKSVersion" id="networkProxySOCKSVersion5" value="5" label="&socks5.label;" accesskey="&socks5.accesskey;" />
            </radiogroup>
          </row>

          <row align="center"> 
            <hbox autostretch="never" align="right">
              <text class="label" value="&noproxy.label;" accesskey="&noproxy.accesskey;" for="networkProxyNone"/>
            </hbox>
            <textbox id="networkProxyNone" pref="true" preftype="string" prefstring="network.proxy.no_proxies_on"
                       prefattribute="value"/>
          </row>
          <row>
            <spacer/>
            <text class="label" value="&noproxyExplain.label;" for="networkProxyNone"/>
          </row>
        </rows>
      </grid>
      <hbox align="left">
        <radio group="networkProxyType" value="2" label="&autoTypeRadio.label;" accesskey="&autoTypeRadio.accesskey;"                        oncommand="DoEnabling();"/>
      </hbox>
      <hbox class="indent" flex="1">
        <textbox id="networkProxyAutoconfigURL" flex="1" 
                   pref="true" preftype="string" prefstring="network.proxy.autoconfig_url"
                   prefattribute="value"/>
        <button id="autoReload" class="dialog" label="&reload.label;" accesskey="&reload.accesskey;"
                oncommand="ReloadPAC();"
                pref="true" preftype="bool"
                prefstring="pref.advanced.proxies.disable_button.reload" prefattribute="disabled"/>
      </hbox>
    </radiogroup>

  </groupbox>

</window>

