 			} else {
 				for (i=0;i<r.ROWCOUNT;i++) {
 					//insertNewChild(var) does not work for some insane reason, so.....
+					// delete (if exists)
+					myTree.deleteItem(r.DATA.TID[i],false);
+
 					var d="myTree.insertNewChild(" + r.DATA.PARENT_TID[i]+','+r.DATA.TID[i]+',"'+r.DATA.TERM[i]+' (' + r.DATA.RANK[i] + ')",0,0,0,0)';
 					eval(d);
 				}


			myTree.attachEvent("onDblClick", function(id){
				expandNode(id);
				
				
			});

			myTree.attachEvent("onDrop", function(sId, tId, id, sObject, tObject){

		}
	);
}



function savedMetaEdit(tid,newVal){
		//alert('t');
		//alert('am parent t with tid=' + tid + ' i got newVal=' + newVal);
