function getDroppableObjectsForElement(b,g){var e=$(b),a=$(".Droppable"),a=a.filter(function(){var b=!1,c=$(this),d=c.attr("hide");if(void 0==d||"0"==d){var d=e.attr("type"),a=c.attr("accepts");void 0!=a&&(a=a.split(";"),b=-1!=$.inArray("ALLTYPES",a)||-1!=$.inArray(d,a))&&(d=e.attr("parentobjectid"),c=c.attr("parentobjectid"),void 0!=d&&""!=d&&(b=void 0!=c&&""!=c?c==d:void 0==c||""==c))}return b});void 0!=g&&(a=a.filter(g));return a}function enableDragObject(b){enableDrag(b,b)}
function enableDrag(b,g,e,a,k){b=$(b);var c=$(g);b.draggable({start:function(b,e){var f=getDroppableObjectsForElement(c,a);void 0!=f&&0<f.length&&f.fadeIn("slow").droppable({hoverClass:"DroppableHover",tolerance:"pointer",drop:function(){var a=$(this),b=a.attr("dropaction"),d=a.attr("objectid"),e=a.attr("parentobjectid"),a=a.attr("type"),f=c.attr("objectid"),g=c.attr("parentobjectid"),h=c.attr("type");getAction(b+"&objectId="+(void 0==f?"":f)+"&objectParentId="+(void 0==g?"":g)+"&objectType="+(void 0==
h?"":h)+"&destObjectId="+(void 0==d?"":d)+"&destObjectParentId="+(void 0==e?"":e)+"&destObjectType="+(void 0==a?"":a))}})},stop:function(b,e){var f=getDroppableObjectsForElement(c,a);f.filter(function(){return"visible"!=$(this).attr("displaymode")}).fadeOut("slow");f.droppable("destroy")},revert:!0,revertDuration:0,helper:void 0==e?"clone":e})};
