anchor.diff:  <c:forEach items="${activities}" var="activity">
   activitiesByType[${activity.type.id}].push({ name: '${activity.name}', id: ${activity.id} })
   </c:forEach>
  +var activitiesAutocompleter;
   var initiallySelectedActivity = ${empty selectedActivity ? 0 : selectedActivity.id}
   
           function currentActivityCount() {
  
positive.code:         registerCellInputHandlers(input)
      });
      Event.observe('add-activity-button', 'click', addActivityRow)
  //    Event.observe('return-to-template', 'click', returnToTemplate)
  }
  
  
negative.code:                 <a id="newActivityLink" href="<c:url value="/pages/newActivity?returnToPeriodId=${period.id}"/>">Create new activity</a> <span id="new-activities-link-separator">or</span>
                  <a id="importActivitiesLink" href="<c:url value="/pages/cal/import/activities?returnToPeriodId=${period.id}"/>">Import activities from xml</a>
               </div>
  
               <input align="right" type="button" name="action" value="Return to template" onclick="location.href='<c:url value="/pages/cal/template?studySegment=${studySegment.id}&study=${study.id}&amendment=${study.developmentAmendment.id}"/>'" />
          </form:form>
  