if(YAHOO.util.DDProxy){
YAHOO.ext.LayoutRegionDD = function(region){
    this.proxy = YAHOO.ext.DomHelper.append(document.body, 
                {tag : 'div', cls: 'ylayout-panel-proxy', id: region.el.id + '-ddproxy'}, true);
    this.proxy.setOpacity(.5);
    YAHOO.ext.LayoutRegionDD.superclass.constructor.call(this, region.el.dom.id, 'PanelDrag', {dragElId: this.proxy.id, scroll:false})
    this.layoutRegion = region;
    this.setHandleElId(region.titleEl.id);
};

YAHOO.extendX(YAHOO.ext.LayoutRegionDD, YAHOO.util.DDProxy, {
    endDrag : function(){
        this.layoutRegion.mgr.endDragOver(this.layoutRegion);
    },
    
    startDrag : function(){
        this.layoutRegion.mgr.startDragOver(this.layoutRegion);
    },
    
    onDragDrop : function(e, id){
        var target = YAHOO.util.DragDropMgr.getDDById(id);
        if(target && target.layoutRegion){
            target.layoutRegion.unhighlight();
            var p = this.layoutRegion.activePanel;
            this.layoutRegion.remove(p);
            target.layoutRegion.add(p);
        }
    },
    
    onDragEnter : function(e, id){
        var target = YAHOO.util.DragDropMgr.getDDById(id);
        if(target && target.layoutRegion){
            target.layoutRegion.highlight();
        }
    },
    
    onDragOut : function(e, id){
        var target = YAHOO.util.DragDropMgr.getDDById(id);
        if(target && target.layoutRegion){
            target.layoutRegion.unhighlight();
        }
    }
});
}

Copyright © 2006 Jack Slocum. All rights reserved.