anchor.diff:  }
   
   function registerCellInputHandlers(input) {
  -    Event.observe(input, "click", function(e){return ajaxform(input, null, null, null, null)})
  -}
  -
  -function parseInput(input) {
  -    var substring1 = input.substring(input.indexOf("[")+1, input.indexOf("]"));
  -    var substring2 = input.substring(input.indexOf("]") + 1);
  -    var substring3 = substring2.substring(substring2.indexOf("[")+1, substring2.indexOf("]"));
  -    var rowNumber = input.substring(input.length-1, input.length);
  -
  -    var array = new Array();
  -    array[0] = substring1;
  -    array[1] = substring3;
  -    return array;
  +    Event.observe(input, "click", function(e) {
  +        return ajaxform(input, null, null, null, null)
  +    })
  +}
  +
  +// extracts row and column from an ID like grid[row].eventIds[col]
  +function extractRowAndColumn(gridElementId) {
  +    var row = gridElementId.substring(gridElementId.indexOf("[") + 1, gridElementId.indexOf("]"));
  +    var eventIdsPortion = gridElementId.substring(gridElementId.indexOf("]") + 1);
  +    var col = eventIdsPortion.substring(eventIdsPortion.indexOf("[") + 1, eventIdsPortion.indexOf("]"));
  +
  +    return [row, col];
   }
   
   function parseDetailName(name) {
  -    return name.substring(name.indexOf("[")+1, name.indexOf("]"));
  +    return name.substring(name.indexOf("[") + 1, name.indexOf("]"));
   
   }
   
  
positive.code: }
  
  function getInfoFromEventCheckbox(formdata, checkbox, index1, index2) {
     var details = 'grid[' + index1 + '].details';
      formdata = formdata + "details=" + escape($(details).value) + "&";
      formdata = formdata + 'columnNumber'+ "=" + index2 + "&";
      formdata = formdata + 'addition' + "=" + escape($(checkbox).checked) + "&";
      formdata = formdata + 'conditionalUpdated' + "=" + escape(false) + "&";    
      return formdata;
  }
  
  function getInfoFromEventDetails(formdata, details, index) {
      formdata = formdata + "details=" + escape($(details).value) + "&";
      formdata = formdata + 'addition' + "=" + escape(false) + "&";
      formdata = formdata + 'columnNumber'+ "=" + escape(-1) + "&";
      formdata = formdata + 'conditionalUpdated' + "=" + escape(false) + "&";
      return formdata;
  }
  
  function getInfoFromEventTextbox(formdata, isAdding, index1, index2) {
     var details = 'grid[' + index1 + '].details';
      formdata = formdata + "details=" + escape($(details).value) + "&";
      formdata = formdata + 'columnNumber'+ "=" + index2 + "&";
      formdata = formdata + 'addition' + "=" + isAdding + "&";
      formdata = formdata + 'conditionalUpdated' + "=" + escape(false) + "&";
      return formdata;
  }
  
  function createAddControl(text, objectType, objectId) {
      return createControlAnchorOne("add", text, "Add this " + objectType, '<c:url value="/pages/cal/managePeriod/addTo"/>')
  }
  
  function createRemoveControl(text, objectType, objectId) {
      return createControlAnchorOne("remove", text, "Remove this " + objectType, '<c:url value="/pages/cal/managePeriod/remove"/>')
  }
  
  
  function updateDetails(text, objectType, objectId) {
      return createControlAnchorOne("update", text, "Update " + objectType, '<c:url value="/pages/cal/managePeriod/update"/>')
  }
  
  function move(text, objectType, objectId) {
      return createControlAnchorOne("move", text, "Move " + objectType, '<c:url value="/pages/cal/managePeriod/move"/>')
  }
  
  function createControlAnchorOne(controlName, text, title, baseHref) {
      var href = baseHref;
      if (href.indexOf('?') >= 0) {
          href += '&'
  
negative.code: function getInfoFromConditionalCheckbox(formdata, conditionalCheckbox, index) {
      var checkboxName = 'grid[' + index + '].conditionalCheckbox1';
      var isChecked = $(checkboxName).checked;
      var details = 'grid[' + index + '].conditionalDetails';
      if (!isChecked) {
          $(details).value = "";
          $(details).disabled = true;
      } else {
          $(details).disabled = false;
  