rem: container = container.nextContainer; }  } else if (!hotPoint.inside( curContainer.northwest, curContainer.southeast )) {  portletCont.isOutside = true;   var container = DragDrop.firstContainer; while (container != null) { if (hotPoint.inside( container.northwest, container.southeast )) {  portletCont.isOutside = false; curContainer.removeChild( portletBound ); container.insertBefore(portletBound, container.endPlaceholder);  container.southeast = Coordinates.southeastOffset( container, true ); break; } container = container.nextContainer; }   if (portletCont.isOutside) { portletBound.parentNode.removeChild(portletBound); container = document.getElementById(DragDrop.parent_id); container.insertBefore( portletBound, DragDrop.start_next ); 
add:  prevNeighbor = neighbor; neighbor = DragUtils.nextItem(neighbor); 
context: 	onDrag : function(nwPosition, sePosition, nwOffset, seOffset) {			// This is point of interest when checking for "inside" and "outside"		var portletCont = this;		var portletBound = portletCont.parentNode;		var curContainer = portletBound.parentNode;		var hotPoint = nwOffset.plus(portletCont.mouseNwOffset);				if (portletBound.className.search("portlet-dragging-placeholder") < 0) {			portletBound.className += " portlet-dragging-placeholder";		}				// check if we were nowhere				if (portletCont.isOutside) {			// check each container to see if in its bounds			var container = DragDrop.firstContainer;			while (container != null) {				if (hotPoint.inside( container.northwest, container.southeast )) {					// we're inside this one					portletCont.isOutside = false;					// since isOutside was true, the current parent is this					// original starting container.  Remove it and add it to					// it's new parent (if different).					if (container != curContainer) {						portletBound.parentNode.removeChild(portletBound);						container.insertBefore(portletBound, container.endPlaceholder);						// Update boundaries						container.southeast = Coordinates.southeastOffset( container, true );					}					break;				}				container = container.nextContainer;			}			// we're still not inside the bounds of any container		}		else if (!hotPoint.inside( curContainer.northwest, curContainer.southeast )) {			// We're outside our parent's bounds			portletCont.isOutside = true;						// check if we're inside a new container's bounds			var container = DragDrop.firstContainer;			while (container != null) {				if (hotPoint.inside( container.northwest, container.southeast )) {					// we're inside this one					portletCont.isOutside = false;					curContainer.removeChild( portletBound );					container.insertBefore(portletBound, container.endPlaceholder);					// Update boundaries					container.southeast = Coordinates.southeastOffset( container, true );					break;				}				container = container.nextContainer;			}			// if we're not in any container now,			// add it back to it's original position.			if (portletCont.isOutside) {				portletBound.parentNode.removeChild(portletBound);				container = document.getElementById(DragDrop.parent_id);				container.insertBefore( portletBound, DragDrop.start_next );			}		}				if (!portletCont.isOutside) {			// We're inside some container bounds,			// so swap contianer into the correct position						var count = 0;						var curOffsetTop = portletCont.offsetTop + portletCont.mouseNwOffset.y;			var swapped = false;			var downSearch;			var neighbor = null;						if (Coordinates.northwestPosition(portletCont).y > 0) {				neighbor = DragUtils.nextItem(portletBound);				downSearch = true;			}			else {				neighbor = DragUtils.previousItem(portletBound);				downSearch = false;			}						while (neighbor != null) {				swapped = false;				var divList = neighbor.getElementsByTagName("div");				if (divList.length > 0 &&					neighbor.className &&					neighbor.className.match(DragDrop.portletSpacerName)) {					if (neighbor.isStatic) {						break;					}					var neighborOffsetMid = divList[0].offsetTop + neighbor.offsetHeight/2;					if (downSearch && curOffsetTop > neighborOffsetMid) {						DragUtils.swap(neighbor, portletBound);						swapped = true;					}					else if (!downSearch && curOffsetTop < neighborOffsetMid) {						DragUtils.swap(portletBound, neighbor);						swapped = true;					}				}				if (downSearch)					neighbor = DragUtils.nextItem(swapped ? portletBound : neighbor);				else					neighbor = DragUtils.previousItem(swapped ? portletBound : neighbor);			}		}	},
meta: 10143	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10143/d52ea4e97e8b1bcf753a6b46e30a44fca8aa5363/dragdrop.js/clean/portal-web/docroot/html/js/dragdrop/dragdrop.js