anchor.diff:          name: name,
           value: 'true'
       });
  -    registerCellInputHandlers(input)
       cells.push(Builder.node('td', {}, [input]))
   
       // conditionalDetails
  
positive.code:     return '<c:url value="/pages/cal/managePeriod/update"/>'
  }
  
  function executeActivityMove(row, fromCol, toCol) {
      var href = '<c:url value="/pages/cal/managePeriod/move"/>';
      // Set up data variable
      var data = { }
      data.id = '${period.id}'
      addInfoFromEventTextbox(data, false, row, toCol)
  
      data.activity = $('grid[' + row + '].activity').value;
      var eventIds = 'grid[' + row + '].eventIds';
  
      var fromElementId = eventIds + '[' + fromCol + ']';
      if ($(fromElementId).getAttribute('value') != null) {
          data['eventIds[' + fromCol + ']'] = $(fromElementId).getAttribute('value');
      }
      data.rowNumber = row;
  
      var details1 = 'grid[' + row + '].conditionalDetails';
      data.conditionalDetails = $(details1).value;
  
      data.moveFrom = fromCol;
      data.moveTo = toCol;
  
      var lastRequest = new Ajax.Request(href, {
          postBody: Object.toQueryString(data)
      });
  
      return true;
  }
  
  function ajaxform(checkbox, textbox, isAdd, details, conditionalDetails) {
      var href;
  
      // Set up data variable
      var formdata = "";
      formdata = formdata + 'id='+${period.id}+"&";
      var rc
  
      if (checkbox != null) {
          rc = extractRowAndColumn(checkbox.name)
          if (checkbox.name.indexOf(".conditionalCheckbox") >= 0) {
              formdata = getInfoFromConditionalCheckbox(formdata, checkbox, rc[0])
              href = updateDetails("Update details", "details", rc[0]);
          } else {
              formdata = getInfoFromEventCheckbox(formdata, checkbox, rc[0], rc[1])
              if ($(checkbox).checked) {
                  href = createAddControl("Add checkbox", "checkbox", rc[0])
              } else {
                  href = createRemoveControl("Remove checkbox", "checkbox", rc[0])
              }
          }
  
      } else if (details != null) {
          rc = extractRowAndColumn($(details).name);
          formdata = getInfoFromEventDetails(formdata, details, rc[0]);
          href = updateDetails("Update details", "details", rc[0]);
      } else if (conditionalDetails != null) {
          rc = extractRowAndColumn(conditionalDetails.name)
          href = updateDetails("Update details", "details", rc[0]);
      } else if (textbox != null) {
          rc = extractRowAndColumn(textbox)
          formdata = getInfoFromEventTextbox(formdata, isAdd, rc[0], rc[1])
          if (isAdd) {
              href = createAddControl("Add checkbox", "checkbox", rc[0])
          } else {
              href = createRemoveControl("Remove checkbox", "checkbox", rc[0])
          }
      }
  
      var activity = 'grid[' + rc[0] + '].activity';
      formdata = formdata + "activity=" + escape($(activity).value) + "&";
  
      var arrayOfCounts = 'grid[' + rc[0] + '].eventIds';
      for (var i = 0; i < ${period.duration.days}; i++) {
          var singleElement = arrayOfCounts + '[' + i + ']';
          if ($(singleElement).getAttribute('value') == null) {
              formdata = formdata + 'eventIds' + '[' + i + ']' + "=-1" + "&";
          } else {
              formdata = formdata + 'eventIds' + '[' + i + ']' + "=" + $(singleElement).getAttribute('value') + "&";
          }
      }
  
      formdata = formdata + 'rowNumber' + "=" + rc[0] + "&";
  
      var details1 = 'grid[' + rc[0] + '].conditionalDetails';
      formdata = formdata + "conditionalDetails=" + $(details1).value + "&";
  
      var lastRequest = new Ajax.Request(href,
      {
          postBody: formdata
      });
  
      return true;
  }
  
  function registerHandlers() {
      $$('.input-row td.conditional').each(function(cell) {
          var input = cell.getElementsByTagName("INPUT")[0]
          registerCellInputHandlers(input)
      });
      Event.observe('add-activity-button', 'click', addActivityRow)
      Event.observe('add-activity-button', 'click', resetActivitiesAutocompleter)
      Event.observe('return-to-template', 'click', function() {
  
negative.code:         id: conditionDetailsName,
          name: conditionDetailsName,
          type: 'text',
          disabled: 'true'
      });
      cells.push(Builder.node('td', {}, [conditionDetailsInput]))
  
      var rowId = 'activity' + activity.id;
  