anchor.diff:           return "delete from research_areas where RESEARCH_AREA_CODE = '" + code +"' and PARENT_RESEARCH_AREA_CODE = '"+parentCode+"'";
        }
   
  +   function getUpdateClause(code, newDesc) {
  +         return "update research_areas set DESCRIPTION ='"+newDesc+ "' where RESEARCH_AREA_CODE = '" + code +"'";   
  +   }
  +
      function okToSave() {
              alert("oktosave " );
        		document.getElementById("sqlScripts").value=sqlScripts;
  
positive.code:   
  </head>
  <body>
  <form name="ResearchAreasForm" id="kualiForm" method="post" action="/kra-dev/researchAreas.do" 
      enctype="" > 
  
  	<input type="hidden" id="sqlScripts" name="sqlScripts" />
  
    <ul id="example" class="filetree">
  		<li><span class="folder">Folder 1</span>
  			<ul>
  				<li><span class="file">Item 1.1</span></li>
  			</ul>
  		</li>
  		<li><span class="folder">Folder 2</span>
  			<ul>
  				<li><span class="folder">Subfolder 2.1</span>
  					<ul>
  						<li><span class="file">File 2.1.1</span></li>
  						<li><span class="file">File 2.1.2</span></li>
  					</ul>
  				</li>
  				<li><span class="file">File 2.2</span></li>
  			</ul>
  		</li>
  		<li class="closed"><span class="folder">Folder 3 (closed at start)</span>
  			<ul id="file31" class="filetree">
  				<!-- <li><span class="file">File 3.1</span></li> -->
  			</ul>
  		</li>
  		<li><span class="file">File 4</span></li>
  	</ul>
  	
  	
  	                                            <ul id="browser" class="filetree">
                                                   <li class="closed"><a id="listcontrol03" style="margin-left:2px;">01. : AGRICULTURE, AGRICULTURE OPERATIONS, AND RELATED SCIENCES</a>
                                                      <div class="hierarchydetail" id="listcontent03" style="margin-top:2px;">
  														
                                                          <table width="100%" cellpadding="0" cellspacing="0" class="subelement">
                                                              <thead>
                                                                  <tr>
                                                                      <th class="subelementheader" align="left">
                                                                          <a href="#" class="hidedetail"><img src="kr/static/images/tinybutton-hide.gif" align="absmiddle" border="0" width="45" height="15"></a>
                                                                          01. : AGRICULTURE, AGRICULTURE OPERATIONS, AND RELATED SCIENCES
                                                                      </th>
                                                                  </tr>
                                                              </thead>
                                                              <tbody>
                                                                  <tr>
                                                                      <td class="subelementcontent">
                                                                  		
                                                                          <table cellpadding="0" cellspacing="0" class="elementtable" width="100%">
                                                                              <tr>
                                                                              	<th style="text-align:right;">Node:</th>
                                                                                  <th colspan="4">
                                                                                  	<!--<a href="#"><img src="../images/arrow-up.gif" width="17" height="14" border="0" alt="Move Up" title="Move this node up within its group"></a>&nbsp;
                                                                                      <a href="#"><img src="static/images/arrow-down.gif" width="17" height="14" border="0" alt="Move Down" title="Move this node down within its group"></a>&nbsp;-->
                                                                                      <a href="#"><img src="static/images/tinybutton-removenode.gif" width="79" height="15" border="0" alt="Remove Node" title="Remove this node and its child groups/sponsors"></a>&nbsp;
                                                                                      <a href="#"><img src="static/images/tinybutton-cutnode.gif" width="79" height="15" border="0" alt="Cut Node" title="Cut this node and its child roups/sponsors.  (Node will not be removed until you paste it.)"></a>&nbsp;
                                                                                  	<a href="#"><img src="static/images/tinybutton-pastenode.gif" width="79" height="15" border="0" alt="Paste Node" title="Paste your previously cut node structure under this node"></a>
                                                                                  </th>
                                                                              </tr>
                                                                               <tr>
                                                                                  <td class="infoline" style="width:60px;">&nbsp;
                                                                                      
                                                                                  </td>
                                                                                  <td class="infoline" style="width:100px;">
                                                                                      <b>Parent Code</b>
                                                                                  </td>
                                                                                  <td class="infoline" style="width:100px;">
                                                                                      <b>Research Code</b>
                                                                                  </td>
                                                                                  <td class="infoline">
                                                                                      <b>Research Area</b>
                                                                                  </td> 
                                                                                  <td class="infoline" style="width:65px;">
                                                                                     	<b>Action</b>
                                                                                  </td>
                                                                              </tr>
                                                                              <tr>
                                                                                  <th style="text-align:right;">
                                                                                      Edit:
                                                                                  </th>
                                                                                  <td>
                                                                                      000001
                                                                                  </td>
                                                                                  <td>
                                                                                      01.
                                                                                  </td>
                                                                                  <td>
                                                                                      <input type="text" name="y1" value="AGRICULTURE, AGRICULTURE OPERATIONS, AND RELATED SCIENCES" style="width:100%;" />
                                                                                  </td>
                                                                                  <th class="infoline" style="text-align:center;">
                                                                                      <!--<a href="#"><img src="../images/searchicon.gif" width="16" height="16" border="0" alt="Search for Group" title="Search for Group"></a>-->
                                                                                      <a href="#"><img src="../images/tinybutton-save1.gif" width="40" height="15" border="0" title="Add this Sub-group"></a>
                                                                                  </th> 
                                                                              </tr>
                                                                              <tr>
                                                                                  <th style="text-align:right;">
                                                                                      Add:
                                                                                  </th>
                                                                                  <td>
                                                                                      01.
                                                                                  </td>
                                                                                  <td>
                                                                                      <input type="text" name="y2" value="" style="width:100%;" />
                                                                                  </td>
                                                                                  <td>
                                                                                      <input type="text" name="y3" value="" style="width:100%;" />
                                                                                  </td>
                                                                                  <th class="infoline" style="text-align:center;">
                                                                                      <a href="#"><img src="../images/tinybutton-add1.gif" width="40" height="15" border="0" title="Add this Sub-group"></a>
                                                                                  </th>  
                                                                              </tr>
                                                                          </table>
                                                                  
                                                                  	</td>
                                                                  </tr>
                                                              </tbody>
                                                          </table>
                                                          
                                                      </div>
  	                                           </li>
  	                                          </ul>
  	
  	<div id="foo"/>
  	<input type="submit" id="generate" value="Generate!" /> 
  	<input type="image" id="save" src="${ConfigProperties.kr.externalizable.images.url}buttonsmall_save.gif" /> 
  	<div id="quote"></div>
          <div id="globalbuttons" class="globalbuttons">
             <!--  still posted -->
            <%--   <input type="submit" name="save" id="generate" 
  				src="${ConfigProperties.kr.externalizable.images.url}buttonsmall_save.gif"
  				class="globalbuttons" title="save" alt="save"> --%>
              <%-- <html:image src="${ConfigProperties.kr.externalizable.images.url}buttonsmall_save.gif" styleClass="globalbuttons" property="methodToCall.saveSponsorHierarchy" title="save" alt="save" onclick="return okToSave();return false;" />    
              <html:image src="${ConfigProperties.kr.externalizable.images.url}buttonsmall_cancel.gif" styleClass="globalbuttons" property="methodToCall.cancelResearchAreas" title="cancel" alt="cancel" /> --%>  
          </div>
    </form>
  </body>
   </html>
negative.code:                       sqlScripts = sqlScripts +"#;#"+getDeleteClause(getResearchAreaCode(removedNode.children('a:eq(0)').text()), getResearchAreaCode($(liId).parents('li:eq(0)').children('a:eq(0)').text()));
                        $(liId).remove();
                        alert (sqlScripts);
                        cutNode=null;
                      }); 
    tag.html(image);
    image = $('<a href="#"><img src="static/images/tinybutton-cutnode.gif" width="79" height="15" border="0" alt="Cut Node" title="Cut this node and its child roups/sponsors.  (Node will not be removed until you paste it.)"></a>&nbsp').attr("id","cut"+i).click(function() {
                        alert("Cut node");
                         var liId="li#"+id;
                        cutNode = $(liId).clone(true);
                        removedNode=null; // remove & cutNode should not co-exist
                      }); 
    image.appendTo(tag);                  
    image = $('<a href="#"><img src="static/images/tinybutton-pastenode.gif" width="79" height="15" border="0" alt="Paste Node" title="Paste your previously cut node structure under this node"></a>').attr("id","paste"+i).click(function() {
  
                  if (removedNode || cutNode) {
                        var parentNode = $("#"+id);
                        var ulTag = parentNode.children('ul');
                        if (ulTag.size() > 0) {                     
  