(form "00684" (size 67 20)  
  (help "00684_TIP_0")
  (heading "POLYNOMIAL TRENDS")
  (label (position  1  3) (text "INPUT STRING FILE:"))
  (label (position  1  4) (text "Location"))
  (label (position  1  5) (text "Id Number"))
  (label (position  35  3) (text "BOUNDARY LIMIT STRING:"))
  (label (position  35  4) (text "Location"))
  (label (position  35  5) (text "Id Number"))
  (label (position  35  6) (text "String No."))
  (label (position  35  7) (text "Segment No."))

  (field "location" (position 12  4) (display_length 16) (input allowed)
    (null allowed) (max_length 26)
    (file (link "id") (extension "*.str"))
    (help "00684_TIP_1"))
  (field "id" (position 12  5) (display_length 16) (input allowed)
    (translate upper) (format real_8) (null disallowed) (max_length 16)
    (help "00684_TIP_2"))
  (field "b_location" (position 45  4) (display_length 16) (input allowed)
    (null allowed) (max_length 26)
    (file (link "b_id") (extension "*.str"))
    (help "00684_TIP_3"))
  (field "b_id" (position 45  5) (display_length 16) (input allowed)
    (translate upper) (format real_8) (null disallowed) (max_length 16)
    (help "00684_TIP_4"))
  (field "string_no" (position 45  6) (display_length 16) (input allowed)
    (translate upper) (format integer_4) (null disallowed) (max_length 16)
    (help "00684_TIP_5"))

  (field "seg_no" (position 45  7) (display_length 16) (input allowed)
    (translate upper) (format integer_4) (null disallowed) (max_length 16)
    (help "00684_TIP_6"))

  (label (position  1  9) (text "POLYNOMIAL SURFACE:"))

  (label (position  1  10) (text "Surface to fit"))
  (field "poly" (position 22  10) (display_length  15) (input allowed)
	    (value_in "PLANAR" "QUADRATIC" "CUBIC" 
                  "QUARTIC" "QUINTIC" "USER DEFINED")
    (translate upper) (null allowed) (max_length 15)
    (help "00684_TIP_7"))

  (field "max_x_field" (position  1  11) (display_length 15)
    (foreground (user_option "form_foreground"))
    (background) (input disallowed)
    (default "Maximum x power")
    (dependency (value "poly") == "USER DEFINED")
    (value_in "Maximum x power"))
  (field "max_x" (position 22 11) (display_length 3) (input allowed)
    (dependency (value "poly") == "USER DEFINED")
    (translate upper) (format integer_4) (low_bound 0) (high_bound 10)
    (null disallowed) (max_length 3)
    (help "00684_TIP_8"))

  (field "max_y_field" (position  1  12) (display_length 15)
    (foreground (user_option "form_foreground"))
    (background) (input disallowed)
    (default "Maximum y power")
    (dependency (value "poly") == "USER DEFINED")
    (value_in "Maximum y power"))
   (field "max_y" (position 22 12) (display_length 3) (input allowed)
    (dependency (value "poly") == "USER DEFINED")
    (translate upper) (format integer_4) (low_bound 0) (high_bound 10)
    (null disallowed) (max_length 3)
    (help "00684_TIP_9"))

   (field "max_total_field" (position  1  13) (display_length 18)
    (foreground (user_option "form_foreground"))
    (background) (input disallowed)
    (default "Maximum total power")
    (dependency (value "poly") == "USER DEFINED")
    (value_in "Maximum total power"))
   (field "max_total" (position 22 13) (display_length 3) (input allowed)
    (dependency (value "poly") == "USER DEFINED")
    (translate upper) (format integer_4) (low_bound 0) (high_bound 10)
    (null disallowed) (max_length 3)
   (help "00684_TIP_10"))


  (label (position  1  15) (text "OUTPUT DTM:"))
  (label (position  1  16) (text "Location"))
  (label (position  1  17) (text "Id Number"))
  (field "n_location" (position 12  16) (display_length 16) (input allowed)
    (null allowed) (max_length 26)
    (file output (link "n_id") (extension "*.dtm"))
    (help "00684_TIP_11"))
  (field "n_id" (position 12  17) (display_length 16) (input allowed)
    (translate upper) (format real_8) (null disallowed) (max_length 16)
    (help "00684_TIP_12"))

  (label (position 44  10) (text "Z or D field?"))

  (field "trend" (position 53  10) (display_length 1) (input allowed)
    (value_in "Z" "D")
    (null disallowed) (max_length 1) 
    (help "00684_TIP_13")
  )
  (field "field_label" 
    (position 44  11) 
    (display_length  10) 
    (foreground (user_option "form_foreground"))
    (background (user_option "form_background"))
    (input disallowed)
    (value_in "D field")
    (browser none)
    (default "D field")
    (dependency (value "trend") == "D") 
  )

  (field "dfield" (position 53  11) (display_length  3) (input allowed)
    (low_bound 1) (high_bound 100) 
    (format integer_4) (null disallowed) (max_length 3)
    (dependency (value "trend") == "D")
    (help "00671_TIP_5")
  )

  (label (position 44  12) (text "X resolution"))
  (field "x_res" (position 53  12) (display_length  3) (input allowed)
    (low_bound 1) (high_bound 500)
    (format integer_4) (null disallowed) (max_length 3)
    (help "00684_TIP_15")
   )

  (label (position 44  13) (text "Y resolution"))
  (field "y_res" (position 53  13) (display_length  3) (input allowed)
    (low_bound 1) (high_bound 500)
    (format integer_4) (null disallowed) (max_length 3)
    (help "00684_TIP_16")
  )

  (default_buttons)
)
