anchor.diff:  <%--<title>Set up Period ${period.name} of ${studySegment.qualifiedName} in ${study.name}</title>--%>
   <tags:includeScriptaculous/>
   <script type="text/javascript">
  -var activitiesByType = { }
  -<c:forEach items="${activityTypes}" var="activityType">
  -activitiesByType[${activityType.id}] = []
  -</c:forEach>
  -<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() {
               return $$('.input-row').length;
           }
  -
  -function highlightNonZero(source) {
  -    var input;
  -    if (source.tagName) {
  -        input = source;
  -    } else {
  -        input = Event.findElement(source, "INPUT")
  -    }
  -    var cell = input.parentNode
  -    var value = $F(input)
  -    var nonzero;
  -    if (value == null) {
  -        Element.removeClassName(cell, "nonzero")
  -    } else {
  -        Element.addClassName(cell, "nonzero")
  -    }
  -}
   
   function selectedActivity() {
       return selectedValue('add-activity')
  
positive.code:     var activityInput = Builder.node("input", { id: activityName, name: activityName, type: 'hidden', value: activity.id })
      cells.push(Builder.node('th', {className: 'activity'}, activity.name), [activityInput]);
  
  
  
      // input cells
      for (var i = 0; i < dayCount; i++) {
          var name = 'grid[' + rowCount + '].eventIds[' + i + ']'
  
negative.code:     return true;
  }
  
  function registerHandlers() {
      $$('.input-row td.conditional').each(function(cell) {
          var input = cell.getElementsByTagName("INPUT")[0]
  