anchor.diff:                                  :after_close => "check_due_date(
                                                       $F('remark_due_date'))",
                                   :year_range => 0.years.ago..1.years.from_now,
  -                                :id => "remark_due_date"} ) %>
  +                                :id => "remark_due_date",
  +                                :onchange => "set_onbeforeunload(true);"  } ) %>
       <%= observe_field "remark_due_date",
                         :function => "check_due_date($F('remark_due_date'));" %>
       <%=t(:iso_due_date_format_example)%><br />
       <%= raw( f.label("remark_message",
                   I18n.t("assignment.remark.message"),
                   :class => "textbox_label") ) %>
  -    <%= raw( f.text_area :remark_message, :rows => 8, :cols => 65 ) %>
  -  </p>
  -</fieldset>
  -
  -<%= f.submit t(:submit) %>
  +    <%= raw( f.text_area  :remark_message, 
  +                          :rows => 8, 
  +                          :cols => 65, 
  +                          :onchange => "set_onbeforeunload(true);" ) %>
  +  </p>
  +</fieldset>
  +
  +<%= f.submit t( :submit,
  +                :onclick => "set_onbeforeunload(false);" ) %>
   <% end %>
   
   </div>
  
positive.code:         </div>
        </div>
      <% end %>
      <%= raw( f.label :due_date, t(:due_date) ) %>
  
      <%# TODO update the global due date with the first due date added. %>
  
  
negative.code:    <%= t(:iso_due_date_format_example) %><br />
  
     <%= raw( f.label :repository_folder, t(:repository_folder) ) %>
     /<%= raw( f.text_field :repository_folder, :onchange => "set_onbeforeunload(true);" ) %><br />
     <%= raw( f.label :allow_web_submits, t("assignment.allow_web_submits") ) %>&nbsp;&nbsp;
     <%= raw( f.radio_button :allow_web_submits,
                        true,
                        :checked => @assignment.allow_web_submits,
                        :onchange => "set_onbeforeunload(true);" ) %>
     <%= raw( f.label :allow_web_submits_true,
                 t("answer_yes"), :class => "radio_label" ) %>&nbsp;&nbsp;
     <%= raw( f.radio_button :allow_web_submits,
                        false,
                        :checked => !@assignment.allow_web_submits, 
                        :onchange => "set_onbeforeunload(true);" ) %>
     <%= raw( f.label :allow_web_submits_false,
                 t("answer_no"),
                 :class => "radio_label" )  %><br />
  