anchor.diff:      });  
   */    
       
  +    //$("body").append('<div id="loading"></div>');
  +    //$("#loading").css("color","red");
  +    $(document).ajaxStart(function(){
  +    // this is weird, it will not show if the alert is not included??
  +       //return false;
  +       //var img = $('<a href="#"><img src="static/images/jquery/ajax-loader.gif" /></a>')
  +       $("#loading").show();
  +       //alert ("start Ajax");
  +       //return false;
  +     });
  +
  +    $(document).ajaxComplete(function(){
  +       //alert ("complete Ajax");
  +       $("#loading").hide();
  +       //return false;
  +     });
  +    
  +    
       $("#generate").click(function(){ 
       
          $.ajax({
  
positive.code:     var tdTag2 = $('<td></td>').html(getResearchAreaCode(name));
      trTag2.html(tag2);
      tdTag2.appendTo(trTag2);
      tdTag2 = $('<td></td>').html($('<input type="text" name="m2" value="" style="width:100%;" />').attr("id","researchCode"+i));
      tdTag2.appendTo(trTag2);
      tdTag2 = $('<td></td>').html($('<input type="text" name="m3" value="" style="width:100%;" />').attr("id","desc"+i));
      tdTag2.appendTo(trTag2);
  
negative.code:                       removedNode = $(liId).clone(true);
                        //removedNode = $(liId); // this will not work because event also lost
                        //alert("Remove node "+removedNode.attr("id"));
                        var parentRACode;
                        if ($(liId).parents('li:eq(0)').size() == 0) {
                           parentRACode = '000001';
                        } else {
                           parentRACode = getResearchAreaCode($(liId).parents('li:eq(0)').children('a:eq(0)').text());
                        }
                        alert (parentRACode);
                        sqlScripts = sqlScripts +"#;#"+getDeleteClause(getResearchAreaCode(removedNode.children('a:eq(0)').text()), parentRACode);
                        $(liId).remove();
                        alert (sqlScripts);
                        cutNode=null;
  