function cleanLibraryFolder(){ var lib = fl.getDocumentDOM().library; var folders = {}; for(var i=0; i<lib.items.length; i++){ var o = lib.items[i]; var n = o.name; var obj = getItemObject(o.name); if(o.itemType == "folder"){ folders[o.name] = 0; } folders[obj.folder]++; } var cnt = 0; fl.trace(""); fl.trace("----- Clean Library Folder -----"); for(var p in folders){ if(folders[p] == 0){ cnt++; li