IUserLayoutManager lm=context.getUserLayoutManager();
if (direction.equals("up")) {
String prevSiblingId=lm.getPreviousSiblingId(folderID);
if(prevSiblingId!=null) {
lm.moveNode(folderID,lm.getParentId(folderID),prevSiblingId);
}
// for (prev = element.getPreviousSibling(); prev != null && prev.getNodeType() != Node.ELEMENT_NODE && (!prev.getNodeName().equals("channel") || !prev.getNodeName().equals("folder")); prev = prev.getPreviousSibling());
} else if (direction.equals("down")) {
String nextSiblingId=lm.getNextSiblingId(folderID);
if(nextSiblingId!=null) {