var Documentation = Class.create({
    initialize: function(formId) {
      this.formId = formId;
      Event.observe($(this.formId + ':documentation'), 'change', this.toggleDocumentation.bindAsEventListener(this));
      this.toggleDocumentation();
    },
    toggleDocumentation: function(e) {
      var doc = $(this.formId + ':documentation');
      $(this.formId + ':address1').disabled = !doc.checked;
      $(this.formId + ':address2').disabled = !doc.checked;
      $(this.formId + ':address3').disabled = !doc.checked;
      $(this.formId + ':postalCode').disabled = !doc.checked;
      $(this.formId + ':city').disabled = !doc.checked;
    }
});
