anchor.diff:      return href
   }
   
  -function moveAjaxForm(arrayOfIndicesForParent, arrayOfIndicesForChild, isAdd) {
  -    var href = move("Move event", "event ", arrayOfIndicesForChild[0]);
  +function moveAjaxForm(fromRC, toRC) {
  +    var href = move("Move event", "event ", toRC[0]);
       // Set up data variable
       var formdata = "";
       formdata = formdata + 'id='+${period.id}+"&";
  -    formdata = getInfoFromEventTextbox(formdata, isAdd, arrayOfIndicesForChild[0], arrayOfIndicesForChild[1])
  -
  -    var activity = 'grid[' + arrayOfIndicesForChild[0] + '].activity';
  -    formdata = formdata + "activity=" + escape($(activity).value) +"&";
  -    var arrayOfCounts = 'grid[' + arrayOfIndicesForChild[0] + '].eventIds';
  -
  -    singleElement = arrayOfCounts +'[' +arrayOfIndicesForParent[1] + ']';
  -    if ($(singleElement).getAttribute('value') !=  null ) {
  -        formdata = formdata + 'eventIds' + '[' +arrayOfIndicesForParent[1] + ']'+  "=" + $(singleElement).getAttribute('value') + "&" ;
  -    }
  -    formdata = formdata + 'rowNumber'+ "=" + arrayOfIndicesForChild[0] + "&";
  +    formdata = getInfoFromEventTextbox(formdata, false, toRC[0], toRC[1])
  +
  +    var activity = 'grid[' + toRC[0] + '].activity';
  +    formdata = formdata + "activity=" + escape($(activity).value) + "&";
  +    var arrayOfCounts = 'grid[' + toRC[0] + '].eventIds';
  +
  +    var singleElement = arrayOfCounts + '[' + fromRC[1] + ']';
  +    if ($(singleElement).getAttribute('value') != null) {
  +        formdata = formdata + 'eventIds' + '[' + fromRC[1] + ']' + "=" + $(singleElement).getAttribute('value') + "&";
  +    }
  +    formdata = formdata + 'rowNumber' + "=" + toRC[0] + "&";
       formdata = formdata + 'updated' + "=" + escape(true) + "&";
   
  -    var checkboxName = 'grid[' + arrayOfIndicesForChild[0] + '].conditionalCheckbox1';
  -    formdata = formdata + "conditionalCheckbox1=" + $(checkboxName).checked + "&" ;
  -    var details1 = 'grid[' +  arrayOfIndicesForChild[0] + '].conditionalDetails';
  +    var checkboxName = 'grid[' + toRC[0] + '].conditionalCheckbox1';
  +    formdata = formdata + "conditionalCheckbox1=" + $(checkboxName).checked + "&";
  +    var details1 = 'grid[' + toRC[0] + '].conditionalDetails';
       formdata = formdata + "conditionalDetails=" + $(details1).value + "&";
   
  -    formdata = formdata+ "moveFrom=" + arrayOfIndicesForParent[1] + "&";
  -    formdata = formdata+ "moveTo=" + arrayOfIndicesForChild[1] + "&";
  +    formdata = formdata + "moveFrom=" + fromRC[1] + "&";
  +    formdata = formdata + "moveTo=" + toRC[1] + "&";
   
       var lastRequest = new Ajax.Request(href,
       {
  
positive.code:     // Set up data variable
      var formdata = "";
      formdata = formdata + 'id='+${period.id}+"&";
      var arrayOfIndexes
  
      if (checkbox != null){
          arrayOfIndexes = parseInput(checkbox.name)
          if (checkbox.name.indexOf(".conditionalCheckbox")>=0) {
              formdata = getInfoFromConditionalCheckbox(formdata, checkbox, arrayOfIndexes[0])
              href = updateDetails ("Update details", "details", arrayOfIndexes[0]);
          } else {
              formdata = getInfoFromEventCheckbox(formdata, checkbox, arrayOfIndexes[0], arrayOfIndexes[1])
              if($(checkbox).checked) {
                  href = createAddControl("Add checkbox", "checkbox", arrayOfIndexes[0])
              } else {
                  href = createRemoveControl("Remove checkbox", "checkbox", arrayOfIndexes[0])
              }
          }
  
      } else if (details != null) {
          arrayOfIndexes = parseInput($(details).name);
          formdata = getInfoFromEventDetails(formdata, details, arrayOfIndexes[0]);
          href = updateDetails ("Update details", "details", arrayOfIndexes[0]);
      } else if (conditionalDetails != null) {
          arrayOfIndexes = parseInput(conditionalDetails.name)
          formdata = getInfoFromConditionalDetails(formdata, conditionalDetails, arrayOfIndexes[0])
          href = updateDetails ("Update details", "details", arrayOfIndexes[0]);
      } else if (textbox != null) {
          arrayOfIndexes = parseInput(textbox)
          formdata = getInfoFromEventTextbox(formdata, isAdd, arrayOfIndexes[0], arrayOfIndexes[1])
          if (isAdd) {
              href = createAddControl("Add checkbox", "checkbox", arrayOfIndexes[0])
          } else {
              href = createRemoveControl("Remove checkbox", "checkbox", arrayOfIndexes[0])
          }
      }
  
      var activity = 'grid[' + arrayOfIndexes[0] + '].activity';
      formdata = formdata + "activity=" + escape($(activity).value) +"&";
  
      var arrayOfCounts = 'grid[' + arrayOfIndexes[0] + '].eventIds';
      for (var i = 0; i < ${period.duration.days}; i++) {
          singleElement = arrayOfCounts +'[' +i + ']';
          if ($(singleElement).getAttribute('value') ==  null ) {
              formdata = formdata + 'eventIds' + '[' +i + ']'+  "=-1" + "&" ;
          } else {
              formdata = formdata + 'eventIds' + '[' +i + ']'+  "=" + $(singleElement).getAttribute('value') + "&" ;
          }
      }
  
      formdata = formdata + 'rowNumber'+ "=" + arrayOfIndexes[0] + "&";
      formdata = formdata + 'updated' + "=" + escape(true) + "&";
  
  
      var checkboxName = 'grid[' + arrayOfIndexes[0] + '].conditionalCheckbox1';
      formdata = formdata + "conditionalCheckbox1=" + $(checkboxName).checked + "&" ;
  
      var details1 = 'grid[' +  arrayOfIndexes[0] + '].conditionalDetails';
      formdata = formdata + "conditionalDetails=" + $(details1).value + "&";
  
      var lastRequest = new Ajax.Request(href,
  
negative.code:     // input cells
      for (var i = 0; i < dayCount; i++) {
          var name = 'grid[' + rowCount + '].eventIds[' + i + ']'
          var input = Builder.node('span', {
              id:name,
              name:name,
              class: "marker",
  